Add DELETE method for os-server-password

os-server-password has DELETE method to clear the password,
it's not in the microversion, so we should add it

Change-Id: Ie9ab5f612303fe1b16537d7a29c73f848e390167
Partial-Bug: #1515222
This commit is contained in:
jichenjc 2015-11-22 03:36:20 +08:00 committed by Diane Fleming
parent e436753e9d
commit fba7dacffe
2 changed files with 32 additions and 7 deletions

View File

@ -358,8 +358,9 @@
<section xml:id="os-server-password-v2.1">
<title>Servers password (servers, os-server-password)</title>
<para>
Gets the encrypted administrative password set through the metadata
service.
Gets the encrypted administrative password. Also, clears the
encrypted administrative password for a server, which removes it from
the metadata server.
</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-server-password-v2.1.wadl"

View File

@ -22,6 +22,7 @@
<resource id="os-server-password"
path="os-server-password">
<method href="#getPassword"/>
<method href="#clearPassword"/>
</resource>
</resource>
</resource>
@ -31,12 +32,14 @@
<method name="GET" id="getPassword">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Get server password">
<para role="shortdesc">Gets the administrative password
for a server.</para>
<para role="shortdesc">
Gets the administrative password for a server.
</para>
<para>
Policy defaults enable only users with the administrative role
or the owner of the server to perform this operation. Cloud providers can change
these permissions through the <code>policy.json</code> file.
Policy defaults enable only users with the administrative role
or the owner of the server to perform this operation. Cloud
providers can change these permissions through the
<code>policy.json</code> file.
</para>
</wadl:doc>
<response status="200">
@ -50,4 +53,25 @@
</representation>
</response>
</method>
<method name="DELETE" id="clearPassword">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Clear admin password">
<para role="shortdesc">
Clears the encrypted administrative password for a server,
which removes it from the metadata server.
</para>
<para>
This action does not actually change the instance server
password.
</para>
<para>
Policy defaults enable only users with the administrative role
or the owner of the server to perform this operation. Cloud
providers can change these permissions through the
<code>policy.json</code> file.
</para>
</wadl:doc>
<response status="204">
</response>
</method>
</application>