From 9b3d0bacd1663b7a17434c452b2a118faaf1b332 Mon Sep 17 00:00:00 2001 From: "Duncan.C" Date: Mon, 18 Jan 2016 14:38:59 +0800 Subject: [PATCH] Add add/remove SecurityGroup in Compute API 1. Add addSecurityGroup and removeSecurityGroup to Servers actions section. Change-Id: I06ffa9718818b445dbac818cf7231f2c5689396d Closes-Bug: #1524199 --- api-ref/src/docbkx/ch_compute-v2.1.xml | 7 +- .../src/wadls/compute-api/src/v2.1/common.ent | 40 +++++++++ .../addSecurityGroup-request.json | 5 ++ .../removeSecurityGroup-request.json | 5 ++ .../src/v2.1/wadl/servers-action-v2.1.wadl | 84 ++++++++++++++++--- 5 files changed, 127 insertions(+), 14 deletions(-) create mode 100644 api-ref/src/wadls/compute-api/src/v2.1/samples/servers-action-admin/addSecurityGroup-request.json create mode 100644 api-ref/src/wadls/compute-api/src/v2.1/samples/servers-action-admin/removeSecurityGroup-request.json diff --git a/api-ref/src/docbkx/ch_compute-v2.1.xml b/api-ref/src/docbkx/ch_compute-v2.1.xml index 3e8c95ef5..5596120c3 100644 --- a/api-ref/src/docbkx/ch_compute-v2.1.xml +++ b/api-ref/src/docbkx/ch_compute-v2.1.xml @@ -193,7 +193,8 @@ You can lock, pause, reboot, rebuild, rescue, resize, resume, confirm the resize of, revert a pending resize for, shelve, shelf-offload, unshelve, start, stop, unlock, unpause, and unrescue a server. You can - also change the password of the server. + also change the password of the server and add a security group to or + remove a security group from a server. You can get an RDP, serial, SPICE, or VNC console for a server. @@ -262,6 +263,10 @@ + + + +
diff --git a/api-ref/src/wadls/compute-api/src/v2.1/common.ent b/api-ref/src/wadls/compute-api/src/v2.1/common.ent index 5304e2d2a..e57534ce6 100644 --- a/api-ref/src/wadls/compute-api/src/v2.1/common.ent +++ b/api-ref/src/wadls/compute-api/src/v2.1/common.ent @@ -3309,6 +3309,46 @@ '> + + + + The security group name. + + +'> + + + + The action. + + + +&security-group-nameRequestParameter; +'> + + + + The action. + + + +&security-group-nameRequestParameter; +'> + @@ -31,6 +32,7 @@ + @@ -231,8 +233,8 @@ Confirms a pending resize action for a server. - Specify the - confirmResize action in the request body. + Specify the confirmResize action in the request + body. After you make this request, you typically must keep @@ -275,7 +277,7 @@ + title="Create image (createImage action)"> Creates an image from a server. @@ -370,8 +372,10 @@ - Pauses a server. Changes its status - to PAUSED. + + Pauses a server. Changes its status + to PAUSED. + Specify the pause action in the request body. @@ -492,7 +496,7 @@ + title="Reboot server (reboot action)"> Reboots a server. @@ -512,7 +516,8 @@ &commonFaults; &getFaults; &postPutFaults; &rebootFaults; &inProgressFault; - + Rebuilds a server. @@ -837,7 +842,9 @@ - Unlocks a server. + + Unlocks a locked server. + Specify the unlock action in the request body. @@ -895,12 +902,10 @@ - Unrescues a server. Changes status to - ACTIVE. + Unrescues a server. Changes status to ACTIVE. - Specify the unrescue - action in the request body. + Specify the unrescue action in the request body. Preconditions @@ -915,7 +920,8 @@ After you successfully unrescue a server and make a GET /v2.1/​{tenant_id}​/servers/​{server_id}​ - request, its status changes to ACTIVE. + request, its status changes to ACTIVE. + @@ -933,4 +939,56 @@ + + + + Adds a security group to a server. + + + Specify the addSecurityGroup action in the request body. + + + + + + + + &addSecurityGroupActionRequestParameter; + + + + &commonFaults; + &postPutFaults; + + + + + Removes a security group from a server. + + + Specify the removeSecurityGroup action in the + request body. + + + + + + + + &removeSecurityGroupActionRequestParameter; + + + + &commonFaults; + &postPutFaults; +