diff options
author | Erik Olof Gunnar Andersson <eandersson@blizzard.com> | 2019-09-10 19:45:29 -0700 |
---|---|---|
committer | Erik Olof Gunnar Andersson <eandersson@blizzard.com> | 2019-09-10 20:53:25 -0700 |
commit | 093d8d7170cbf6ef8c7a7c0ff2a4dcd7ecd6361b (patch) | |
tree | aaa453be6cf3df5cf18937694059911329163bf3 /doc | |
parent | 5c9bbbfac8f03be416b268798045b5814c3fbe06 (diff) | |
download | python-designateclient-093d8d7170cbf6ef8c7a7c0ff2a4dcd7ecd6361b.tar.gz |
The v1 has officially been removed from Designate since
the Queens release, and was deperecated long before that.
Change-Id: Ic5b44761ff939e2b319924af87849b3a79f9cb07
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/recordset_create.py | 10 | ||||
-rw-r--r-- | doc/examples/recordset_crud.py | 10 | ||||
-rw-r--r-- | doc/examples/zone_create_primary.py | 10 | ||||
-rw-r--r-- | doc/examples/zone_create_secondary.py | 11 | ||||
-rw-r--r-- | doc/examples/zone_list_nameservers.py | 11 | ||||
-rw-r--r-- | doc/examples/zone_list_paging.py | 10 | ||||
-rw-r--r-- | doc/requirements.txt | 1 | ||||
-rw-r--r-- | doc/source/cli/index.rst | 958 | ||||
-rw-r--r-- | doc/source/contributor/contributing.rst | 1 | ||||
-rw-r--r-- | doc/source/index.rst | 21 | ||||
-rw-r--r-- | doc/source/user/bindings.rst | 505 | ||||
-rw-r--r-- | doc/source/user/index.rst | 2 | ||||
-rw-r--r-- | doc/source/user/shell-examples.rst | 132 | ||||
-rw-r--r-- | doc/source/user/shell.rst | 248 |
14 files changed, 36 insertions, 1894 deletions
diff --git a/doc/examples/recordset_create.py b/doc/examples/recordset_create.py index 1bad60f..4be7c4d 100644 --- a/doc/examples/recordset_create.py +++ b/doc/examples/recordset_create.py @@ -1,9 +1,9 @@ from __future__ import print_function import logging +import os from designateclient.v2 import client from designateclient import exceptions -from designateclient import shell from keystoneauth1.identity import generic from keystoneauth1 import session as keystone_session @@ -17,10 +17,10 @@ Example script to create or get a domain and add some records to it. auth = generic.Password( - auth_url=shell.env('OS_AUTH_URL'), - username=shell.env('OS_USERNAME'), - password=shell.env('OS_PASSWORD'), - project_name=shell.env('OS_PROJECT_NAME'), + auth_url=os.environ.get('OS_AUTH_URL'), + username=os.environ.get('OS_USERNAME'), + password=os.environ.get('OS_PASSWORD'), + project_name=os.environ.get('OS_PROJECT_NAME'), project_domain_id='default', user_domain_id='default') diff --git a/doc/examples/recordset_crud.py b/doc/examples/recordset_crud.py index f00e41e..6b09197 100644 --- a/doc/examples/recordset_crud.py +++ b/doc/examples/recordset_crud.py @@ -1,8 +1,8 @@ import logging +import os from designateclient.v2 import client from designateclient import exceptions -from designateclient import shell from keystoneauth1.identity import generic from keystoneauth1 import session as keystone_session @@ -11,10 +11,10 @@ from keystoneauth1 import session as keystone_session logging.basicConfig(level='DEBUG') auth = generic.Password( - auth_url=shell.env('OS_AUTH_URL'), - username=shell.env('OS_USERNAME'), - password=shell.env('OS_PASSWORD'), - project_name=shell.env('OS_PROJECT_NAME'), + auth_url=os.environ.get('OS_AUTH_URL'), + username=os.environ.get('OS_USERNAME'), + password=os.environ.get('OS_PASSWORD'), + project_name=os.environ.get('OS_PROJECT_NAME'), project_domain_id='default', user_domain_id='default') diff --git a/doc/examples/zone_create_primary.py b/doc/examples/zone_create_primary.py index 91d822c..2ebc404 100644 --- a/doc/examples/zone_create_primary.py +++ b/doc/examples/zone_create_primary.py @@ -1,9 +1,9 @@ from __future__ import print_function import logging +import os from designateclient import exceptions -from designateclient import shell from designateclient.v2 import client from keystoneauth1.identity import generic @@ -13,10 +13,10 @@ from keystoneauth1 import session as keystone_session logging.basicConfig(level='DEBUG') auth = generic.Password( - auth_url=shell.env('OS_AUTH_URL'), - username=shell.env('OS_USERNAME'), - password=shell.env('OS_PASSWORD'), - project_name=shell.env('OS_PROJECT_NAME'), + auth_url=os.environ.get('OS_AUTH_URL'), + username=os.environ.get('OS_USERNAME'), + password=os.environ.get('OS_PASSWORD'), + project_name=os.environ.get('OS_PROJECT_NAME'), project_domain_id='default', user_domain_id='default') diff --git a/doc/examples/zone_create_secondary.py b/doc/examples/zone_create_secondary.py index 876d1ba..febbe90 100644 --- a/doc/examples/zone_create_secondary.py +++ b/doc/examples/zone_create_secondary.py @@ -1,21 +1,20 @@ import logging +import os import uuid from keystoneauth1.identity import generic from keystoneauth1 import session as keystone_session -from designateclient import exceptions -from designateclient import shell from designateclient.v2 import client logging.basicConfig(level='DEBUG') auth = generic.Password( - auth_url=shell.env('OS_AUTH_URL'), - username=shell.env('OS_USERNAME'), - password=shell.env('OS_PASSWORD'), - project_name=shell.env('OS_PROJECT_NAME'), + auth_url=os.environ.get('OS_AUTH_URL'), + username=os.environ.get('OS_USERNAME'), + password=os.environ.get('OS_PASSWORD'), + project_name=os.environ.get('OS_PROJECT_NAME'), project_domain_id='default', user_domain_id='default') diff --git a/doc/examples/zone_list_nameservers.py b/doc/examples/zone_list_nameservers.py index 1ee4f8e..b1136e7 100644 --- a/doc/examples/zone_list_nameservers.py +++ b/doc/examples/zone_list_nameservers.py @@ -1,9 +1,8 @@ import logging +import os import uuid from designateclient.v2 import client -from designateclient import shell -from designateclient import utils from keystoneauth1.identity import generic from keystoneauth1 import session as keystone_session @@ -12,10 +11,10 @@ from keystoneauth1 import session as keystone_session logging.basicConfig(level='DEBUG') auth = generic.Password( - auth_url=shell.env('OS_AUTH_URL'), - username=shell.env('OS_USERNAME'), - password=shell.env('OS_PASSWORD'), - project_name=shell.env('OS_PROJECT_NAME'), + auth_url=os.environ.get('OS_AUTH_URL'), + username=os.environ.get('OS_USERNAME'), + password=os.environ.get('OS_PASSWORD'), + project_name=os.environ.get('OS_PROJECT_NAME'), project_domain_id='default', user_domain_id='default') diff --git a/doc/examples/zone_list_paging.py b/doc/examples/zone_list_paging.py index f62f6d9..e16227b 100644 --- a/doc/examples/zone_list_paging.py +++ b/doc/examples/zone_list_paging.py @@ -1,19 +1,19 @@ from __future__ import print_function import logging +import os from keystoneauth1.identity import generic from keystoneauth1 import session as keystone_session -from designateclient import shell from designateclient.v2 import client logging.basicConfig(level='DEBUG') auth = generic.Password( - auth_url=shell.env('OS_AUTH_URL'), - username=shell.env('OS_USERNAME'), - password=shell.env('OS_PASSWORD'), - project_name=shell.env('OS_PROJECT_NAME'), + auth_url=os.environ.get('OS_AUTH_URL'), + username=os.environ.get('OS_USERNAME'), + password=os.environ.get('OS_PASSWORD'), + project_name=os.environ.get('OS_PROJECT_NAME'), project_domain_id='default', user_domain_id='default') diff --git a/doc/requirements.txt b/doc/requirements.txt index 68773f5..fea43a0 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -3,4 +3,5 @@ # process, which may cause wedges in the gate later. sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD +reno>=2.7.0 # Apache-2.0 openstackdocstheme>=1.18.1 # Apache-2.0 diff --git a/doc/source/cli/index.rst b/doc/source/cli/index.rst deleted file mode 100644 index 9a925ed..0000000 --- a/doc/source/cli/index.rst +++ /dev/null @@ -1,958 +0,0 @@ -.. ################################################### -.. ## WARNING ###################################### -.. ############## WARNING ########################## -.. ########################## WARNING ############## -.. ###################################### WARNING ## -.. ################################################### -.. ################################################### -.. ## -.. This file is tool-generated. Do not edit manually. -.. http://docs.openstack.org/contributor-guide/ -.. doc-tools/cli-reference.html -.. ## -.. ## WARNING ###################################### -.. ############## WARNING ########################## -.. ########################## WARNING ############## -.. ###################################### WARNING ## -.. ################################################### - -=========================================== -DNS service (designate) command-line client -=========================================== - -The designate client is the command-line interface (CLI) for -the DNS service (designate) API and its extensions. - -This chapter documents :command:`designate` version ``2.6.0``. - -For help on a specific :command:`designate` command, enter: - -.. code-block:: console - - $ designate help COMMAND - -.. _designate_command_usage: - -designate usage -~~~~~~~~~~~~~~~ - -.. code-block:: console - - usage: designate [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug] - [--os-username OS_USERNAME] [--os-user-id OS_USER_ID] - [--os-user-domain-id OS_USER_DOMAIN_ID] - [--os-user-domain-name OS_USER_DOMAIN_NAME] - [--os-password OS_PASSWORD] [--os-tenant-name OS_TENANT_NAME] - [--os-tenant-id OS_TENANT_ID] - [--os-project-name OS_PROJECT_NAME] - [--os-domain-name OS_DOMAIN_NAME] - [--os-domain-id OS_DOMAIN_ID] [--os-project-id OS_PROJECT_ID] - [--os-project-domain-id OS_PROJECT_DOMAIN_ID] - [--os-project-domain-name OS_PROJECT_DOMAIN_NAME] - [--os-auth-url OS_AUTH_URL] [--os-region-name OS_REGION_NAME] - [--os-token OS_TOKEN] [--os-endpoint OS_ENDPOINT] - [--os-endpoint-type OS_ENDPOINT_TYPE] - [--os-service-type OS_SERVICE_TYPE] [--os-cacert OS_CACERT] - [--insecure] [--all-tenants] [--edit-managed] - -.. _designate_command_options: - -designate optional arguments -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -``--version`` - show program's version number and exit - -``-v, --verbose`` - Increase verbosity of output. Can be repeated. - -``-q, --quiet`` - Suppress output except warnings and errors. - -``--log-file LOG_FILE`` - Specify a file to log output. Disabled by default. - -``-h, --help`` - Show help message and exit. - -``--debug`` - Show tracebacks on errors. - -``--os-username OS_USERNAME`` - Name used for authentication with the OpenStack - Identity service. Defaults to ``env[OS_USERNAME]``. - -``--os-user-id OS_USER_ID`` - User ID used for authentication with the OpenStack - Identity service. Defaults to ``env[OS_USER_ID]``. - -``--os-user-domain-id OS_USER_DOMAIN_ID`` - Defaults to ``env[OS_USER_DOMAIN_ID]``. - -``--os-user-domain-name OS_USER_DOMAIN_NAME`` - Defaults to ``env[OS_USER_DOMAIN_NAME]``. - -``--os-password OS_PASSWORD`` - Password used for authentication with the OpenStack - Identity service. Defaults to ``env[OS_PASSWORD]``. - -``--os-tenant-name OS_TENANT_NAME`` - Tenant to request authorization on. Defaults to - ``env[OS_TENANT_NAME]``. - -``--os-tenant-id OS_TENANT_ID`` - Tenant to request authorization on. Defaults to - ``env[OS_TENANT_ID]``. - -``--os-project-name OS_PROJECT_NAME`` - Project to request authorization on. Defaults to - ``env[OS_PROJECT_NAME]``. - -``--os-domain-name OS_DOMAIN_NAME`` - Project to request authorization on. Defaults to - ``env[OS_DOMAIN_NAME]``. - -``--os-domain-id OS_DOMAIN_ID`` - Defaults to ``env[OS_DOMAIN_ID]``. - -``--os-project-id OS_PROJECT_ID`` - Project to request authorization on. Defaults to - ``env[OS_PROJECT_ID]``. - -``--os-project-domain-id OS_PROJECT_DOMAIN_ID`` - Defaults to ``env[OS_PROJECT_DOMAIN_ID]``. - -``--os-project-domain-name OS_PROJECT_DOMAIN_NAME`` - Defaults to ``env[OS_PROJECT_DOMAIN_NAME]``. - -``--os-auth-url OS_AUTH_URL`` - Specify the Identity endpoint to use for - authentication. Defaults to ``env[OS_AUTH_URL]``. - -``--os-region-name OS_REGION_NAME`` - Specify the region to use. Defaults to - ``env[OS_REGION_NAME]``. - -``--os-token OS_TOKEN`` - Specify an existing token to use instead of retrieving - one via authentication (e.g. with username & - password). Defaults to ``env[OS_SERVICE_TOKEN]``. - -``--os-endpoint OS_ENDPOINT`` - Specify an endpoint to use instead of retrieving one - from the service catalog (via authentication). - Defaults to ``env[OS_DNS_ENDPOINT]``. - -``--os-endpoint-type OS_ENDPOINT_TYPE`` - Defaults to ``env[OS_ENDPOINT_TYPE]``. - -``--os-service-type OS_SERVICE_TYPE`` - Defaults to ``env[OS_DNS_SERVICE_TYPE]``, or 'dns'. - -``--os-cacert OS_CACERT`` - CA certificate bundle file. Defaults to - ``env[OS_CACERT]``. - -``--insecure`` - Explicitly allow 'insecure' SSL requests. - -``--all-tenants`` - Allows to list all domains from all tenants. - -``--edit-managed`` - Allows to edit records that are marked as managed. - -.. _designate_diagnostics-ping: - -designate diagnostics-ping --------------------------- - -.. code-block:: console - - usage: designate diagnostics-ping [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] - [--prefix PREFIX] --service SERVICE --host - HOST - -Ping a service on a given host - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -``--service SERVICE`` - Service name (e.g. central) - -``--host HOST`` - Hostname - -.. _designate_domain-create: - -designate domain-create ------------------------ - -.. code-block:: console - - usage: designate domain-create [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - --name NAME --email EMAIL [--ttl TTL] - [--description DESCRIPTION] - -Create Domain - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -``--name NAME`` - Domain name. - -``--email EMAIL`` - Domain email. - -``--ttl TTL`` - Time to live (seconds). - -``--description DESCRIPTION`` - Description. - -.. _designate_domain-delete: - -designate domain-delete ------------------------ - -.. code-block:: console - - usage: designate domain-delete [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - id - -Delete Domain - -**Positional arguments:** - -``id`` - Domain ID or name. - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_domain-get: - -designate domain-get --------------------- - -.. code-block:: console - - usage: designate domain-get [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - id - -Get Domain - -**Positional arguments:** - -``id`` - Domain ID or name. - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_domain-list: - -designate domain-list ---------------------- - -.. code-block:: console - - usage: designate domain-list [-h] [-f {csv,html,json,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] - [--quote {all,minimal,none,nonnumeric}] - -List Domains - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_domain-servers-list: - -designate domain-servers-list ------------------------------ - -.. code-block:: console - - usage: designate domain-servers-list [-h] - [-f {csv,html,json,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] - [--quote {all,minimal,none,nonnumeric}] - id - -List Domain Servers - -**Positional arguments:** - -``id`` - Domain ID or name. - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_domain-update: - -designate domain-update ------------------------ - -.. code-block:: console - - usage: designate domain-update [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - [--name NAME] [--email EMAIL] [--ttl TTL] - [--description DESCRIPTION | --no-description] - id - -Update Domain - -**Positional arguments:** - -``id`` - Domain ID or name. - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -``--name NAME`` - Domain name. - -``--email EMAIL`` - Domain email. - -``--ttl TTL`` - Time to live (seconds). - -``--description DESCRIPTION`` - Description. - -``--no-description`` - -.. _designate_quota-get: - -designate quota-get -------------------- - -.. code-block:: console - - usage: designate quota-get [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] [--print-empty] - [--noindent] [--prefix PREFIX] - tenant_id - -Get Quota - -**Positional arguments:** - -``tenant_id`` - Tenant ID - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_quota-reset: - -designate quota-reset ---------------------- - -.. code-block:: console - - usage: designate quota-reset [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - tenant_id - -Reset Quota - -**Positional arguments:** - -``tenant_id`` - Tenant ID. - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_quota-update: - -designate quota-update ----------------------- - -.. code-block:: console - - usage: designate quota-update [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - [--domains DOMAINS] - [--domain-recordsets DOMAIN_RECORDSETS] - [--recordset-records RECORDSET_RECORDS] - [--domain-records DOMAIN_RECORDS] - [--api-export-size API_EXPORT_SIZE] - tenant_id - -Update Quota - -**Positional arguments:** - -``tenant_id`` - Tenant ID. - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -``--domains DOMAINS`` - Allowed domains. - -``--domain-recordsets DOMAIN_RECORDSETS`` - Allowed domain records. - -``--recordset-records RECORDSET_RECORDS`` - Allowed recordset records. - -``--domain-records DOMAIN_RECORDS`` - Allowed domain records. - -``--api-export-size API_EXPORT_SIZE`` - Allowed zone export recordsets. - -.. _designate_record-create: - -designate record-create ------------------------ - -.. code-block:: console - - usage: designate record-create [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - --name NAME --type TYPE --data DATA [--ttl TTL] - [--priority PRIORITY] - [--description DESCRIPTION] - domain_id - -Create Record - -**Positional arguments:** - -``domain_id`` - Domain ID or name. - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -``--name NAME`` - Record (relative|absolute) name. - -``--type TYPE`` - Record type. - -``--data DATA`` - Record data. - -``--ttl TTL`` - Record TTL. - -``--priority PRIORITY`` - Record priority. - -``--description DESCRIPTION`` - Description. - -.. _designate_record-delete: - -designate record-delete ------------------------ - -.. code-block:: console - - usage: designate record-delete [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - domain_id id - -Delete Record - -**Positional arguments:** - -``domain_id`` - Domain ID or name. - -``id`` - Record ID. - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_record-get: - -designate record-get --------------------- - -.. code-block:: console - - usage: designate record-get [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - domain_id id - -Get Record - -**Positional arguments:** - -``domain_id`` - Domain ID or name. - -``id`` - Record ID. - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_record-list: - -designate record-list ---------------------- - -.. code-block:: console - - usage: designate record-list [-h] [-f {csv,html,json,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] - [--quote {all,minimal,none,nonnumeric}] - domain_id - -List Records - -**Positional arguments:** - -``domain_id`` - Domain ID or name. - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_record-update: - -designate record-update ------------------------ - -.. code-block:: console - - usage: designate record-update [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - [--name NAME] [--type TYPE] [--data DATA] - [--description DESCRIPTION | --no-description] - [--ttl TTL | --no-ttl] - [--priority PRIORITY | --no-priority] - domain_id id - -Update Record - -**Positional arguments:** - -``domain_id`` - Domain ID or name. - -``id`` - Record ID. - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -``--name NAME`` - Record name. - -``--type TYPE`` - Record type. - -``--data DATA`` - Record data. - -``--description DESCRIPTION`` - Description. - -``--no-description`` - -``--ttl TTL`` - Record time to live (seconds). - -``--no-ttl`` - -``--priority PRIORITY`` - Record priority. - -``--no-priority`` - -.. _designate_report-count-all: - -designate report-count-all --------------------------- - -.. code-block:: console - - usage: designate report-count-all [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] - [--prefix PREFIX] - -Get count totals for all tenants, domains and records - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_report-count-domains: - -designate report-count-domains ------------------------------- - -.. code-block:: console - - usage: designate report-count-domains [-h] - [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] - [--prefix PREFIX] - -Get counts for total domains - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_report-count-records: - -designate report-count-records ------------------------------- - -.. code-block:: console - - usage: designate report-count-records [-h] - [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] - [--prefix PREFIX] - -Get counts for total records - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_report-count-tenants: - -designate report-count-tenants ------------------------------- - -.. code-block:: console - - usage: designate report-count-tenants [-h] - [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] - [--prefix PREFIX] - -Get counts for total tenants - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_report-tenant-domains: - -designate report-tenant-domains -------------------------------- - -.. code-block:: console - - usage: designate report-tenant-domains [-h] - [-f {csv,html,json,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] - [--quote {all,minimal,none,nonnumeric}] - --report-tenant-id REPORT_TENANT_ID - -Get a list of domains for given tenant - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -``--report-tenant-id REPORT_TENANT_ID`` - The tenant_id being reported on. - -.. _designate_report-tenants-all: - -designate report-tenants-all ----------------------------- - -.. code-block:: console - - usage: designate report-tenants-all [-h] [-f {csv,html,json,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] - [--quote {all,minimal,none,nonnumeric}] - -Get list of tenants and domain count for each - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_server-create: - -designate server-create ------------------------ - -.. code-block:: console - - usage: designate server-create [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - --name NAME - -Create Server - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -``--name NAME`` - Server name. - -.. _designate_server-delete: - -designate server-delete ------------------------ - -.. code-block:: console - - usage: designate server-delete [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - id - -Delete Server - -**Positional arguments:** - -``id`` - Server ID. - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_server-get: - -designate server-get --------------------- - -.. code-block:: console - - usage: designate server-get [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - id - -Get Server - -**Positional arguments:** - -``id`` - Server ID. - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_server-list: - -designate server-list ---------------------- - -.. code-block:: console - - usage: designate server-list [-h] [-f {csv,html,json,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] - [--quote {all,minimal,none,nonnumeric}] - -List Servers - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_server-update: - -designate server-update ------------------------ - -.. code-block:: console - - usage: designate server-update [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - [--name NAME] - id - -Update Server - -**Positional arguments:** - -``id`` - Server ID. - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -``--name NAME`` - Server name. - -.. _designate_sync-all: - -designate sync-all ------------------- - -.. code-block:: console - - usage: designate sync-all [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] [--print-empty] - [--noindent] [--prefix PREFIX] - -Sync Everything - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_sync-domain: - -designate sync-domain ---------------------- - -.. code-block:: console - - usage: designate sync-domain [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - domain_id - -Sync a single Domain - -**Positional arguments:** - -``domain_id`` - Domain ID - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_sync-record: - -designate sync-record ---------------------- - -.. code-block:: console - - usage: designate sync-record [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - domain_id record_id - -Sync a single Record - -**Positional arguments:** - -``domain_id`` - Domain ID - -``record_id`` - Record ID - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - -.. _designate_touch-domain: - -designate touch-domain ----------------------- - -.. code-block:: console - - usage: designate touch-domain [-h] [-f {html,json,shell,table,value,yaml}] - [-c COLUMN] [--max-width <integer>] - [--print-empty] [--noindent] [--prefix PREFIX] - domain_id - -Touch a single Domain - -**Positional arguments:** - -``domain_id`` - Domain ID - -**Optional arguments:** - -``-h, --help`` - show this help message and exit - diff --git a/doc/source/contributor/contributing.rst b/doc/source/contributor/contributing.rst index 7bcd144..f1b421e 100644 --- a/doc/source/contributor/contributing.rst +++ b/doc/source/contributor/contributing.rst @@ -30,4 +30,3 @@ Branch, work, & submit: git rebase -i # submit git-review - diff --git a/doc/source/index.rst b/doc/source/index.rst index 0d91923..9deab3e 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -2,28 +2,14 @@ python-designateclient ====================== -python-designateclient provides python bindings and command line tools for both -Designate v1 and v2 APIs. +python-designateclient provides python bindings and command line tools for Designate v2 APIs. The :ref:`Python API bindings <bindings>` are provided by the :program:`designateclient` module. -There are two separate command line interfaces to work with the two API -versions: - -v2: the designate plugin for the :program:`openstack` command line tool. More information can be +The designate plugin for the :program:`openstack` command line tool. More information can be found on the :ref:`designate v2 command line tool page <shell-v2>`. -v1: the :program:`designate` command line tool. More information can be found -on the :ref:`designate v1 command line tool page <shell>`. - -.. warning:: - - The V1 API was removed in Queens, and cannot be re-enabled. - The :program:`designate` command line tool will no longer function on - installs newer than Queens. - - You'll need credentials for an OpenStack cloud that implements the Designate API in order to use the client. @@ -32,7 +18,6 @@ API in order to use the client. install/index user/index - cli/index contributor/index reference/index @@ -41,5 +26,3 @@ API in order to use the client. * :ref:`genindex` * :ref:`modindex` * :ref:`search` - -.. _Cloud DNS: http://www.hpcloud.com/products-services/dns diff --git a/doc/source/user/bindings.rst b/doc/source/user/bindings.rst index 8d79032..22c8f38 100644 --- a/doc/source/user/bindings.rst +++ b/doc/source/user/bindings.rst @@ -1,11 +1,11 @@ .. _bindings: =========================== -Python Bindings - v1 and v2 +Python Bindings - v2 =========================== -The python-designateclient package comes with python bindings for both versions -of the Designate API: v1 and v2. These can be used to interact with the Designate +The python-designateclient package comes with python bindings +the Designate API: v2. This can be used to interact with the Designate API from any python program. Introduction - Bindings v2 @@ -38,502 +38,3 @@ To view examples of usage please checkout the *doc/examples* folder, basic usage zone = client.zones.create('i.io.', email='i@i.io') rs = client.recordsets.create(zone['id'], 'www', 'A', ['10.0.0.1']) - -Introduction -============ - -Below is a simple example of how to instantiate and perform basic tasks using -the bindings. - -.. code-block:: python - - #!/usr/bin/env python - from __future__ import print_function - from designateclient.v1 import Client - - - # Create an instance of the client, providing the necessary credentials - client = Client( - auth_url="https://example.com:5000/v3/", - username="openstack", - password="yadayada", - project_name="myproject", - project_domain_id='default', - user_domain_id='default') - - # Fetch a list of the domains this user/tenant has access to - domains = client.domains.list() - - # Iterate the list, printing some useful information - for domain in domains: - print("Domain ID: %s, Name: %s" % (domain.id, domain.name)) - -And the output this program might produce: - -.. code-block:: console - - $ python /tmp/example.py - Domain ID: 467f97b4-f074-4839-ae85-1a61fccfb83d, Name: example-one.com. - Domain ID: 6d3bf479-8a93-47ae-8c65-3dff8dba1b0d, Name: example-two.com. - - -Authentication -============== - -Designate supports either Keystone authentication, or no authentication at all. - -Keystone Authentication ------------------------ - -Below is a sample of standard authentication with keystone using keystoneauth -Sessions. For more information on keystoneauth API, see `Using Sessions`_. - -.. _Using Sessions: https://docs.openstack.org/keystoneauth/latest/using-sessions.html - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - from keystoneauth1.identity import generic - from keystoneauth1 import session as keystone_session - - - # Create an authentication plugin providing the necessary credentials - auth = generic.Password( - auth_url="https://example.com:5000/v3/", - username="openstack", - password="yadayada", - project_name="myproject", - project_domain_id='default', - user_domain_id='default' - ) - - session = keystone_session.Session(auth=auth) - - # Create an instance of the client, providing a keystoneauth Session - client = Client(session=session) - -Below is a sample of standard authentication with keystone, but also explicitly -providing the endpoint to use: - -.. note:: This is useful when a development Designate instances authenticates - against a production Keystone. - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - from keystoneauth1.identity import generic - from keystoneauth1 import session as keystone_session - - - # Create an authentication plugin providing the necessary credentials - auth = generic.Password( - auth_url="https://example.com:5000/v3/", - username="openstack", - password="yadayada", - project_name="myproject", - project_domain_id='default', - user_domain_id='default') - - session = keystone_session.Session(auth=auth) - - # Create an instance of the client, providing a keystoneauth Session - client = Client( - session=session, - endpoint="https://127.0.0.1:9001/v1/") - - -No Authentication ------------------ - -Below is a sample of interaction with a non authenticated designate: - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - # Create an instance of the client, providing the endpoint directly - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - -Working with Domains -==================== - -The Domain Object ------------------ - -Object Properties: - -======================= ======================================================= -Property Description -======================= ======================================================= -id Domain ID -name Domain Name (e.g. example.com.) -email Domain Responsible Person Email (e.g. fred@example.com) -ttl Default TTL for records -serial Domain Server Number -created_at Date and time this domain was created at -updated_at Date and time this domain was last updated -description Domain Description -======================= ======================================================= - -Listing Domains ---------------- - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - # List All Domains - domains = client.domains.list() - -Fetching a Domain by ID ------------------------ - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - domain_id = 'fb505f10-25df-11e3-8224-0800200c9a66' - - # Fetch the domain - domain = client.domains.get(domain_id) - - -Creating a Domain ------------------ - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - from designateclient.v1.domains import Domain - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - # Create a new Domain object - domain = Domain(name="example.com.", email="fred@example.com") - - # Send the Create Domain API call - domain = client.domains.create(domain) - -Updating a Domain ------------------ - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - domain_id = 'fb505f10-25df-11e3-8224-0800200c9a66' - - # Fetch the domain - domain = client.domains.get(domain_id) - - # Update a value on the Domain - domain.ttl = 300 - - # Send the Update Domain API call - domain = client.domains.update(domain) - -Deleting a Domain ------------------ - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - domain_id = 'fb505f10-25df-11e3-8224-0800200c9a66' - - # Fetch the domain - domains = client.domains.delete(domain_id) - -Working with Records -==================== - -The Record Object ------------------ - -Object Properties: - -======================= ======================================================= -Property Description -======================= ======================================================= -id Record ID -domain_id Domain ID -name Record Name (e.g. example.com.) -type Record Type (e.g. A, AAAA, CNAME, MX, SRV etc) -data Record Data (e.g. 127.0.0.1) -priority Rercord Priority (Valid only for MX and SRV records) -ttl Record TTL -created_at Date and time this record was created at -updated_at Date and time this record was last updated -description Record Description -======================= ======================================================= - -Listing Records ---------------- - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - domain_id = 'fb505f10-25df-11e3-8224-0800200c9a66' - - # List All Records - records = client.records.list(domain_id) - -Fetching a Record by ID ------------------------ - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - domain_id = 'fb505f10-25df-11e3-8224-0800200c9a66' - record_id = 'bd3e8520-25e0-11e3-8224-0800200c9a66' - - # Fetch the record - records = client.records.get(domain_id, record_id) - - -Creating a Record ------------------ - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - from designateclient.v1.records import Record - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - domain_id = 'fb505f10-25df-11e3-8224-0800200c9a66' - - # Create a new Record object - record = Record(name="www.example.com.", type="A", data="127.0.0.1") - - # Send the Create Record API call - record = client.records.create(domain_id, record) - -Updating a Record ------------------ - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - domain_id = 'fb505f10-25df-11e3-8224-0800200c9a66' - record_id = 'bd3e8520-25e0-11e3-8224-0800200c9a66' - - # Fetch the record - record = client.records.get(record_id) - - # Update a value on the Record - record.ttl = 300 - - # Send the Update Record API call - record = client.records.update(domain_id, record) - -Deleting a Record ------------------ - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - domain_id = 'fb505f10-25df-11e3-8224-0800200c9a66' - record_id = 'bd3e8520-25e0-11e3-8224-0800200c9a66' - - # Fetch the record - records = client.records.delete(domain_id, record_id) - -Working with Servers -==================== - -The Server Object ------------------ - -Object Properties: - -======================= ======================================================= -Property Description -======================= ======================================================= -id Server ID -name Server Name (e.g. example.com.) -created_at Date and time this server was created at -updated_at Date and time this server was last updated -======================= ======================================================= - -Listing Servers ---------------- - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - # List All Servers - servers = client.servers.list() - -Fetching a Server by ID ------------------------ - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - server_id = 'fb505f10-25df-11e3-8224-0800200c9a66' - - # Fetch the server - server = client.servers.get(server_id) - - -Creating a Server ------------------ - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - from designateclient.v1.servers import Server - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - # Create a new Server object - server = Server(name="ns1.example.com.") - - # Send the Create Server API call - server = client.servers.create(server) - -Updating a Server ------------------ - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - server_id = 'fb505f10-25df-11e3-8224-0800200c9a66' - - # Fetch the server - server = client.servers.get(server_id) - - # Update a value on the Server - server.name = "ns2.example.com" - - # Send the Update Server API call - server = client.servers.update(server) - -Deleting a Server ------------------ - -.. code-block:: python - - #!/usr/bin/env python - - from designateclient.v1 import Client - - # Create an instance of the client - client = Client( - endpoint="https://127.0.0.1:9001/v1/" - ) - - server_id = 'fb505f10-25df-11e3-8224-0800200c9a66' - - # Fetch the server - servers = client.servers.delete(server_id) diff --git a/doc/source/user/index.rst b/doc/source/user/index.rst index 2602651..bfc041f 100644 --- a/doc/source/user/index.rst +++ b/doc/source/user/index.rst @@ -6,5 +6,3 @@ bindings shell-v2 - shell - shell-examples diff --git a/doc/source/user/shell-examples.rst b/doc/source/user/shell-examples.rst deleted file mode 100644 index 3213fb1..0000000 --- a/doc/source/user/shell-examples.rst +++ /dev/null @@ -1,132 +0,0 @@ -==================================== -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 | - +-------------------+-------+ diff --git a/doc/source/user/shell.rst b/doc/source/user/shell.rst deleted file mode 100644 index 3217ae6..0000000 --- a/doc/source/user/shell.rst +++ /dev/null @@ -1,248 +0,0 @@ -.. _shell: - -========================================================= -Designate Command Line Tool (compatible with v1 API only) -========================================================= - -.. warning:: This page refers to command that use the V1 API, which is currently disabled, and will be removed in a future release - -The python-designateclient package comes with a command line tool (installed as :program:`designate`), 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. - -Credentials ------------ - -As with any OpenStack utility, :program:`designate` requires certain information to -talk to the REST API, username, password, auth url (from where the other required -endpoints are retrieved once you are authenticated). - -To provide your access credentials (username, password, tenant name or tenant id) -you can pass them on the command line with the ``--os-username``, ``--os-password``, ``--os-tenant-name`` or ``--os-tenant-id`` -params, but it's easier to just set them as environment variables:: - - export OS_USERNAME=openstack - export OS_PASSWORD=yadayada - export OS_TENANT_NAME=myproject - export OS_TENANT_ID=123456789 - -You will also need to define the authentication url with ``--os-auth-url`` -or set is as an environment variable as well:: - - export OS_AUTH_URL=https://example.com:5000/v2.0/ - -Since Keystone can return multiple regions in the Service Catalog, you -can specify the one you want with ``--os-region-name`` (or -``export OS_REGION_NAME``). It defaults to the first in the list returned. - -Using the command line tool ---------------------------- - -With enough details now in the environment, you can use the designate client to create a domain and populate it with some records: - -.. code-block:: shell-session - - $ designate domain-create --name example.com. --email admin@example.com - +-------------+--------------------------------------+ - | Field | Value | - +-------------+--------------------------------------+ - | description | None | - | created_at | 2013-09-19T11:45:25.295355 | - | updated_at | None | - | email | admin@example.com | - | ttl | 3600 | - | serial | 1379591125 | - | id | eacbe2a5-95f1-4a9f-89f5-b9c58009b163 | - | name | example.com. | - +-------------+--------------------------------------+ - -Now that the domain has been created, we can start adding records. - -You'll note that the name (www.example.com) has a trailing ``.``, as per the DNS standard, we didn't set a TTL and we had to specify the parent -zone/domain by domain_id ``eacbe2a5-95f1-4a9f-89f5-b9c58009b163``. - -.. code-block:: shell-session - - $ designate record-create eacbe2a5-95f1-4a9f-89f5-b9c58009b163 --name www.example.com. --type A --data 1.2.3.4 - +-------------+--------------------------------------+ - | Field | Value | - +-------------+--------------------------------------+ - | name | www.example.com. | - | data | 1.2.3.4 | - | created_at | 2013-09-19T13:44:42.295428 | - | updated_at | None | - | id | 147f6082-8466-4951-8d13-37a10e92b11e | - | priority | None | - | ttl | None | - | type | A | - | domain_id | eacbe2a5-95f1-4a9f-89f5-b9c58009b163 | - | description | None | - +-------------+--------------------------------------+ - -subcommands ------------ - -We've already seen the ``domain-create`` and ``record-create`` subcommands, here the full list of subcommands: - -======================= ====================================================== =============== -subcommand Notes Admin Required -======================= ====================================================== =============== -complete print bash completion command -diagnostics-ping Ping a service on a given host -domain-create Create Domain -domain-delete Delete Domain -domain-get Get Domain -domain-list List Domains -domain-servers-list List Domain Servers -domain-update Update Domain -help print detailed help for another command -quota-get Get Quota -quota-reset Reset Quota -quota-update Update Quota -record-create Create Record -record-delete Delete Record -record-get Get Record -record-list List Records -record-update Update Record -report-count-all Get count totals for all tenants, domains and records -report-count-domains Get counts for total domains -report-count-records Get counts for total records -report-count-tenants Get counts for total tenants -report-tenant-domains Get a list of domains for given tenant -report-tenants-all Get list of tenants and domain count for each -server-create Create Server -server-delete Delete Server -server-get Get Server -server-list List Servers -server-update Update Server -sync-all Sync Everything -sync-domain Sync a single Domain -sync-record Sync a single Record -touch-domain Touch a single Domain - -======================= ====================================================== =============== - -Builtin designate documentation -------------------------------- - -You'll find complete documentation on the shell by running -``designate --help``: - -usage: designate [--version] [-v] [--log-file LOG_FILE] [-q] [-h] [--debug] - [--os-username OS_USERNAME] [--os-user-id OS_USER_ID] - [--os-user-domain-id OS_USER_DOMAIN_ID] - [--os-user-domain-name OS_USER_DOMAIN_NAME] - [--os-password OS_PASSWORD] [--os-tenant-name OS_TENANT_NAME] - [--os-tenant-id OS_TENANT_ID] - [--os-project-name OS_PROJECT_NAME] - [--os-domain-name OS_DOMAIN_NAME] - [--os-domain-id OS_DOMAIN_ID] [--os-project-id OS_PROJECT_ID] - [--os-project-domain-id OS_PROJECT_DOMAIN_ID] - [--os-project-domain-name OS_PROJECT_DOMAIN_NAME] - [--os-auth-url OS_AUTH_URL] [--os-region-name OS_REGION_NAME] - [--os-token OS_TOKEN] [--os-endpoint OS_ENDPOINT] - [--os-endpoint-type OS_ENDPOINT_TYPE] - [--os-service-type OS_SERVICE_TYPE] [--os-cacert OS_CACERT] - [--insecure] [--all-tenants] [--edit-managed] - -Designate Client - -optional arguments: - --version show program's version number and exit - -v, --verbose Increase verbosity of output. Can be repeated. - --log-file LOG_FILE Specify a file to log output. Disabled by default. - -q, --quiet Suppress output except warnings and errors. - -h, --help Show this help message and exit. - --debug Show tracebacks on errors. - --os-username OS_USERNAME - Name used for authentication with the OpenStack - Identity service. Defaults to env[OS_USERNAME]. - --os-user-id OS_USER_ID - User ID used for authentication with the OpenStack - Identity service. Defaults to env[OS_USER_ID]. - --os-user-domain-id OS_USER_DOMAIN_ID - Defaults to env[OS_USER_DOMAIN_ID]. - --os-user-domain-name OS_USER_DOMAIN_NAME - Defaults to env[OS_USER_DOMAIN_NAME]. - --os-password OS_PASSWORD - Password used for authentication with the OpenStack - Identity service. Defaults to env[OS_PASSWORD]. - --os-tenant-name OS_TENANT_NAME - Tenant to request authorization on. Defaults to - env[OS_TENANT_NAME]. - --os-tenant-id OS_TENANT_ID - Tenant to request authorization on. Defaults to - env[OS_TENANT_ID]. - --os-project-name OS_PROJECT_NAME - Project to request authorization on. Defaults to - env[OS_PROJECT_NAME]. - --os-domain-name OS_DOMAIN_NAME - Project to request authorization on. Defaults to - env[OS_DOMAIN_NAME]. - --os-domain-id OS_DOMAIN_ID - Defaults to env[OS_DOMAIN_ID]. - --os-project-id OS_PROJECT_ID - Project to request authorization on. Defaults to - env[OS_PROJECT_ID]. - --os-project-domain-id OS_PROJECT_DOMAIN_ID - Defaults to env[OS_PROJECT_DOMAIN_ID]. - --os-project-domain-name OS_PROJECT_DOMAIN_NAME - Defaults to env[OS_PROJECT_DOMAIN_NAME]. - --os-auth-url OS_AUTH_URL - Specify the Identity endpoint to use for - authentication. Defaults to env[OS_AUTH_URL]. - --os-region-name OS_REGION_NAME - Specify the region to use. Defaults to - env[OS_REGION_NAME]. - --os-token OS_TOKEN Specify an existing token to use instead of retrieving - one via authentication (e.g. with username & - password). Defaults to env[OS_SERVICE_TOKEN]. - --os-endpoint OS_ENDPOINT - Specify an endpoint to use instead of retrieving one - from the service catalog (via authentication). - Defaults to env[OS_DNS_ENDPOINT]. - --os-endpoint-type OS_ENDPOINT_TYPE - Defaults to env[OS_ENDPOINT_TYPE]. - --os-service-type OS_SERVICE_TYPE - Defaults to env[OS_DNS_SERVICE_TYPE], or 'dns'. - --os-cacert OS_CACERT - CA certificate bundle file. Defaults to - env[OS_CACERT]. - --insecure Explicitly allow 'insecure' SSL requests. - --all-tenants Allows to list all domains from all tenants. - --edit-managed Allows to edit records that are marked as managed. - - -Commands: - complete print bash completion command - diagnostics-ping Ping a service on a given host - domain-create Create Domain - domain-delete Delete Domain - domain-get Get Domain - domain-list List Domains - domain-servers-list List Domain Servers - domain-update Update Domain - help print detailed help for another command - quota-get Get Quota - quota-reset Reset Quota - quota-update Update Quota - record-create Create Record - record-delete Delete Record - record-get Get Record - record-list List Records - record-update Update Record - report-count-all Get count totals for all tenants, domains and records - report-count-domains Get counts for total domains - report-count-records Get counts for total records - report-count-tenants Get counts for total tenants - report-tenant-domains Get a list of domains for given tenant - report-tenants-all Get list of tenants and domain count for each - server-create Create Server - server-delete Delete Server - server-get Get Server - server-list List Servers - server-update Update Server - sync-all Sync Everything - sync-domain Sync a single Domain - sync-record Sync a single Record - touch-domain Touch a single Domain |