From 43158382d9162da06aac29c551e5b989c64b790f Mon Sep 17 00:00:00 2001 From: Tang Chen Date: Wed, 6 Jul 2016 16:59:38 +0800 Subject: [PATCH] api-ref: Parameter verification for servers-actions.inc Part 1 Since servers-actions.inc is too big, this job will be divided into several patches. Change Ia1409a4414248702718f64851b7dc892ea71d9c7 will be the last one. This patch fixes the following common problems in the file: 1. Parameter ``server_id`` is in the path, so it should be ``server_id_path``. 2. Add description for those responses without any content. 3. Remove useless words. Change-Id: I81118d7890f37ee3124513136ef52af93d7c5dc0 Implements: blueprint api-ref-in-rst --- api-ref/source/servers-actions.inc | 84 ++++++++++++++++++++++-------- 1 file changed, 61 insertions(+), 23 deletions(-) diff --git a/api-ref/source/servers-actions.inc b/api-ref/source/servers-actions.inc index 1d3d764aa805..7d99567f3859 100644 --- a/api-ref/source/servers-actions.inc +++ b/api-ref/source/servers-actions.inc @@ -10,8 +10,8 @@ Enables all users to perform an action on a server. Specify the action in the request body. -You can associate a fixed or floating IP address with a server instance, -or disassociate a fixed or floating IP address from a server instance. +You can associate a fixed or floating IP address with a server, +or disassociate a fixed or floating IP address from a server. You can attach a volume to a server. You can create an image from a server, evacuate a server from a failed @@ -62,7 +62,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - addFloatingIp: addFloatingIp - address: address - fixed_address: fixed_address @@ -76,6 +76,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Add Security Group To A Server (addSecurityGroup Action) ======================================================== @@ -96,7 +98,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - addSecurityGroup: addSecurityGroup - name: name @@ -108,6 +110,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Change Administrative Password (changePassword Action) ====================================================== @@ -132,7 +136,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - changePassword: changePassword **Example Change Administrative Password (changePassword Action): JSON request** @@ -143,6 +147,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Confirm Resized Server (confirmResize Action) ============================================= @@ -184,7 +190,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - confirmResize: confirmResize **Example Confirm Resized Server (confirmResize Action): JSON request** @@ -195,6 +201,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Create Image (createImage Action) ================================= @@ -248,7 +256,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - createImage: createImage **Example Create Image (createImage Action): JSON request** @@ -259,6 +267,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Lock Server (lock Action) ========================= @@ -282,7 +292,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - lock: lock **Example Lock Server (lock Action): JSON request** @@ -293,6 +303,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Pause Server (pause Action) =========================== @@ -317,7 +329,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - pause: pause **Example Pause Server (pause Action): JSON request** @@ -328,6 +340,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Reboot Server (reboot Action) ============================= @@ -348,7 +362,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - reboot: reboot **Example Reboot Server (reboot Action): JSON request** @@ -359,6 +373,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Rebuild Server (rebuild Action) =============================== @@ -382,7 +398,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - rebuild: rebuild - imageRef: imageRef - name: name @@ -431,7 +447,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - removeFloatingIp: removeFloatingIp - address: address @@ -444,6 +460,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Remove Security Group From A Server (removeSecurityGroup Action) ================================================================ @@ -464,7 +482,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - removeSecurityGroup: removeSecurityGroup - name: name @@ -476,6 +494,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Rescue Server (rescue Action) ============================= @@ -505,7 +525,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - rescue: rescue - adminPass: adminPass_rescue - rescue_image_ref: rescue_image_ref @@ -560,7 +580,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - resize: resize **Example Resize Server (Resize Action): JSON request** @@ -571,6 +591,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Resume Suspended Server (resume Action) ======================================= @@ -595,7 +617,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - resume: resume **Example Resume Suspended Server (Resume Action): JSON request** @@ -606,6 +628,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Revert Resized Server (revertResize Action) =========================================== @@ -650,7 +674,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - revertResize: revertResize **Example Revert Resized Server (revertResize Action): JSON request** @@ -661,6 +685,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Start Server (os-start Action) ============================== @@ -700,7 +726,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - os-start: os-start **Example Start server: JSON request** @@ -711,6 +737,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Stop Server (os-stop Action) ============================ @@ -744,7 +772,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - os-stop: os-stop **Example Stop server: JSON request** @@ -755,6 +783,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Suspend Server (suspend Action) =============================== @@ -779,7 +809,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - suspend: suspend **Example Suspend Server (suspend Action): JSON request** @@ -790,6 +820,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Unlock Server (unlock Action) ============================= @@ -813,7 +845,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - unlock: unlock **Example Unlock Server (unlock Action): JSON request** @@ -824,6 +856,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Unpause Server (unpause Action) =============================== @@ -848,7 +882,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - unpause: unpause **Example Unpause Server (unpause Action): JSON request** @@ -859,6 +893,8 @@ Request Response -------- +There is no body content for the response of a successful POST operation. + Unrescue Server (unrescue Action) ================================= @@ -891,7 +927,7 @@ Request .. rest_parameters:: parameters.yaml - - server_id: server_id + - server_id: server_id_path - unrescue: unrescue **Example Unrescue server: JSON request** @@ -901,3 +937,5 @@ Request Response -------- + +There is no body content for the response of a successful POST operation.