From c33ebfc8339da63730ea38394e3503670f025230 Mon Sep 17 00:00:00 2001 From: "sonu.kumar" Date: Thu, 19 May 2016 17:53:14 +0900 Subject: [PATCH] Add Tsigkey to api-ref docs Change-Id: I2e951c8a2ef502bd6cc194e3c95992421f6e8208 --- api-ref/source/dns-api-v2-tsigkey.inc | 255 ++++++++++++++++++ api-ref/source/index.rst | 1 + api-ref/source/parameters.yaml | 86 ++++++ .../tsigkeys/create-tsigkey-request.json | 7 + .../tsigkeys/list-tsigkeys-response.json | 45 ++++ .../samples/tsigkeys/tsigkey-response.json | 13 + .../tsigkeys/update-tsigkey-request.json | 4 + .../tsigkeys/update-tsigkey-response.json | 13 + 8 files changed, 424 insertions(+) create mode 100644 api-ref/source/dns-api-v2-tsigkey.inc create mode 100644 api-ref/source/samples/tsigkeys/create-tsigkey-request.json create mode 100644 api-ref/source/samples/tsigkeys/list-tsigkeys-response.json create mode 100644 api-ref/source/samples/tsigkeys/tsigkey-response.json create mode 100644 api-ref/source/samples/tsigkeys/update-tsigkey-request.json create mode 100644 api-ref/source/samples/tsigkeys/update-tsigkey-response.json diff --git a/api-ref/source/dns-api-v2-tsigkey.inc b/api-ref/source/dns-api-v2-tsigkey.inc new file mode 100644 index 000000000..3e4f27110 --- /dev/null +++ b/api-ref/source/dns-api-v2-tsigkey.inc @@ -0,0 +1,255 @@ +======= +Tsigkey +======= + +Transaction signatures (TSIG) is a mechanism used to secure DNS messages and +to provide secure server-to-server communication (usually between master and +slave server, but can be extended for dynamic updates as well). + +Create Tsigkeys +=============== + +.. rest_method:: POST /v2/tsigkeys + +Create a new Tsigkey + +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: tsigkey_name + - algorithm: tsigkey_algorithm + - secret: tsigkey_secret + - scope: tsigkey_scope + - resource_id: resource_id + + +Request Example +--------------- + +.. literalinclude:: samples/tsigkeys/create-tsigkey-request.json + :language: javascript + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - x-openstack-request-id: x-openstack-request-id + - id: id + - resource_id: resource_id + - name: tsigkey_name + - scope: tsigkey scope + - secret: tsigkey secret + - algorithm: tsigkey_algorithm + - created_at: created_at + - updated_at: updated_at + - links: links + + +Response Example +---------------- + +.. literalinclude:: samples/tsigkeys/tsigkey-response.json + :language: javascript + + + +List Tsigkeys +============= + +.. rest_method:: GET /v2/tsigkeys + +List all tsigkeys + + +Normal response codes: 200 +Error response codes:405,404,403,401,400,503, + + +Request Parameters +------------------ + +.. 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: tsigkey_name_filter + - algorithm: tsigkey_algorithm_filter + - scope: tsigkey_scope_filter + + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - x-openstack-request-id: x-openstack-request-id + - id: id + - resource_id: resource_id + - name: tsigkey_name + - scope: tsigkey scope + - secret: tsigkey secret + - algorithm: tsigkey_algorithm + - created_at: created_at + - updated_at: updated_at + - links: links + + +Response Example +---------------- + +.. literalinclude:: samples/tsigkeys/list-tsigkeys-response.json + :language: javascript + + + +Show a Tsigkey +============== + +.. rest_method:: GET /v2/tsigkeys/{tsigkey_id} + +Show a tsigkey + + +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 + - tsigkey_id: tsigkey_id + + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - x-openstack-request-id: x-openstack-request-id + - id: id + - resource_id: resource_id + - name: tsigkey_name + - scope: tsigkey scope + - secret: tsigkey secret + - algorithm: tsigkey_algorithm + - created_at: created_at + - updated_at: updated_at + - links: links + + +Response Example +---------------- + +.. literalinclude:: samples/tsigkeys/tsigkey-response.json + :language: javascript + + + +Update Tsigkey +================ + +.. rest_method:: PATCH /v2/tsigkeys/{tsigkey_id} + +Update the attribute(s) of an existing tsigkey + + +Normal response codes: 200 +Error response codes:405,404,403,401,400,503, + + +Request Parameters +------------------ + +.. 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: tsigkey_name + - algorithm: tsigkey_algorithm + - secret: tsigkey_secret + - scope: tsigkey_scope + - resource_id: resource_id + + +Request Example +--------------- + +.. literalinclude:: samples/tsigkeys/update-tsigkey-request.json + :language: javascript + + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - x-openstack-request-id: x-openstack-request-id + - id: id + - resource_id: resource_id + - name: tsigkey_name + - scope: tsigkey scope + - secret: tsigkey secret + - algorithm: tsigkey_algorithm + - created_at: created_at + - updated_at: updated_at + - links: links + + +Response Example +---------------- + +.. literalinclude:: samples/tsigkeys/update-tsigkey-response.json + :language: javascript + + + +Delete a Tsigkey +================ + +.. rest_method:: DELETE /v2/tsigkeys/{tsigkey_id} + +Delete a tsigkey + + +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 + - tsigkey_id: tsigkey_id + + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - x-openstack-request-id: x-openstack-request-id diff --git a/api-ref/source/index.rst b/api-ref/source/index.rst index 3fbb73eea..0355a610a 100644 --- a/api-ref/source/index.rst +++ b/api-ref/source/index.rst @@ -17,3 +17,4 @@ .. include:: dns-api-v2-pool.inc .. include:: dns-api-v2-limits.inc .. include:: dns-api-v2-tld.inc +.. include:: dns-api-v2-tsigkey.inc diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index e52925738..b3045e310 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -913,6 +913,92 @@ tld_description: required: false type: string + +############################# +# Tsigkey Variables # +############################# + + +# Header Variables +################### + +# Path Variables +################# + +tsigkey_id: + description: | + ID for this tsigkey + in: path + required: true + type: uuid + + +# Query Variables +################## + +#Filters + +tsigkey_name_filter: + description: | + Filter results to only show tsigkeys that have a name matching the filter + in: query + required: false + type: string + +tsigkey_algorithm_filter: + description: | + Filter results to only show tsigkeys that have an algorithm matching the filter + in: query + required: false + type: string + +tsigkey_scope_filter: + description: | + Filter results to only show tsigkeys that have a scope matching the filter + in: query + required: false + type: string + + +# Body Variables +################# + +tsigkey_name: + description: | + Name for this tsigkey + in: body + required: true + type: string + +tsigkey_algorithm: + description: | + The encryption algorithm for this tsigkey + in: body + required: true + type: string + +tsigkey_secret: + description: | + The actual key to be used + in: body + required: true + type: string + +tsigkey_scope: + description: | + scope for this tsigkey which can be either ZONE or POOL scope + in: body + required: true + type: string + +resource_id: + description: | + resource id for this tsigkey which can be either zone or pool id + in: body + required: true + type: string + + ############################# # Variables # ############################# diff --git a/api-ref/source/samples/tsigkeys/create-tsigkey-request.json b/api-ref/source/samples/tsigkeys/create-tsigkey-request.json new file mode 100644 index 000000000..42b31a4f7 --- /dev/null +++ b/api-ref/source/samples/tsigkeys/create-tsigkey-request.json @@ -0,0 +1,7 @@ +{ + "name": "Example key", + "algorithm": "hmac-sha256", + "secret": "SomeSecretKey", + "scope": "POOL", + "resource_id": "d96851d0-765c-4ee9-bbdf-153345270bd3" +} diff --git a/api-ref/source/samples/tsigkeys/list-tsigkeys-response.json b/api-ref/source/samples/tsigkeys/list-tsigkeys-response.json new file mode 100644 index 000000000..0488426d7 --- /dev/null +++ b/api-ref/source/samples/tsigkeys/list-tsigkeys-response.json @@ -0,0 +1,45 @@ +{ + "tsigkeys": [ + { + "links": { + "self": "http://192.168.11.182:9001/v2/tsigkeys/f94d03ca-bd55-4321-8e93-8d363737ab5c" + }, + "name": "Example key", + "algorithm": "hmac-sha256", + "resource_id": "5866274f-ee8d-42ee-94f9-29000f040949", + "created_at": "2016-04-19 18:52:54", + "updated_at": null, + "secret": "some secret key", + "scope": "POOL", + "id": "f94d03ca-bd55-4321-8e93-8d363737ab5c" + }, + { + "links": { + "self": "http://192.168.11.182:9001/v2/tsigkeys/6bba6f00-dc33-4665-bb37-15f6188bb305" + }, + "name": "Example key2", + "algorithm": "hmac-sha256", + "resource_id": "8a5ba22a-347e-4e92-9747-d2c3e67fbb45", + "created_at": "2016-05-19 02:17:54", + "updated_at": null, + "secret": "SomeSecretKey", + "scope": "POOL", + "id": "6bba6f00-dc33-4665-bb37-15f6188bb305" + }, + { + "links": { + "self": "http://192.168.11.182:9001/v2/tsigkeys/c429b860-9f68-4e5f-a2ff-65760a64ceaa" + }, + "name": "Example key3", + "algorithm": "hmac-sha256", + "resource_id": "d96851d0-765c-4ee9-bbdf-153345270bd3", + "created_at": "2016-05-19 05:52:45", + "updated_at": null, + "secret": "SomeSecretKey", "scope": "POOL", + "id": "c429b860-9f68-4e5f-a2ff-65760a64ceaa" + } + ], + "links": { + "self": "http://192.168.11.182:9001/v2/tsigkeys" + } +} diff --git a/api-ref/source/samples/tsigkeys/tsigkey-response.json b/api-ref/source/samples/tsigkeys/tsigkey-response.json new file mode 100644 index 000000000..cc8d14545 --- /dev/null +++ b/api-ref/source/samples/tsigkeys/tsigkey-response.json @@ -0,0 +1,13 @@ +{ + "links": { + "self": "http://192.168.11.182:9001/v2/tsigkeys/c429b860-9f68-4e5f-a2ff-65760a64ceaa" + }, + "name": "Example key", + "algorithm": "hmac-sha256", + "resource_id": "d96851d0-765c-4ee9-bbdf-153345270bd3", + "created_at": "2016-05-19 05:52:45", + "updated_at": null, + "secret": "SomeSecretKey", + "scope": "POOL", + "id": "c429b860-9f68-4e5f-a2ff-65760a64ceaa" +} diff --git a/api-ref/source/samples/tsigkeys/update-tsigkey-request.json b/api-ref/source/samples/tsigkeys/update-tsigkey-request.json new file mode 100644 index 000000000..253fee6ef --- /dev/null +++ b/api-ref/source/samples/tsigkeys/update-tsigkey-request.json @@ -0,0 +1,4 @@ +{ + "name": "example_tsigkey", + "scope": "ZONE" +} diff --git a/api-ref/source/samples/tsigkeys/update-tsigkey-response.json b/api-ref/source/samples/tsigkeys/update-tsigkey-response.json new file mode 100644 index 000000000..207e07bf0 --- /dev/null +++ b/api-ref/source/samples/tsigkeys/update-tsigkey-response.json @@ -0,0 +1,13 @@ +{ + "links": { + "self": "http://192.168.11.182:9001/v2/tsigkeys/c429b860-9f68-4e5f-a2ff-65760a64ceaa" + }, + "name": "example_tsigkey", + "algorithm": "hmac-sha256", + "resource_id": "d96851d0-765c-4ee9-bbdf-153345270bd3", + "created_at": "2016-05-19 05:52:45", + "updated_at": "2016-05-19 06:29:14", + "secret": "SomeSecretKey", + "scope": "ZONE", + "id": "c429b860-9f68-4e5f-a2ff-65760a64ceaa" +}