From 5c574cf31c46505581f37186ace740dea2d2e013 Mon Sep 17 00:00:00 2001 From: stewie925 Date: Wed, 6 Jul 2016 16:39:11 -0700 Subject: [PATCH] Complete verification of servers-action-fixed-ip.inc This includes the parameter, body, and example verifications for api-ref servers-action-fixed-ip. part of bp:api-ref-in-rst-pike Change-Id: I2b9971d7ff3716f330b55020bf37489dbc9e9b2c --- api-ref/source/parameters.yaml | 8 ++--- api-ref/source/servers-action-fixed-ip.inc | 34 ++++++++++++++----- .../multinic-add-fixed-ip-req.json | 2 +- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index b3ec2219a9f9..77b974f521b8 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -819,10 +819,10 @@ action_unreserve: type: string addFixedIp: description: | - The action. + The action to add a fixed ip address to a server. in: body required: true - type: string + type: object addFloatingIp: description: | The action. Contains required floating IP ``address`` and optional @@ -3724,10 +3724,10 @@ rebuild: type: string removeFixedIp: description: | - The action. + The action to remove a fixed ip address from a server. in: body required: true - type: string + type: object removeFloatingIp: description: | The action. diff --git a/api-ref/source/servers-action-fixed-ip.inc b/api-ref/source/servers-action-fixed-ip.inc index b4665f7375c2..5bbe90c982a5 100644 --- a/api-ref/source/servers-action-fixed-ip.inc +++ b/api-ref/source/servers-action-fixed-ip.inc @@ -1,11 +1,14 @@ .. -*- rst -*- -.. needs:parameter_verification -.. needs:example_verification -.. needs:body_verification -Add (Associate) Fixed Ip (Addfixedip Action) +Add (Associate) Fixed Ip (addFixedIp Action) ============================================ +.. note:: + + Network APIs and proxies are deprecated beginning microversion 2.36, except + for actions on non-deprecated resources such as servers. The addFixedIp + action is one such exemption. + .. rest_method:: POST /servers/{server_id}/action Adds a fixed IP address to a server instance, which associates that @@ -20,7 +23,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) +Error response codes: badRequest(400), unauthorized(401), forbidden(403), +itemNotFound(404) Request ------- @@ -29,8 +33,9 @@ Request - server_id: server_id_path - addFixedIp: addFixedIp + - networkId: net_id_resp -**Example Add (Associate) Fixed Ip (Addfixedip Action)** +**Example Add (Associate) Fixed Ip (addFixedIp Action)** .. literalinclude:: ../../doc/api_samples/os-multinic/multinic-add-fixed-ip-req.json :language: javascript @@ -38,10 +43,18 @@ Request Response -------- +No response body is returned after a successful addFixedIp action. -Remove (Disassociate) Fixed Ip (Removefixedip Action) + +Remove (Disassociate) Fixed Ip (removeFixedIp Action) ===================================================== +.. note:: + + Network APIs and proxies are deprecated as of microversion 2.36, except + for actions on non-deprecated resources such as servers. The removeFixedIp + action is one such exemption. + .. rest_method:: POST /servers/{server_id}/action Removes, or disassociates, a fixed IP address from a server. @@ -54,7 +67,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) +Error response codes: badRequest(400), unauthorized(401), forbidden(403), +itemNotFound(404) Request ------- @@ -64,8 +78,9 @@ Request - server_id: server_id_path - removeFixedIp: removeFixedIp + - address: ip_address -**Example Remove (Disassociate) Fixed Ip (Removefixedip Action)** +**Example Remove (Disassociate) Fixed Ip (removeFixedIp Action)** .. literalinclude:: ../../doc/api_samples/os-multinic/multinic-remove-fixed-ip-req.json :language: javascript @@ -73,3 +88,4 @@ Request Response -------- +No response body is returned after a successful removeFixedIp action. diff --git a/doc/api_samples/os-multinic/multinic-add-fixed-ip-req.json b/doc/api_samples/os-multinic/multinic-add-fixed-ip-req.json index 2fb0fd9fe414..2596f664e33b 100644 --- a/doc/api_samples/os-multinic/multinic-add-fixed-ip-req.json +++ b/doc/api_samples/os-multinic/multinic-add-fixed-ip-req.json @@ -2,4 +2,4 @@ "addFixedIp": { "networkId": 1 } -} +} \ No newline at end of file