Add Pools to API-Ref Docs

Change-Id: Idc2340d5710be4686916c709354d8dc7e1725d73
This commit is contained in:
Graham Hayes 2016-05-16 18:41:19 +01:00
parent 21569891c7
commit 773528d7ca
5 changed files with 220 additions and 1 deletions

View File

@ -0,0 +1,102 @@
=====
Pools
=====
Get information about the pools in a designate install
List all Pools
==============
.. rest_method:: GET /v2/pools
Create a zone
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
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- x-openstack-request-id: x-openstack-request-id
- description: description
- id: pool_id
- attributes: pool_attributes
- project_id: project_id
- ns_records: pool_ns_records
- name: pool_name
- created_at: created_at
- updated_at: updated_at
- links: links
- metadata: metadata
Response Example
----------------
.. literalinclude:: samples/pools/list-pools-response.json
:language: javascript
Show a Pool
===========
.. rest_method:: GET /v2/pools/{pool_id}
Create a zone
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
- pool_id: path_pool_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- x-openstack-request-id: x-openstack-request-id
- description: description
- id: pool_id
- attributes: pool_attributes
- project_id: project_id
- ns_records: pool_ns_records
- name: pool_name
- created_at: created_at
- updated_at: updated_at
- links: links
- metadata: metadata
Response Example
----------------
.. literalinclude:: samples/pools/show-pool-response.json
:language: javascript

View File

@ -13,4 +13,5 @@
.. include:: dns-api-v2-zone-ownership-transfer-request.inc .. include:: dns-api-v2-zone-ownership-transfer-request.inc
.. include:: dns-api-v2-zone-ownership-transfer-accept.inc .. include:: dns-api-v2-zone-ownership-transfer-accept.inc
.. include:: dns-api-v2-recordset.inc .. include:: dns-api-v2-recordset.inc
.. include:: dns-api-v2-pool.inc
.. include:: dns-api-v2-limits.inc .. include:: dns-api-v2-limits.inc

View File

@ -658,7 +658,7 @@ path_zone_transfer_request_id:
required: true required: true
type: uuid type: uuid
path_zone_accept_request_id: path_zone_transfer_accept_id:
description: | description: |
ID for this zone transfer accept ID for this zone transfer accept
in: path in: path
@ -812,6 +812,58 @@ min_ttl:
required: true required: true
type: integer type: integer
#############################
# Pool Variables #
#############################
# Header Variables
###################
# Path Variables
#################
path_pool_id:
description: |
ID for this pool
in: path
required: true
type: uuid
# Query Variables
##################
# Body Variables
#################
pool_id:
description: |
ID for this pool
in: path
required: true
type: uuid
pool_name:
description: |
Name for this pool
in: path
required: true
type: string
pool_ns_records:
description: |
Name Servers for this pool. Any zones hosted by this pool should be delegated to these DNS servers
in: path
required: true
type: string
pool_attributes:
description: >
Key:Value pairs of information about this pool. This information can be used by the scheduler to place zones on the correct pools
in: path
required: true
type: object
############################# #############################
# <ITEM> Variables # # <ITEM> Variables #
############################# #############################

View File

@ -0,0 +1,46 @@
{
"metadata": {
"total_count": 2
},
"links": {
"self": "http://127.0.0.1:9001/v2/pools"
},
"pools": [
{
"description": null,
"id": "794ccc2c-d751-44fe-b57f-8894c9f5c842",
"project_id": null,
"created_at": "2015-02-18T22:18:58.000000",
"attributes": null,
"ns_records": [
{
"hostname": "ns1.example.org.",
"priority": 1
}
],
"links": {
"self": "http://127.0.0.1:9001/v2/pools/794ccc2c-d751-44fe-b57f-8894c9f5c842"
},
"name": "default",
"updated_at": "2015-02-19T15:59:44.000000"
},
{
"description": null,
"id": "d1716333-8c16-490f-85ee-29af36907605",
"project_id": "noauth-project",
"created_at": "2015-02-23T21:56:33.000000",
"attributes": null,
"ns_records": [
{
"hostname": "ns2.example.org.",
"priority": 1
}
],
"links": {
"self": "http://127.0.0.1:9001/v2/pools/d1716333-8c16-490f-85ee-29af36907605"
},
"name": "example_pool",
"updated_at": null
}
]
}

View File

@ -0,0 +1,18 @@
{
"description": null,
"id": "d1716333-8c16-490f-85ee-29af36907605",
"project_id": "noauth-project",
"created_at": "2015-02-23T21:56:33.000000",
"attributes": null,
"ns_records": [
{
"hostname": "ns2.example.org.",
"priority": 1
}
],
"links": {
"self": "http://127.0.0.1:9001/v2/pools/d1716333-8c16-490f-85ee-29af36907605"
},
"name": "example_pool",
"updated_at": null
}