From ac6e95b6ae59fbfbc89f3a51462802d50e5f73ef Mon Sep 17 00:00:00 2001 From: "sonu.kumar" Date: Tue, 12 Jul 2016 22:01:15 +0530 Subject: [PATCH] Added docs for Floatingip ptr records to api ref Change-Id: Ic42871b8ecc9caa4e39ce934e2e297aaf3b5222a --- .../source/dns-api-v2-reverse-floatingips.inc | 192 ++++++++++++++++++ api-ref/source/index.rst | 1 + api-ref/source/parameters.yaml | 49 +++++ .../list-ptr-record-response.json | 31 +++ .../ptr-record-response.json | 13 ++ .../set-ptr-record-request.json | 5 + .../unset-ptr-record-request.json | 3 + 7 files changed, 294 insertions(+) create mode 100644 api-ref/source/dns-api-v2-reverse-floatingips.inc create mode 100644 api-ref/source/samples/reverse_floatingips/list-ptr-record-response.json create mode 100644 api-ref/source/samples/reverse_floatingips/ptr-record-response.json create mode 100644 api-ref/source/samples/reverse_floatingips/set-ptr-record-request.json create mode 100644 api-ref/source/samples/reverse_floatingips/unset-ptr-record-request.json diff --git a/api-ref/source/dns-api-v2-reverse-floatingips.inc b/api-ref/source/dns-api-v2-reverse-floatingips.inc new file mode 100644 index 000000000..6920d34b0 --- /dev/null +++ b/api-ref/source/dns-api-v2-reverse-floatingips.inc @@ -0,0 +1,192 @@ +=========== +FloatingIPs +=========== + +In order to use the FloatingIPs functionality you will need to have a FloatingIP +associated to your project in Neutron. + +Set FloatingIP's PTR record +============================ + +.. rest_method:: POST /v2/reverse/floatingips/{region}:{floatingip_id} + +Set a PTR record for the given FloatingIP. The domain if it does not exist +will be provisioned automatically. + +Normal response codes: 202 + +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 + - ptrdname: fptrd_name + - description: fptr_description + - ttl: fptr_ttl + - region: region + - floatingip_id: floatingip_id + +Request Example +--------------- + +.. literalinclude:: samples/reverse_floatingips/set-ptr-record-request.json + :language: javascript + + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - x-openstack-request-id: x-openstack-request-id + - id: fptr_id + - ptrdname: fptrd_name + - description: fptr_description + - ttl: fptr_ttl + - address: floatingip_address + - status: status + - action: action + - links: links + + +Response Example +---------------- + +.. literalinclude:: samples/reverse_floatingips/ptr-record-response.json + :language: javascript + + +Show FloatingIP's PTR record +============================ + +.. rest_method:: GET /v2/reverse/floatingips/{region}:{floatingip_id} + +Shows a particular FloatingIP PTR + +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 + - region: region + - floatingip_id: floatingip_id + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - x-openstack-request-id: x-openstack-request-id + - id: fptr_id + - ptrdname: fptrd_name + - description: fptr_description + - ttl: fptr_ttl + - address: floatingip_address + - status: status + - action: action + - links: links + + +Response Example +---------------- + +.. literalinclude:: samples/reverse_floatingips/ptr-record-response.json + :language: javascript + + +List FloatingIP's PTR record +============================ + +.. rest_method:: GET /v2/reverse/floatingips + +List FloatingIP PTR records + +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 + - id: fptr_id + - ptrdname: fptrd_name + - description: fptr_description + - ttl: fptr_ttl + - address: floatingip_address + - status: status + - action: action + - links: links + + +Response Example +---------------- + +.. literalinclude:: samples/reverse_floatingips/list-ptr-record-response.json + :language: javascript + + +Unset FloatingIP's PTR record +============================= + +.. rest_method:: PATCH /v2/reverse/floatingips/{region}:{floatingip_id} + +Unset the PTR record for a FloatingIP + +Normal response codes: 202 + +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 + - region: region + - floatingip_id: floatingip_id + + +Request Example +--------------- + +.. literalinclude:: samples/reverse_floatingips/unset-ptr-record-request.json + :language: javascript + + +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 31c4658ca..37b4d9902 100644 --- a/api-ref/source/index.rst +++ b/api-ref/source/index.rst @@ -20,3 +20,4 @@ .. include:: dns-api-v2-tsigkey.inc .. include:: dns-api-v2-blacklist.inc .. include:: dns-api-v2-quota.inc +.. include:: dns-api-v2-reverse-floatingips.inc diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index bb13e281a..877edaf80 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -57,6 +57,13 @@ blacklist_id: required: true type: uuid +floatingip_id: + description: | + ID for the floatingip associated with the project + in: path + required: true + type: uuid + path_pool_id: description: | ID for this pool @@ -113,6 +120,13 @@ path_zone_transfer_request_id: required: true type: uuid +region: + description: | + Openstack region + in: path + required: true + type: string + tld_id: description: | ID for this tld @@ -392,6 +406,41 @@ description: required: true type: string +floatingip_address: + description: | + The floatingip address for this PTR record. + in: body + required: true + type: string + +fptr_description: + description: | + Description for this PTR record + in: body + required: true + type: string + +fptr_id: + description: | + ID for PTR record in the format of : + in: body + required: true + type: string + +fptr_ttl: + description: | + Time to live for this PTR record + in: body + required: true + type: uuid + +fptrd_name: + description: | + Domain name for this PTR record + in: body + required: true + type: string + id: description: | ID for the resource diff --git a/api-ref/source/samples/reverse_floatingips/list-ptr-record-response.json b/api-ref/source/samples/reverse_floatingips/list-ptr-record-response.json new file mode 100644 index 000000000..8c1575d36 --- /dev/null +++ b/api-ref/source/samples/reverse_floatingips/list-ptr-record-response.json @@ -0,0 +1,31 @@ +{ + "links": { + "self": "http://127.0.0.1:9001/v2/reverse/floatingips" + }, + "floatingips": [ + { + "status": "ACTIVE", + "ptrdname": "smtp.example.com.", + "description": null, + "links": { + "self": "http://127.0.0.1:9001/v2/reverse/floatingips/RegionOne:c5742ac0-d0f3-4304-a039-9423f727eb96" + }, + "ttl": 600, + "address": "172.24.4.10", + "action": "NONE", + "id": "RegionOne:c5742ac0-d0f3-4304-a039-9423f727eb96" + }, + { + "status": "ACTIVE", + "ptrdname": "tftp.example.com.", + "description": null, + "links": { + "self": "http://127.0.0.1:9001/v2/reverse/floatingips/RegionOne:9860717d-3da6-43df-a0ec-fa8b0e71ea86" + }, + "ttl": 600, + "address": "172.24.4.6", + "action": "NONE", + "id": "RegionOne:9860717d-3da6-43df-a0ec-fa8b0e71ea86" + } + ] +} diff --git a/api-ref/source/samples/reverse_floatingips/ptr-record-response.json b/api-ref/source/samples/reverse_floatingips/ptr-record-response.json new file mode 100644 index 000000000..4320e165c --- /dev/null +++ b/api-ref/source/samples/reverse_floatingips/ptr-record-response.json @@ -0,0 +1,13 @@ +{ + "status": "PENDING", + "ptrdname": "smtp.example.com.", + "description": "This is a floating ip for 127.0.0.1" + "links": { + "self": "http://127.0.0.1:9001/v2/reverse/floatingips/RegionOne:c5742ac0-d0f3-4304-a039-9423f727eb96" + }, + "ttl": 600, + "address": "172.24.4.10", + "action": "CREATE", + "id": "RegionOne:c5742ac0-d0f3-4304-a039-9423f727eb96" +} + diff --git a/api-ref/source/samples/reverse_floatingips/set-ptr-record-request.json b/api-ref/source/samples/reverse_floatingips/set-ptr-record-request.json new file mode 100644 index 000000000..37528856b --- /dev/null +++ b/api-ref/source/samples/reverse_floatingips/set-ptr-record-request.json @@ -0,0 +1,5 @@ +{ + "ptrdname" : "smtp.example.com.", + "description" : "This is a floating ip for 10.0.0.8", + "ttl": 600 +} diff --git a/api-ref/source/samples/reverse_floatingips/unset-ptr-record-request.json b/api-ref/source/samples/reverse_floatingips/unset-ptr-record-request.json new file mode 100644 index 000000000..7a2138939 --- /dev/null +++ b/api-ref/source/samples/reverse_floatingips/unset-ptr-record-request.json @@ -0,0 +1,3 @@ +{ + "ptrdname": null +}