python-tatuclient/doc/source/shell-v2.rst
sonu.kumar 8bc106654c Add openstack zone transfer accept list cli to designateclient
This patch add cli for listing accepted zone ownership transfer

and corresponding test cases.

Related-Bug: #1499539

Change-Id: I3eec36c73b2dacd4eed3b8578c4d51593b43104d
depends-on: I3dc042f666be43649bb3dec6e92cc67d1c32578f
2016-06-14 11:26:53 +00:00

7.0 KiB

OpenStack Command Line Tool (compatible with v2 API only)

The python-designateclient package comes with a plugin for the openstack command line tool (installed as openstack). This can be used to access a Designate API without having to manipulate JSON by hand, it can also produce the output in a variety of formats (JSON, CSV) and allow you to select columns to be displayed.

Installation

Both python-openstackclient and python-designateclient must be installed:

$ pip install python-openstackclient python-designateclient

Configuration

openstack requires certain information to talk to the REST API. An in-depth explanation is covered in the OpenStack Client configuration documentation.

Using the Command Line Tool

With enough details now in the environment, you can use the openstack to create a zone and populate it with some records:

$ openstack zone create --email admin@example.com example.com.
+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| action         | CREATE                               |
| created_at     | 2016-04-19T17:44:04.000000           |
| description    | None                                 |
| email          | admin@example.com                    |
| id             | 388814ef-3c5d-415e-a866-5b1d13d78dae |
| masters        |                                      |
| name           | example.com.                         |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | 123456                               |
| serial         | 1461087844                           |
| status         | PENDING                              |
| transferred_at | None                                 |
| ttl            | 3600                                 |
| type           | PRIMARY                              |
| updated_at     | None                                 |
| version        | 1                                    |
+----------------+--------------------------------------+

Now that the zone has been created, we can start adding records.

You'll note that the zone name (example.com) has a trailing ., as per the DNS standard, and we didn't set a TTL.

$ openstack recordset create --type A --records 192.0.2.20 example.com. www
+-------------+--------------------------------------+
| Field       | Value                                |
+-------------+--------------------------------------+
| action      | CREATE                               |
| created_at  | 2016-04-19T17:51:12.000000           |
| description | None                                 |
| id          | 180d3574-3c29-4ea2-b6ff-df904bd3f126 |
| name        | www.example.com.                     |
| records     | 192.0.2.20                           |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | A                                    |
| updated_at  | None                                 |
| version     | 1                                    |
| zone_id     | 388814ef-3c5d-415e-a866-5b1d13d78dae |
+-------------+--------------------------------------+

Designate-specific Subcommands

Aside from the zone create and recordset create subcommands, this is the full list of subcommands that enable Designate V2 support:

subcommand Notes Admin Required

zone create zone list zone show zone set zone delete recordset create recordset list recordset show recordset set recordset delete ptr record list ptr record show ptr record set ptr record unset zone export create zone export list zone export show zone export delete zone export showfile zone import create zone import list zone import show zone import delete zone transfer request create zone transfer request list zone transfer request show zone transfer request set zone transfer request delete zone transfer accept request zone transfer accept list zone transfer accept show zone abandon zone axfr

Create new zone List zones Show zone details Set zone properties Delete zone Create new recordset List recordsets Show recordset details Set recordset properties Delete recordset List floatingip ptr records Show floatingip ptr record details Set floatingip ptr record Unset floatingip ptr record Export a Zone List Zone Exports Show a Zone Export Delete a Zone Export Show the zone file for the Zone Export Import a Zone from a file on the filesystem List Zone Imports Show a Zone Import Delete a Zone Import Create new zone transfer request List Zone Transfer Requests Show Zone Transfer Request Details Set a Zone Transfer Request Delete a Zone Transfer Request Accept a Zone Transfer Request List Zone Transfer Accepts Show Zone Transfer Accept Abandon a zone AXFR a zone

zone blacklist create Create new blacklist Yes
zone blacklist list List blacklists Yes
zone blacklist show Show blacklist details Yes
zone blacklist set Set blacklist properties Yes
zone blacklist delete Delete blacklist Yes
tld create Create new tld Yes
tld list List tlds Yes
tld show Show tld details Yes
tld set Set tld properties Yes
tld delete Delete tld Yes

Built-in Designate Documentation

You'll find complete documentation on the shell by running: openstack --help

For a specific command, you can execute: openstack subcommand help