Add add/remove SecurityGroup in Compute API
1. Add addSecurityGroup and removeSecurityGroup to Servers actions section. Change-Id: I06ffa9718818b445dbac818cf7231f2c5689396d Closes-Bug: #1524199
This commit is contained in:
@@ -193,7 +193,8 @@
|
|||||||
You can lock, pause, reboot, rebuild, rescue, resize, resume, confirm
|
You can lock, pause, reboot, rebuild, rescue, resize, resume, confirm
|
||||||
the resize of, revert a pending resize for, shelve, shelf-offload,
|
the resize of, revert a pending resize for, shelve, shelf-offload,
|
||||||
unshelve, start, stop, unlock, unpause, and unrescue a server. You can
|
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.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
You can get an RDP, serial, SPICE, or VNC console for a server.
|
You can get an RDP, serial, SPICE, or VNC console for a server.
|
||||||
@@ -262,6 +263,10 @@
|
|||||||
<wadl:resource href="../wadls/compute-api/src/v2.1/wadl/servers-action-shelve-v2.1.wadl#action">
|
<wadl:resource href="../wadls/compute-api/src/v2.1/wadl/servers-action-shelve-v2.1.wadl#action">
|
||||||
<wadl:method href="#unshelve"/>
|
<wadl:method href="#unshelve"/>
|
||||||
</wadl:resource>
|
</wadl:resource>
|
||||||
|
<wadl:resource href="../wadls/compute-api/src/v2.1/wadl/servers-action-v2.1.wadl#action">
|
||||||
|
<wadl:method href="#addSecurityGroup"/>
|
||||||
|
<wadl:method href="#removeSecurityGroup"/>
|
||||||
|
</wadl:resource>
|
||||||
</wadl:resources>
|
</wadl:resources>
|
||||||
</section>
|
</section>
|
||||||
<section xml:id="os-admin-actions-v2.1">
|
<section xml:id="os-admin-actions-v2.1">
|
||||||
|
|||||||
@@ -3309,6 +3309,46 @@
|
|||||||
</para>
|
</para>
|
||||||
</wadl:doc>
|
</wadl:doc>
|
||||||
</param>'>
|
</param>'>
|
||||||
|
<!ENTITY security-group-nameRequestParameter '
|
||||||
|
<param xmlns="http://wadl.dev.java.net/2009/02"
|
||||||
|
name="name" style="plain" required="true"
|
||||||
|
type="xsd:string">
|
||||||
|
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:wadl="http://wadl.dev.java.net/2009/02"
|
||||||
|
xml:lang="EN">
|
||||||
|
<para>
|
||||||
|
The security group name.
|
||||||
|
</para>
|
||||||
|
</wadl:doc>
|
||||||
|
</param>'>
|
||||||
|
<!ENTITY addSecurityGroupActionRequestParameter '
|
||||||
|
<param xmlns="http://wadl.dev.java.net/2009/02"
|
||||||
|
name="addSecurityGroup" style="plain" required="true"
|
||||||
|
type="xsd:string">
|
||||||
|
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:wadl="http://wadl.dev.java.net/2009/02"
|
||||||
|
xml:lang="EN">
|
||||||
|
<para>
|
||||||
|
The action.
|
||||||
|
</para>
|
||||||
|
</wadl:doc>
|
||||||
|
</param>
|
||||||
|
&security-group-nameRequestParameter;
|
||||||
|
'>
|
||||||
|
<!ENTITY removeSecurityGroupActionRequestParameter '
|
||||||
|
<param xmlns="http://wadl.dev.java.net/2009/02"
|
||||||
|
name="removeSecurityGroup" style="plain" required="true"
|
||||||
|
type="xsd:string">
|
||||||
|
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:wadl="http://wadl.dev.java.net/2009/02"
|
||||||
|
xml:lang="EN">
|
||||||
|
<para>
|
||||||
|
The action.
|
||||||
|
</para>
|
||||||
|
</wadl:doc>
|
||||||
|
</param>
|
||||||
|
&security-group-nameRequestParameter;
|
||||||
|
'>
|
||||||
<!ENTITY serverResponseParameters '
|
<!ENTITY serverResponseParameters '
|
||||||
&serverAddressResponseParameters;
|
&serverAddressResponseParameters;
|
||||||
&createdResponseParameter;
|
&createdResponseParameter;
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"addSecurityGroup": {
|
||||||
|
"name": "default"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"removeSecurityGroup": {
|
||||||
|
"name": "default"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
&server_idTemplateParameter;
|
&server_idTemplateParameter;
|
||||||
<resource id="action" path="action">
|
<resource id="action" path="action">
|
||||||
<method href="#addFloatingIp"/>
|
<method href="#addFloatingIp"/>
|
||||||
|
<method href="#addSecurityGroup"/>
|
||||||
<method href="#attach"/>
|
<method href="#attach"/>
|
||||||
<method href="#changePassword"/>
|
<method href="#changePassword"/>
|
||||||
<method href="#confirmResize"/>
|
<method href="#confirmResize"/>
|
||||||
@@ -31,6 +32,7 @@
|
|||||||
<method href="#reboot"/>
|
<method href="#reboot"/>
|
||||||
<method href="#rebuild"/>
|
<method href="#rebuild"/>
|
||||||
<method href="#removeFloatingIp"/>
|
<method href="#removeFloatingIp"/>
|
||||||
|
<method href="#removeSecurityGroup"/>
|
||||||
<method href="#rescue"/>
|
<method href="#rescue"/>
|
||||||
<method href="#resize"/>
|
<method href="#resize"/>
|
||||||
<method href="#resume"/>
|
<method href="#resume"/>
|
||||||
@@ -231,8 +233,8 @@
|
|||||||
Confirms a pending resize action for a server.
|
Confirms a pending resize action for a server.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Specify the
|
Specify the <code>confirmResize</code> action in the request
|
||||||
<code>confirmResize</code> action in the request body.
|
body.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
After you make this request, you typically must keep
|
After you make this request, you typically must keep
|
||||||
@@ -275,7 +277,7 @@
|
|||||||
</method>
|
</method>
|
||||||
<method name="POST" id="createImage">
|
<method name="POST" id="createImage">
|
||||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
||||||
title="Create image (createImage action)">
|
title="Create image (createImage action)">
|
||||||
<para role="shortdesc">
|
<para role="shortdesc">
|
||||||
Creates an image from a server.
|
Creates an image from a server.
|
||||||
</para>
|
</para>
|
||||||
@@ -370,8 +372,10 @@
|
|||||||
<method name="POST" id="pause">
|
<method name="POST" id="pause">
|
||||||
<wadl:doc xml:lang="EN" title="Pause server (pause action)"
|
<wadl:doc xml:lang="EN" title="Pause server (pause action)"
|
||||||
xmlns="http://docbook.org/ns/docbook">
|
xmlns="http://docbook.org/ns/docbook">
|
||||||
<para role="shortdesc">Pauses a server. Changes its status
|
<para role="shortdesc">
|
||||||
to <code>PAUSED</code>.</para>
|
Pauses a server. Changes its status
|
||||||
|
to <code>PAUSED</code>.
|
||||||
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Specify the <code>pause</code> action in the request body.
|
Specify the <code>pause</code> action in the request body.
|
||||||
</para>
|
</para>
|
||||||
@@ -492,7 +496,7 @@
|
|||||||
</method>
|
</method>
|
||||||
<method name="POST" id="reboot">
|
<method name="POST" id="reboot">
|
||||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
||||||
title="Reboot server (reboot action)">
|
title="Reboot server (reboot action)">
|
||||||
<para role="shortdesc">
|
<para role="shortdesc">
|
||||||
Reboots a server.
|
Reboots a server.
|
||||||
</para>
|
</para>
|
||||||
@@ -512,7 +516,8 @@
|
|||||||
&commonFaults; &getFaults; &postPutFaults;
|
&commonFaults; &getFaults; &postPutFaults;
|
||||||
&rebootFaults; &inProgressFault; </method>
|
&rebootFaults; &inProgressFault; </method>
|
||||||
<method name="POST" id="rebuild">
|
<method name="POST" id="rebuild">
|
||||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" title="Rebuild server (rebuild action)">
|
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
||||||
|
title="Rebuild server (rebuild action)">
|
||||||
<para role="shortdesc">
|
<para role="shortdesc">
|
||||||
Rebuilds a server.
|
Rebuilds a server.
|
||||||
</para>
|
</para>
|
||||||
@@ -837,7 +842,9 @@
|
|||||||
<method name="POST" id="unlock">
|
<method name="POST" id="unlock">
|
||||||
<wadl:doc xml:lang="EN" title="Unlock server (unlock action)"
|
<wadl:doc xml:lang="EN" title="Unlock server (unlock action)"
|
||||||
xmlns="http://docbook.org/ns/docbook">
|
xmlns="http://docbook.org/ns/docbook">
|
||||||
<para role="shortdesc">Unlocks a server.</para>
|
<para role="shortdesc">
|
||||||
|
Unlocks a locked server.
|
||||||
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Specify the <code>unlock</code> action in the request body.
|
Specify the <code>unlock</code> action in the request body.
|
||||||
</para>
|
</para>
|
||||||
@@ -895,12 +902,10 @@
|
|||||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
||||||
title="Unrescue server (unrescue action)">
|
title="Unrescue server (unrescue action)">
|
||||||
<para role="shortdesc">
|
<para role="shortdesc">
|
||||||
Unrescues a server. Changes status to
|
Unrescues a server. Changes status to <code>ACTIVE</code>.
|
||||||
<code>ACTIVE</code>.
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Specify the <code>unrescue</code>
|
Specify the <code>unrescue</code> action in the request body.
|
||||||
action in the request body.
|
|
||||||
</para>
|
</para>
|
||||||
<para>Preconditions</para>
|
<para>Preconditions</para>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
@@ -915,7 +920,8 @@
|
|||||||
After you successfully unrescue a server and make a
|
After you successfully unrescue a server and make a
|
||||||
<code>GET
|
<code>GET
|
||||||
/v2.1/{tenant_id}/servers/{server_id}</code>
|
/v2.1/{tenant_id}/servers/{server_id}</code>
|
||||||
request, its status changes to <code>ACTIVE</code>.</para>
|
request, its status changes to <code>ACTIVE</code>.
|
||||||
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</wadl:doc>
|
</wadl:doc>
|
||||||
@@ -933,4 +939,56 @@
|
|||||||
</request>
|
</request>
|
||||||
<response status="202"/>
|
<response status="202"/>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="POST" id="addSecurityGroup">
|
||||||
|
<wadl:doc xml:lang="EN" title="Add security group to a server (addSecurityGroup action)"
|
||||||
|
xmlns="http://docbook.org/ns/docbook">
|
||||||
|
<para role="shortdesc">
|
||||||
|
Adds a security group to a server.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Specify the <code>addSecurityGroup</code> action in the request body.
|
||||||
|
</para>
|
||||||
|
</wadl:doc>
|
||||||
|
<request>
|
||||||
|
<representation mediaType="application/json">
|
||||||
|
<wadl:doc xml:lang="EN"
|
||||||
|
xmlns="http://docbook.org/ns/docbook">
|
||||||
|
<xsdxt:code
|
||||||
|
href="../samples/servers-action-admin/addSecurityGroup-request.json"
|
||||||
|
/>
|
||||||
|
</wadl:doc>
|
||||||
|
&addSecurityGroupActionRequestParameter;
|
||||||
|
</representation>
|
||||||
|
</request>
|
||||||
|
<response status="202"/>
|
||||||
|
&commonFaults;
|
||||||
|
&postPutFaults;
|
||||||
|
</method>
|
||||||
|
<method name="POST" id="removeSecurityGroup">
|
||||||
|
<wadl:doc xml:lang="EN"
|
||||||
|
title="Remove security group from a server (removeSecurityGroup action)"
|
||||||
|
xmlns="http://docbook.org/ns/docbook">
|
||||||
|
<para role="shortdesc">
|
||||||
|
Removes a security group from a server.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Specify the <code>removeSecurityGroup</code> action in the
|
||||||
|
request body.
|
||||||
|
</para>
|
||||||
|
</wadl:doc>
|
||||||
|
<request>
|
||||||
|
<representation mediaType="application/json">
|
||||||
|
<wadl:doc xml:lang="EN"
|
||||||
|
xmlns="http://docbook.org/ns/docbook">
|
||||||
|
<xsdxt:code
|
||||||
|
href="../samples/servers-action-admin/removeSecurityGroup-request.json"
|
||||||
|
/>
|
||||||
|
</wadl:doc>
|
||||||
|
&removeSecurityGroupActionRequestParameter;
|
||||||
|
</representation>
|
||||||
|
</request>
|
||||||
|
<response status="202"/>
|
||||||
|
&commonFaults;
|
||||||
|
&postPutFaults;
|
||||||
|
</method>
|
||||||
</application>
|
</application>
|
||||||
|
|||||||
Reference in New Issue
Block a user