Add Tld to api-ref docs

Change-Id: Id0ca82527fd1cbc1bde28606aeac1dace4a2147d
This commit is contained in:
sonu.kumar 2016-05-18 15:34:06 +09:00 committed by sonu
parent 91795bf367
commit 49effdd966
8 changed files with 339 additions and 0 deletions

View File

@ -0,0 +1,235 @@
===
Tld
===
Tld operations.
Create Tld
==========
.. rest_method:: POST /v2/tlds
Create a tld
Normal response codes: 201
Error response codes:409,405,404,403,401,400,503,
Request
-------
.. rest_parameters:: parameters.yaml
- x-auth-token: x-auth-token
- x-auth-all-projects: x-auth-all-projects
- x-auth-sudo-project-id: x-auth-sudo-project-id
- name: tld_name
- description: tld_description
Request Example
---------------
.. literalinclude:: samples/tlds/create-tld-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- x-openstack-request-id: x-openstack-request-id
- id: id
- name: tld_name
- description: tld_description
- created_at: created_at
- updated_at: updated_at
- links: links
Response Example
----------------
.. literalinclude:: samples/tlds/tld-response.json
:language: javascript
Show Tld
========
.. rest_method:: GET /v2/tlds/{tld_id}
Show a tld
Normal response codes: 200
Error response codes:405,404,403,401,400,503
Request
-------
.. rest_parameters:: parameters.yaml
- x-auth-token: x-auth-token
- x-auth-all-projects: x-auth-all-projects
- x-auth-sudo-project-id: x-auth-sudo-project-id
- tld_id: tld_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- x-openstack-request-id: x-openstack-request-id
- id: id
- name: tld_name
- description: tld_description
- created_at: created_at
- updated_at: updated_at
- links: links
Response Example
----------------
.. literalinclude:: samples/tlds/tld-response.json
:language: javascript
List Tlds
=========
.. rest_method:: GET /v2/tlds
List the tlds associated with the Project
Normal response codes: 200
Error response codes:405,403,401,400,503
Request
-------
.. rest_parameters:: parameters.yaml
- x-auth-token: x-auth-token
- x-auth-all-projects: x-auth-all-projects
- x-auth-sudo-project-id: x-auth-sudo-project-id
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
- name: tld_name_filter
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- x-openstack-request-id: x-openstack-request-id
- id: id
- name: tld_name
- description: tld_description
- created_at: created_at
- updated_at: updated_at
- links: links
Response Example
----------------
.. literalinclude:: samples/tlds/list-tlds-response.json
:language: javascript
Update Tld
==========
.. rest_method:: PATCH /v2/tlds/{tld_id}
Update a tld
Normal response codes: 200
Error response codes:405,404,403,401,400,503,
Request
-------
.. rest_parameters:: parameters.yaml
- x-auth-token: x-auth-token
- x-auth-all-projects: x-auth-all-projects
- x-auth-sudo-project-id: x-auth-sudo-project-id
- tld_id: tld_id
- name: tld_name
- description: tld_description
Request Example
---------------
.. literalinclude:: samples/tlds/update-tld-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- x-openstack-request-id: x-openstack-request-id
- id: id
- name: tld_name
- description: tld_description
- created_at: created_at
- updated_at: updated_at
- links: links
Response Example
----------------
.. literalinclude:: samples/tlds/update-tld-response.json
:language: javascript
Delete Tld
==========
.. rest_method:: DELETE /v2/tlds/{tld_id}
Delete a tld
Normal response codes: 204
Error response codes:405,404,403,401,400,503,
Request
-------
.. rest_parameters:: parameters.yaml
- x-auth-token: x-auth-token
- x-auth-all-projects: x-auth-all-projects
- x-auth-sudo-project-id: x-auth-sudo-project-id
- tld_id: tld_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- x-openstack-request-id: x-openstack-request-id

View File

@ -16,3 +16,4 @@
.. include:: dns-api-v2-recordset.inc .. include:: dns-api-v2-recordset.inc
.. include:: dns-api-v2-pool.inc .. include:: dns-api-v2-pool.inc
.. include:: dns-api-v2-limits.inc .. include:: dns-api-v2-limits.inc
.. include:: dns-api-v2-tld.inc

View File

@ -864,6 +864,55 @@ pool_attributes:
required: true required: true
type: object type: object
#############################
# Tld Variables #
#############################
# Header Variables
###################
# Path Variables
#################
tld_id:
description: |
ID for this tld
in: path
required: true
type: uuid
# Query Variables
##################
# Filters
tld_name_filter:
description: |
Filter results to only show tlds that have a name matching the filter
in: query
required: false
type: string
# Body Variables
#################
tld_name:
description: |
Name for this tld
in: body
required: true
type: string
tld_description:
description: |
Description for this tld
in: body
required: false
type: string
############################# #############################
# <ITEM> Variables # # <ITEM> Variables #
############################# #############################

View File

@ -0,0 +1,4 @@
{
"name" : "com",
"description" : "tld description"
}

View File

@ -0,0 +1,26 @@
{
"tlds": [
{
"name": "edu",
"links": {
"self": "http://192.168.11.182:9001/v2/tlds/a7bba387-712b-4b42-9368-4508642c6113"
},
"created_at": "2016-05-10 05:21:40",
"updated_at": null,
"id": "a7bba387-712b-4b42-9368-4508642c6113",
"description": "demo TLD"
},
{
"name": "com",
"links": {
"self": "http://192.168.11.182:9001/v2/tlds/cfee7486-7ce4-4851-9c38-7b0fe3d42ee9"
},
"created_at": "2016-05-18 05:07:58",
"updated_at": null,
"id": "cfee7486-7ce4-4851-9c38-7b0fe3d42ee9",
"description": "tld description"
}
],
"links": {"self": "http://192.168.11.182:9001/v2/tlds"
}
}

View File

@ -0,0 +1,10 @@
{
"name": "com",
"links": {
"self": "http://192.168.11.182:9001/v2/tlds/cfee7486-7ce4-4851-9c38-7b0fe3d42ee9"
},
"created_at": "2016-05-18 05:07:58",
"updated_at": null,
"id": "cfee7486-7ce4-4851-9c38-7b0fe3d42ee9",
"description": "tld description"
}

View File

@ -0,0 +1,4 @@
{
"name" : "org",
"description" : "Updated the name from com to org"
}

View File

@ -0,0 +1,10 @@
{
"name": "org",
"links": {
"self": "http://192.168.11.182:9001/v2/tlds/cfee7486-7ce4-4851-9c38-7b0fe3d42ee9"
},
"created_at": "2016-05-18 05:07:58",
"updated_at": "2016-05-18 05:45:24",
"id": "cfee7486-7ce4-4851-9c38-7b0fe3d42ee9",
"description": "Updated the name from com to org"
}