From 2ecbbd8d432e323edaf34dda7302edd3d2539453 Mon Sep 17 00:00:00 2001 From: stewie925 Date: Tue, 14 Jun 2016 14:33:03 -0700 Subject: [PATCH] Complete verification for os-floating-ips This includes the parameter, example, and body verification for os-floating-ips. part of bp:api-ref-in-rst-ocata Change-Id: I4beff34b41baf77827a2e4d916ad5319bdefbfa1 --- api-ref/source/os-floating-ips.inc | 54 +++++++++++++++++++++++------- api-ref/source/parameters.yaml | 17 ++++++++++ 2 files changed, 58 insertions(+), 13 deletions(-) diff --git a/api-ref/source/os-floating-ips.inc b/api-ref/source/os-floating-ips.inc index 8f892e52d029..baab1f7406d1 100644 --- a/api-ref/source/os-floating-ips.inc +++ b/api-ref/source/os-floating-ips.inc @@ -1,7 +1,4 @@ .. -*- rst -*- -.. needs:parameter_verification -.. needs:example_verification -.. needs:body_verification ============================================ Floating IPs (os-floating-ips) (DEPRECATED) @@ -13,7 +10,7 @@ deprecated all the proxy APIs and users should use the native APIs instead. These will fail with a 404 after microversion 2.35. See: `Relevant Network APIs - `__. + `__. Lists floating IP addresses for a project. Also, creates (allocates) a floating IP address for a project, shows floating IP address details, @@ -27,12 +24,12 @@ address `__ + address `__ with an instance in the project. You can associate only one floating IP address with an instance at a time. - `Remove (disassociate) the floating IP - address `__ + address `__ from an instance in the project. - Delete, or deallocate, a floating IP from the project, which @@ -56,7 +53,16 @@ Error response codes: unauthorized(401), forbidden(403) Response -------- -**Example List Floating Ip Addresses: JSON response** +.. rest_parameters:: parameters.yaml + + - floating_ips: floating_ips_list + - fixed_ip: fixed_ip_address + - id: floating_ip_id_value + - instance_id: server_id + - ip: floating_ip + - pool: floating_ip_pool_name + +**Example List Floating Ip Addresses** .. literalinclude:: ../../doc/api_samples/os-floating-ips/floating-ips-list-resp.json :language: javascript @@ -78,16 +84,17 @@ can change these permissions through the ``policy.json`` file. Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404) +Error response codes: badRequest(400), unauthorized(401), forbidden(403), +itemNotFound(404) Request ------- .. rest_parameters:: parameters.yaml - - pool: pool + - pool: floating_ip_pool_name -**Example Create (Allocate) Floating Ip Address: JSON request** +**Example Create (Allocate) Floating Ip Address** .. literalinclude:: ../../doc/api_samples/os-floating-ips/floating-ips-create-req.json :language: javascript @@ -95,6 +102,15 @@ Request Response -------- +.. rest_parameters:: parameters.yaml + + - floating_ip: floating_ip_obj + - fixed_ip: fixed_ip_address + - id: floating_ip_id_value + - instance_id: server_id + - ip: floating_ip + - pool: floating_ip_pool_name + **Example Create (Allocate) Floating Ip Address: JSON response** .. literalinclude:: ../../doc/api_samples/os-floating-ips/floating-ips-create-resp.json @@ -113,7 +129,8 @@ can change these permissions through the ``policy.json`` file. Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404) +Error response codes: badRequest(400), unauthorized(401), forbidden(403), +itemNotFound(404) Request ------- @@ -125,6 +142,15 @@ Request Response -------- +.. rest_parameters:: parameters.yaml + + - floating_ip: floating_ip_obj + - fixed_ip: fixed_ip_address + - id: floating_ip_id_value + - instance_id: server_id + - ip: floating_ip + - pool: floating_ip_pool_name + **Example Show Floating Ip Address Details: JSON response** .. literalinclude:: ../../doc/api_samples/os-floating-ips/floating-ips-get-resp.json @@ -147,8 +173,8 @@ can change these permissions through the ``policy.json`` file. Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), -conflict(409) +Error response codes: badRequest(400), unauthorized(401), forbidden(403), + itemNotFound(404) Request ------- @@ -159,3 +185,5 @@ Request Response -------- + +There is no body content for the response of a successful DELETE action. diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index db67a5fff850..439abebc2b5a 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -1912,6 +1912,23 @@ floating_ip_bulk_object: in: body required: true type: object +floating_ip_id_value: + description: | + The floating IP id value. + + .. note:: + + For nova-network, the value will be of type integer, whereas for + neutron, the value will be of type string. + in: body + required: true + type: string +floating_ip_obj: + description: | + A floating IP address object. + in: body + required: true + type: object floating_ip_pool_name: description: | The name of the floating ip pool.