diff --git a/api-ref/source/dns-api-v2-pool.inc b/api-ref/source/dns-api-v2-pool.inc new file mode 100644 index 000000000..c04f5ec50 --- /dev/null +++ b/api-ref/source/dns-api-v2-pool.inc @@ -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 diff --git a/api-ref/source/index.rst b/api-ref/source/index.rst index fb1c01816..ade4cdb09 100644 --- a/api-ref/source/index.rst +++ b/api-ref/source/index.rst @@ -13,4 +13,5 @@ .. include:: dns-api-v2-zone-ownership-transfer-request.inc .. include:: dns-api-v2-zone-ownership-transfer-accept.inc .. include:: dns-api-v2-recordset.inc +.. include:: dns-api-v2-pool.inc .. include:: dns-api-v2-limits.inc diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 6622023d4..0033530d0 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -658,7 +658,7 @@ path_zone_transfer_request_id: required: true type: uuid -path_zone_accept_request_id: +path_zone_transfer_accept_id: description: | ID for this zone transfer accept in: path @@ -812,6 +812,58 @@ min_ttl: required: true 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 + ############################# # Variables # ############################# diff --git a/api-ref/source/samples/pools/list-pools-response.json b/api-ref/source/samples/pools/list-pools-response.json new file mode 100644 index 000000000..6db0e1772 --- /dev/null +++ b/api-ref/source/samples/pools/list-pools-response.json @@ -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 + } + ] +} diff --git a/api-ref/source/samples/pools/show-pool-response.json b/api-ref/source/samples/pools/show-pool-response.json new file mode 100644 index 000000000..09bf9e670 --- /dev/null +++ b/api-ref/source/samples/pools/show-pool-response.json @@ -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 +}