Merge "Update rescue and unrescue operations"

This commit is contained in:
Jenkins 2015-09-23 21:25:40 +00:00 committed by Gerrit Code Review
commit e9795b2697
13 changed files with 230 additions and 61 deletions

View File

@ -39,7 +39,7 @@
<!-- version is set in ../pom.xml file -->
<executions>
<!-- Configuration for OpenStack API Guide -->
<execution>
<execution>
<id>os-api-ref</id>
<goals>
<goal>generate-pdf</goal>
@ -71,7 +71,7 @@
<includes> bk-api-ref-blockstorage-v1.xml </includes>
<pdfFilenameBase>api-ref-blockstorage-v1</pdfFilenameBase>
</configuration>
</execution>
</execution>
<execution>
<id>os-api-ref-compute-v2</id>
<goals>
@ -105,7 +105,7 @@
<pdfFilenameBase>api-ref-compute-v2.1</pdfFilenameBase>
</configuration>
</execution>
<execution>
<execution>
<id>os-api-ref-database-v1</id>
<goals>
<goal>generate-pdf</goal>

View File

@ -1,5 +1,7 @@
{
"server": {
"accessIPv4": "1.2.3.4",
"accessIPv6": "80fe::",
"addresses": {
"private": [
{
@ -15,7 +17,7 @@
"id": "1",
"links": [
{
"href": "http://openstack.example.com/flavors/1",
"href": "http://openstack.example.com/openstack/flavors/1",
"rel": "bookmark"
}
]
@ -26,7 +28,7 @@
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
"links": [
{
"href": "http://openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
"href": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"rel": "bookmark"
}
]
@ -34,11 +36,11 @@
"key_name": null,
"links": [
{
"href": "http://openstack.example.com/v2.1/servers/2fd0c66b-50af-41d2-9253-9fa41e7e8dd8",
"href": "http://openstack.example.com/v2/openstack/servers/2fd0c66b-50af-41d2-9253-9fa41e7e8dd8",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/2fd0c66b-50af-41d2-9253-9fa41e7e8dd8",
"href": "http://openstack.example.com/openstack/servers/2fd0c66b-50af-41d2-9253-9fa41e7e8dd8",
"rel": "bookmark"
}
],

View File

@ -1,5 +1,7 @@
{
"server": {
"accessIPv4": "1.2.3.4",
"accessIPv6": "80fe::",
"addresses": {
"private": [
{
@ -15,7 +17,7 @@
"id": "1",
"links": [
{
"href": "http://openstack.example.com/flavors/1",
"href": "http://openstack.example.com/openstack/flavors/1",
"rel": "bookmark"
}
]
@ -26,7 +28,7 @@
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
"links": [
{
"href": "http://openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
"href": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"rel": "bookmark"
}
]
@ -34,11 +36,11 @@
"key_name": null,
"links": [
{
"href": "http://openstack.example.com/v2.1/servers/edfc3905-1f3c-4819-8fc3-a7d8131cfa22",
"href": "http://openstack.example.com/v2/openstack/servers/edfc3905-1f3c-4819-8fc3-a7d8131cfa22",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/edfc3905-1f3c-4819-8fc3-a7d8131cfa22",
"href": "http://openstack.example.com/openstack/servers/edfc3905-1f3c-4819-8fc3-a7d8131cfa22",
"rel": "bookmark"
}
],

View File

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

View File

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

View File

@ -10,7 +10,8 @@
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:csapi="http://docs.openstack.org/identity/api/v3">
xmlns:csapi="http://docs.openstack.org/identity/api/v3"
xmlns:xlink="http://www.w3.org/1999/xlink">
<resources base="https://servers.api.openstack.com"
xml:id="os-server-actions-v2.1">
<resource id="v2.1" path="//v2.1">
@ -31,6 +32,7 @@
<method href="#stop"/>
<method href="#attachVolume"/>
<method href="#rescue"/>
<method href="#unrescue"/>
</resource>
</resource>
</resource>
@ -110,12 +112,12 @@
action in the request body.
</para>
<para>
A successfully resized server shows a status of
<code>VERIFY_RESIZE</code>, a vm_status of
<code>RESIZED</code>, and a migration_status of
<code>finished</code>. If you set the auto_confirm option of
the Compute service to <code>True</code>, the Compute service
automatically confirms the resize operation.
A successfully resized server shows a
<code>VERIFY_RESIZE</code> status, <code>RESIZED</code> VM
status, and <code>finished</code> migration status. If you set
the <code>auto_confirm</code> option of the Compute service to
<code>True</code>, the Compute service automatically confirms
the resize operation.
</para>
<para>Preconditions</para>
<itemizedlist>
@ -303,12 +305,16 @@
</itemizedlist>
<para>Troubleshooting</para>
<itemizedlist>
<listitem><para>If the server status does not change
to <code>ACTIVE</code>, the start operation failed. Ensure
that you meet the preconditions and run the request again.
If the request fails again, investigate whether another
operation is running that causes a race condition.
</para></listitem>
<listitem>
<para>
If the server status does not change to
<code>ACTIVE</code>, the start operation failed.
Ensure that you meet the preconditions and run the
request again. If the request fails again, investigate
whether another operation is running that causes a
race condition.
</para>
</listitem>
</itemizedlist>
</wadl:doc>
<request>
@ -463,25 +469,44 @@
If you omit an image reference, the base image reference is
used by default.
</para>
<para>Asynchronous Postconditions</para>
<itemizedlist>
<listitem>
<para>
After you successfully rescue a server and make a
<code>GET
/v2.1/{tenant_id}/servers/{server_id}</code>
request, its status changes to <code>UNRESCUE</code>.</para>
</listitem>
</itemizedlist>
</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"
href="../api_samples/os-rescue/server-rescue-req.json"
/>
</wadl:doc>
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Rescue server with image: JSON request">
<xsdxt:code
href="../api_samples/os-rescue/server-rescue-req-with-image-ref.json"
/>
</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>
>
<para>
Specify the <code>rescue</code> action in the
request body.
</para>
</wadl:doc>
</param>
<param name="adminPass" style="plain"
type="csapi:string">
type="csapi:string" required="false">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Admin password">
<para>
@ -492,7 +517,7 @@
</wadl:doc>
</param>
<param name="rescue_image_ref" style="plain"
type="csapi:string">
type="csapi:string" required="false">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Image reference for rescue">
<para>
@ -513,10 +538,68 @@
<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"
href="../api_samples/os-rescue/server-rescue.json"
/>
</wadl:doc>
<param name="adminPass" style="plain"
type="csapi:string" required="true">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Admin password">
<para>
The password that enables the administrator to
access the rescued instance.
</para>
</wadl:doc>
</param>
</representation>
</response>
</method>
<method name="POST" id="unrescue">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Unrescue server">
<para role="shortdesc">
Unrescues a specified server. Changes status to
<code>ACTIVE</code>.
</para>
<para>Preconditions</para>
<itemizedlist>
<listitem><para>The specified server must exist.</para></listitem>
<listitem><para>You can only unrescue a server
when its status is <code>RESCUE</code>.</para></listitem>
</itemizedlist>
<para>Asynchronous Postconditions</para>
<itemizedlist>
<listitem>
<para>
After you successfully unrescue a server and make a
<code>GET
/v2.1/{tenant_id}/servers/{server_id}</code>
request, its status changes to <code>ACTIVE</code>.</para>
</listitem>
</itemizedlist>
</wadl:doc>
<request>
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN"
title="Unrescue server: JSON request">
<xsdxt:code
href="../api_samples/os-rescue/server-unrescue-req.json"
/>
</wadl:doc>
<param name="unrescue" style="plain" type="xsd:string"
required="true">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Unrescue action"
>
<para>
Specify the <code>unrescue</code>
action in the request body.
</para>
</wadl:doc>
</param>
</representation>
</request>
<response status="202"/>
</method>
</application>

View File

@ -1,16 +1,18 @@
{
"server": {
"accessIPv4": "",
"accessIPv6": "",
"accessIPv4": "1.2.3.4",
"accessIPv6": "80fe::",
"addresses": {
"private": [
{
"addr": "192.168.0.3",
"OS-EXT-IPS-MAC:mac_addr": "aa:bb:cc:dd:ee:ff",
"OS-EXT-IPS:type": "fixed",
"version": 4
}
]
},
"created": "2012-09-19T09:22:27Z",
"created": "2013-09-18T07:22:09Z",
"flavor": {
"id": "1",
"links": [
@ -20,8 +22,8 @@
}
]
},
"hostId": "c02c15d17499304e9893d9fc41c415f5096f8aa880bc651cac092650",
"id": "7e21a264-6cc1-4d90-b7b5-f9f49cec3a85",
"hostId": "f04994c5b4aac1cacbb83b09c2506e457d97dd54f620961624574690",
"id": "2fd0c66b-50af-41d2-9253-9fa41e7e8dd8",
"image": {
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
"links": [
@ -31,13 +33,14 @@
}
]
},
"key_name": null,
"links": [
{
"href": "http://openstack.example.com/v2/openstack/servers/7e21a264-6cc1-4d90-b7b5-f9f49cec3a85",
"href": "http://openstack.example.com/v2/openstack/servers/2fd0c66b-50af-41d2-9253-9fa41e7e8dd8",
"rel": "self"
},
{
"href": "http://openstack.example.com/openstack/servers/7e21a264-6cc1-4d90-b7b5-f9f49cec3a85",
"href": "http://openstack.example.com/openstack/servers/2fd0c66b-50af-41d2-9253-9fa41e7e8dd8",
"rel": "bookmark"
}
],
@ -47,7 +50,7 @@
"name": "new-server-test",
"status": "RESCUE",
"tenant_id": "openstack",
"updated": "2012-09-19T09:22:27Z",
"updated": "2013-09-18T07:22:11Z",
"user_id": "fake"
}
}
}

View File

@ -1,16 +1,18 @@
{
"server": {
"accessIPv4": "",
"accessIPv6": "",
"accessIPv4": "1.2.3.4",
"accessIPv6": "80fe::",
"addresses": {
"private": [
{
"addr": "192.168.0.3",
"OS-EXT-IPS-MAC:mac_addr": "aa:bb:cc:dd:ee:ff",
"OS-EXT-IPS:type": "fixed",
"version": 4
}
]
},
"created": "2012-09-19T09:22:28Z",
"created": "2013-09-18T07:22:09Z",
"flavor": {
"id": "1",
"links": [
@ -20,8 +22,8 @@
}
]
},
"hostId": "a9410a6a8cb87328b1c43cda5c5a15fc860e977d14feb2c9528a2450",
"id": "f1ec6ac3-5379-4cdc-af9a-6ddc29656e4f",
"hostId": "53cd4520a6cc639eeabcae4a0512b93e4675d431002e0b60e2dcfc04",
"id": "edfc3905-1f3c-4819-8fc3-a7d8131cfa22",
"image": {
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
"links": [
@ -31,13 +33,14 @@
}
]
},
"key_name": null,
"links": [
{
"href": "http://openstack.example.com/v2/openstack/servers/f1ec6ac3-5379-4cdc-af9a-6ddc29656e4f",
"href": "http://openstack.example.com/v2/openstack/servers/edfc3905-1f3c-4819-8fc3-a7d8131cfa22",
"rel": "self"
},
{
"href": "http://openstack.example.com/openstack/servers/f1ec6ac3-5379-4cdc-af9a-6ddc29656e4f",
"href": "http://openstack.example.com/openstack/servers/edfc3905-1f3c-4819-8fc3-a7d8131cfa22",
"rel": "bookmark"
}
],
@ -48,7 +51,7 @@
"progress": 0,
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-09-19T09:22:28Z",
"updated": "2013-09-18T07:22:12Z",
"user_id": "fake"
}
}
}

View File

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

View File

@ -2,4 +2,4 @@
"rescue": {
"adminPass": "MySecretPass"
}
}
}

View File

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

View File

@ -10,7 +10,8 @@
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:csapi="http://docs.openstack.org/compute/api/v1.1">
xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<resources base="https://servers.api.openstack.com"
xml:id="os-rescue-v2">
<resource id="version" type="#VersionDetails" path="//v2">
@ -45,7 +46,24 @@
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Rescue server">
<para role="shortdesc">Puts a server in rescue mode.
Changes status to RESCUE.</para>
Changes 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>
<para>Asynchronous Postconditions</para>
<itemizedlist>
<listitem>
<para>
After you successfully unrescue a server and make a
<code>GET
/v2.1/{tenant_id}/servers/{server_id}</code>
request, its status changes to <code>ACTIVE</code>.</para>
</listitem>
</itemizedlist>
</wadl:doc>
<request>
<representation mediaType="application/json">
@ -55,6 +73,12 @@
href="../api_samples/os-rescue/server-rescue-req.json"
/>
</wadl:doc>
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Rescue server with image: JSON request">
<xsdxt:code
href="../api_samples/os-rescue/server-rescue-req-with-image-ref.json"
/>
</wadl:doc>
</representation>
<representation mediaType="application/xml">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
@ -79,16 +103,41 @@
Generate a new password if none is
provided.</para></wadl:doc>
</param>
<param name="rescue_image_ref" style="plain"
type="csapi:string" required="false">
<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="200">
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Rescue server: JSON response">
xml:lang="EN" title="Extended rescue server: JSON response">
<xsdxt:code
href="../api_samples/os-rescue/server-rescue.json"
/>
</wadl:doc>
<param name="adminPass" style="plain"
type="csapi:string" required="true">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Admin password">
<para>
The password that enables the administrator to
access the rescued instance.
</para>
</wadl:doc>
</param>
</representation>
<representation mediaType="application/xml">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
@ -103,7 +152,25 @@
<method name="POST" id="unrescue">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Unrescue server">
<para role="shortdesc">Unrescues a server.</para>
<para role="shortdesc">
Unrescues a server. Changes status to <code>ACTIVE</code>.
</para>
<para>Preconditions</para>
<itemizedlist>
<listitem><para>The specified server must exist.</para></listitem>
<listitem><para>You can only unrescue a server
when its status is <code>RESCUE</code>.</para></listitem>
</itemizedlist>
<para>Asynchronous Postconditions</para>
<itemizedlist>
<listitem>
<para>
After you successfully unrescue a server and make a
<code>GET
/v2.1/{tenant_id}/servers/{server_id}</code>
request, its status changes to <code>ACTIVE</code>.</para>
</listitem>
</itemizedlist>
</wadl:doc>
<request>
<representation mediaType="application/json">
@ -126,9 +193,12 @@
required="true">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Unrescue action"
><para>Specify the <code>unrescue</code>
action in the request
body.</para></wadl:doc>
>
<para>
Specify the <code>unrescue</code>
action in the request body.
</para>
</wadl:doc>
</param>
</representation>
</request>