summaryrefslogtreecommitdiff
path: root/doc/source/user/shell-examples.rst
blob: 3213fb12df44dea0024d25f8ba013a0da690779d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
====================================
Designate Command Line Tool Examples
====================================

.. warning:: This page refers to command that use the V1 API, which is currently disabled, and will be removed in a future release

Using the client against your dev environment
---------------------------------------------
Typically the designate client talks to Keystone (or a Keystone like service) via the OS_AUTH_URL setting & retrives the designate endpoint from the returned service catalog.  Using ``--os-endpoint`` or ``OS_ENDPOINT`` you can specify the end point directly, this is useful if you want to point the client at a test environment that's running without a full Keystone service.

.. code-block:: shell-session

    $ designate --os-endpoint http://127.0.0.1:9001/v1 server-create --name ns.example.com.
    +------------+--------------------------------------+
    | Field      | Value                                |
    +------------+--------------------------------------+
    | id         | 3dee78df-c6b8-4fbd-8e89-3186c1a4734f |
    | created_at | 2015-11-04T08:47:12.000000           |
    | updated_at | None                                 |
    | name       | ns.example.com.                      |
    +------------+--------------------------------------+

    $ designate --os-endpoint http://127.0.0.1:9001/v1 domain-create --name example.net. --email me@example.org
    +-------------+--------------------------------------+
    | Field       | Value                                |
    +-------------+--------------------------------------+
    | description | None                                 |
    | created_at  | 2015-11-04T08:49:53.000000           |
    | updated_at  | None                                 |
    | email       | me@example.org                       |
    | ttl         | 3600                                 |
    | serial      | 1446626993                           |
    | id          | f98c3d91-f514-4956-a955-20eefb413a64 |
    | name        | example.net.                         |
    +-------------+--------------------------------------+

    $ designate --os-endpoint http://127.0.0.1:9001/v1 record-create --name myhost.example.net. --type A --data 1.2.3.4 f98c3d91-f514-4956-a955-20eefb413a64 (domain_id)
    +-------------+--------------------------------------+
    | Field       | Value                                |
    +-------------+--------------------------------------+
    | description | None                                 |
    | type        | A                                    |
    | created_at  | 2015-11-04T08:52:41.000000           |
    | updated_at  | None                                 |
    | domain_id   | f98c3d91-f514-4956-a955-20eefb413a64 |
    | priority    | None                                 |
    | ttl         | None                                 |
    | data        | 1.2.3.4                              |
    | id          | b5a74471-8062-4395-be70-968805a0d832 |
    | name        | myhost.example.net.                  |
    +-------------+--------------------------------------+

    $ designate domain-list
    +--------------------------------------+--------------+------------+
    | id                                   | name         |     serial |
    +--------------------------------------+--------------+------------+
    | 88c14ecf-b034-424c-b081-ca42494dcdf9 | example.com. | 1462372104 |
    +--------------------------------------+--------------+------------+

    $ designate domain-update --email example@example.com 88c14ecf-b034-424c-b081-ca42494dcdf9 (domain_id)
    +-------------+---------------------------------------+
    | Field       | Value                                 |
    +-------------+---------------------------------------+
    | description | None                                  |
    | created_at  | 2016-05-04T14:28:24.000000            |
    | updated_at  | 2016-05-04T14:29:48.000000            |
    | email       | example@example.com                   |
    | ttl         | 3600                                  |
    | serial      | 1462372188                            |
    | id          | 88c14ecf-b034-424c-b081-ca42494dcdf9  |
    | name        | example.com.                          |
    +-------------+---------------------------------------+

    $ designate domain-delete 88c14ecf-b034-424c-b081-ca42494dcdf9 (domain_id)

    $ designate record-list 66584cdd-f7a6-4f0e-acf0-3dd5ad04830d (domain_id)
    +--------------------------------------+------+-----------------------+-----------------------------------------------------------------+
    | id                                   | type | name                  | data                                                            |
    +--------------------------------------+------+-----------------------+-----------------------------------------------------------------+
    | fdfab9c3-51c0-42b9-b500-7779ef917915 | SOA  | example.com.          | ns1.example.org. pr8721.att.com. 1462372695 3600 600 86400 3600 |
    | 242a16e8-8455-4b4d-af7f-45de1074aa04 | NS   | example.com.          | xyz.com.                                                        |
    | 8dc14df7-3651-49df-8c83-0d71954c6152 | NS   | example.com.          | ns1.example.org.                                                |
    | 7e80531d-bd65-49bc-a316-a6a06cd7fe26 | A    | example1.example.com. | 198.51.100.1                                                    |
    +--------------------------------------+------+-----------------------+-----------------------------------------------------------------+

    $ designate record-update --name example1.example.com. --type A --data 198.5.100.2 --ttl 3600 66584cdd-f7a6-4f0e-acf0-3dd5ad04830d (domain-id) 7e80531d-bd65-49bc-a316-a6a06cd7fe26 (record_id)
    +-------------+--------------------------------------+
    | Field       | Value                                |
    +-------------+--------------------------------------+
    | description | None                                 |
    | type        | A                                    |
    | created_at  | 2016-05-04T14:38:15.000000           |
    | updated_at  | 2016-05-04T16:12:05.000000           |
    | domain_id   | 66584cdd-f7a6-4f0e-acf0-3dd5ad04830d |
    | priority    | None                                 |
    | ttl         | 3600                                 |
    | data        | 198.5.100.2                          |
    | id          | 7e80531d-bd65-49bc-a316-a6a06cd7fe26 |
    | name        | example1.example.com.                |
    +-------------+--------------------------------------+

    $ designate record-delete 66584cdd-f7a6-4f0e-acf0-3dd5ad04830d (domain-id) 7e80531d-bd65-49bc-a316-a6a06cd7fe26 (record_id)

    $ designate quota-get 70a4596c9974429db5fb6fe240ab87b9 (tenant_id)
    +-------------------+-------+
    | Field             | Value |
    +-------------------+-------+
    | domains           | 10    |
    | domain_recordsets | 500   |
    | recordset_records | 20    |
    | domain_records    | 500   |
    +-------------------+-------+

    $ designate quota-update --domains 50 --domain-recordsets 1000 --recordset-records 40 --domain-records 1000 70a4596c9974429db5fb6fe240ab87b9 (tenant_id)
    +-------------------+-------+
    | Field             | Value |
    +-------------------+-------+
    | domains           | 50    |
    | domain_recordsets | 1000  |
    | recordset_records | 40    |
    | domain_records    | 1000  |
    +-------------------+-------+

    $ designate quota-get 70a4596c9974429db5fb6fe240ab87b9 (tenant_id)
    +-------------------+-------+
    | Field             | Value |
    +-------------------+-------+
    | domains           | 10    |
    | domain_recordsets | 500   |
    | recordset_records | 20    |
    | domain_records    | 500   |
    +-------------------+-------+