Merge "Add rescue description to Compute v2.1"

This commit is contained in:
Jenkins 2015-08-07 15:02:51 +00:00 committed by Gerrit Code Review
commit 3f6780f113
7 changed files with 182 additions and 7 deletions

View File

@ -0,0 +1,53 @@
{
"server": {
"accessIPv4": "",
"accessIPv6": "",
"addresses": {
"private": [
{
"addr": "192.168.0.3",
"version": 4
}
]
},
"created": "2012-09-19T09:22:27Z",
"flavor": {
"id": "1",
"links": [
{
"href": "http://openstack.example.com/openstack/flavors/1",
"rel": "bookmark"
}
]
},
"hostId": "c02c15d17499304e9893d9fc41c415f5096f8aa880bc651cac092650",
"id": "7e21a264-6cc1-4d90-b7b5-f9f49cec3a85",
"image": {
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
"links": [
{
"href": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"rel": "bookmark"
}
]
},
"links": [
{
"href": "http://openstack.example.com/v2/openstack/servers/7e21a264-6cc1-4d90-b7b5-f9f49cec3a85",
"rel": "self"
},
{
"href": "http://openstack.example.com/openstack/servers/7e21a264-6cc1-4d90-b7b5-f9f49cec3a85",
"rel": "bookmark"
}
],
"metadata": {
"My Server Name": "Apache1"
},
"name": "new-server-test",
"status": "RESCUE",
"tenant_id": "openstack",
"updated": "2012-09-19T09:22:27Z",
"user_id": "fake"
}
}

View File

@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="RESCUE" updated="2012-09-19T11:44:22Z" hostId="8eb4062a49009f6ee8066fbe1ed4c60d67b0a4ebd4434f51d8f03293" name="new-server-test" created="2012-09-19T11:44:22Z" userId="fake" tenantId="openstack" accessIPv4="" accessIPv6="" id="eb2b2fbb-a6f8-4363-9007-e9a9098ea080">
<image id="70a599e0-31e7-49b7-b260-868f441e862b">
<atom:link href="http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b" rel="bookmark"/>
</image>
<flavor id="1">
<atom:link href="http://openstack.example.com/openstack/flavors/1" rel="bookmark"/>
</flavor>
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<addresses>
<network id="private">
<ip version="4" addr="192.168.0.3"/>
</network>
</addresses>
<atom:link href="http://openstack.example.com/v2/openstack/servers/eb2b2fbb-a6f8-4363-9007-e9a9098ea080" rel="self"/>
<atom:link href="http://openstack.example.com/openstack/servers/eb2b2fbb-a6f8-4363-9007-e9a9098ea080" rel="bookmark"/>
</server>

View File

@ -0,0 +1,6 @@
{
"rescue": {
"adminPass": "MySecretPass",
"rescue_image_ref": "70a599e0-31e7-49b7-b260-868f441e862b"
}
}

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<rescue xmlns="http://docs.openstack.org/compute/api/v1.1"
adminPass="MySecretPass"/>

View File

@ -0,0 +1,3 @@
{
"adminPass": "MySecretPass"
}

View File

@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<adminPass>MySecretPass</adminPass>

View File

@ -30,6 +30,7 @@
<method href="#start"/>
<method href="#stop"/>
<method href="#attachVolume"/>
<method href="#rescue"/>
</resource>
</resource>
</resource>
@ -228,12 +229,14 @@
</para>
<para>
After you make this request, you typically must keep polling
the created image's status to determine whether the request
succeeded. A successfully creating image operation shows an
image's status of <code>available</code> and the serve's
status goes back to the original status. You can also see the
new image in the image back end that OpenStack Image service
manages.
the status of the created image to determine whether the
request succeeded.
</para>
<para>
If the operation succeeds, the created image has a status of
<code>available</code> and the server status returns to the
original status. You can also see the new image in the image
back end that OpenStack Image service manages.
</para>
<para>Preconditions</para>
<itemizedlist>
@ -445,5 +448,91 @@
<representation mediaType="application/json"/>
</response>
<!-- All other faults, build, common, get, post/put, and inProgress --> &commonFaults;
&getFaults; &postPutFaults; &buildFaults; &inProgressFault; </method>
&getFaults; &postPutFaults; &buildFaults; &inProgressFault;
</method>
<method name="POST" id="rescue">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Rescue server">
<para role="shortdesc">
Puts a server in rescue mode and changes its status to
<code>RESCUE</code>.
</para>
<para>
If you specify the <code>rescue_image_ref</code> extended
attribute, the specified image is used to rescue the instance.
If you omit an image reference, the base image reference is
used by default.
</para>
</wadl:doc>
<request>
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Rescue server: JSON request">
<xsdxt:code
href="../api_samples/servers/server-rescue-req.json"
/>
</wadl:doc>
</representation>
<representation mediaType="application/xml">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Rescue server: XML request">
<xsdxt:code
href="../api_samples/servers/server-rescue-req.xml"
/>
</wadl:doc>
<param name="rescue" style="plain" type="xsd:string"
required="true">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Rescue action"
><para>Specify the <code>rescue</code>
action in the request
body.</para></wadl:doc>
</param>
<param name="adminPass" style="plain"
type="csapi:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Admin password">
<para>
The password for the rescued instance. If you omit
this parameter, the operation generates a new
password.
</para>
</wadl:doc>
</param>
<param name="rescue_image_ref" style="plain"
type="csapi:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Image reference for rescue">
<para>
The image reference to use to rescue your server
instance. Specify the image reference by ID or
full URL.
</para>
<para>
If you omit an image reference, default is the
base image reference.
</para>
</wadl:doc>
</param>
</representation>
</request>
<response status="202">
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Extended rescue server: JSON response">
<xsdxt:code
href="../api_samples/servers/server-get-resp-rescue.json"
/>
</wadl:doc>
</representation>
<representation mediaType="application/xml">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Extended rescue server: XML response">
<xsdxt:code
href="../api_samples/servers/server-get-resp-rescue.xml"
/>
</wadl:doc>
</representation>
</response>
</method>
</application>