summaryrefslogtreecommitdiff
path: root/api-ref
diff options
context:
space:
mode:
authorGraham Hayes <graham.hayes@hpe.com>2016-05-16 18:41:19 +0100
committerGraham Hayes <graham.hayes@hpe.com>2016-05-16 18:41:19 +0100
commit773528d7ca2cd7ef53db32655e661414634922d5 (patch)
tree603adedbee9a88c2e4f60b8dd54d4a930818c58e /api-ref
parent21569891c706c8c17af6760a9578739f0161915b (diff)
downloaddesignate-773528d7ca2cd7ef53db32655e661414634922d5.tar.gz
Add Pools to API-Ref Docs
Change-Id: Idc2340d5710be4686916c709354d8dc7e1725d73
Diffstat (limited to 'api-ref')
-rw-r--r--api-ref/source/dns-api-v2-pool.inc102
-rw-r--r--api-ref/source/index.rst1
-rw-r--r--api-ref/source/parameters.yaml54
-rw-r--r--api-ref/source/samples/pools/list-pools-response.json46
-rw-r--r--api-ref/source/samples/pools/show-pool-response.json18
5 files changed, 220 insertions, 1 deletions
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 00000000..c04f5ec5
--- /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 fb1c0181..ade4cdb0 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 6622023d..0033530d 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
+
#############################
# <ITEM> 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 00000000..6db0e177
--- /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 00000000..09bf9e67
--- /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
+}