From 7ab1c7669ca96c5bd3ac002e2488ca5f68d9b2ed Mon Sep 17 00:00:00 2001 From: Diane Fleming Date: Sun, 23 Aug 2015 17:17:44 -0500 Subject: [PATCH] Update rescue and unrescue operations Change-Id: I1f4e1bb105e6c6eb440e510276848369efdb9f33 Closes-Bug: #1204356 Partial-Bug: #1488144 --- api-ref-guides/pom.xml | 6 +- .../os-rescue/server-get-resp-rescue.json | 10 +- .../os-rescue/server-get-resp-unrescue.json | 10 +- .../servers/server-rescue-req.json | 2 +- .../api_samples/servers/server-rescue.json | 2 +- .../src/v2.1/wadl/os-server-actions-v2.1.wadl | 123 +++++++++++++++--- .../os-rescue/server-get-resp-rescue.json | 21 +-- .../os-rescue/server-get-resp-unrescue.json | 21 +-- .../server-rescue-req-with-image-ref.json | 6 + .../os-rescue/server-rescue-req.json | 2 +- .../api_samples/os-rescue/server-rescue.json | 2 +- .../os-rescue/server-unrescue-req.json | 2 +- .../compute-api/src/v2/ext/os-rescue.wadl | 84 +++++++++++- 13 files changed, 230 insertions(+), 61 deletions(-) create mode 100644 api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-rescue-req-with-image-ref.json diff --git a/api-ref-guides/pom.xml b/api-ref-guides/pom.xml index bc6d7f2d5..18853b3b3 100644 --- a/api-ref-guides/pom.xml +++ b/api-ref-guides/pom.xml @@ -39,7 +39,7 @@ - + os-api-ref generate-pdf @@ -71,7 +71,7 @@ bk-api-ref-blockstorage-v1.xml api-ref-blockstorage-v1 - + os-api-ref-compute-v2 @@ -105,7 +105,7 @@ api-ref-compute-v2.1 - + os-api-ref-database-v1 generate-pdf diff --git a/api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-rescue/server-get-resp-rescue.json b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-rescue/server-get-resp-rescue.json index b74dc25b5..3767a7b85 100644 --- a/api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-rescue/server-get-resp-rescue.json +++ b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-rescue/server-get-resp-rescue.json @@ -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" } ], diff --git a/api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-rescue/server-get-resp-unrescue.json b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-rescue/server-get-resp-unrescue.json index 86149510f..7abb52005 100644 --- a/api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-rescue/server-get-resp-unrescue.json +++ b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-rescue/server-get-resp-unrescue.json @@ -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" } ], diff --git a/api-ref/src/wadls/compute-api/src/v2.1/api_samples/servers/server-rescue-req.json b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/servers/server-rescue-req.json index 8a4ad0d52..54febf83c 100644 --- a/api-ref/src/wadls/compute-api/src/v2.1/api_samples/servers/server-rescue-req.json +++ b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/servers/server-rescue-req.json @@ -1,6 +1,6 @@ { "rescue": { - "adminPass": "MySecretPass", + "admin_pass": "MySecretPass", "rescue_image_ref": "70a599e0-31e7-49b7-b260-868f441e862b" } } diff --git a/api-ref/src/wadls/compute-api/src/v2.1/api_samples/servers/server-rescue.json b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/servers/server-rescue.json index a023c720b..9a6a4a226 100644 --- a/api-ref/src/wadls/compute-api/src/v2.1/api_samples/servers/server-rescue.json +++ b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/servers/server-rescue.json @@ -1,3 +1,3 @@ { - "adminPass": "MySecretPass" + "admin_pass": "MySecretPass" } diff --git a/api-ref/src/wadls/compute-api/src/v2.1/wadl/os-server-actions-v2.1.wadl b/api-ref/src/wadls/compute-api/src/v2.1/wadl/os-server-actions-v2.1.wadl index e7a26ea9b..3fdf68104 100644 --- a/api-ref/src/wadls/compute-api/src/v2.1/wadl/os-server-actions-v2.1.wadl +++ b/api-ref/src/wadls/compute-api/src/v2.1/wadl/os-server-actions-v2.1.wadl @@ -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"> @@ -31,6 +32,7 @@ + @@ -110,12 +112,12 @@ action in the request body. - A successfully resized server shows a status of - VERIFY_RESIZE, a vm_status of - RESIZED, and a migration_status of - finished. If you set the auto_confirm option of - the Compute service to True, the Compute service - automatically confirms the resize operation. + A successfully resized server shows a + VERIFY_RESIZE status, RESIZED VM + status, and finished migration status. If you set + the auto_confirm option of the Compute service to + True, the Compute service automatically confirms + the resize operation. Preconditions @@ -303,12 +305,16 @@ Troubleshooting - If the server status does not change - to ACTIVE, 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. - + + + If the server status does not change to + ACTIVE, 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. + + @@ -463,25 +469,44 @@ If you omit an image reference, the base image reference is used by default. + Asynchronous Postconditions + + + + After you successfully rescue a server and make a + GET + /v2.1/​{tenant_id}​/servers/​{server_id}​ + request, its status changes to UNRESCUE. + + + + + Specify the rescue - action in the request - body. + > + + Specify the rescue action in the + request body. + + + type="csapi:string" required="false"> @@ -492,7 +517,7 @@ + type="csapi:string" required="false"> @@ -513,10 +538,68 @@ + + + + The password that enables the administrator to + access the rescued instance. + + + + + + + Unrescues a specified server. Changes status to + ACTIVE. + + Preconditions + + The specified server must exist. + You can only unrescue a server + when its status is RESCUE. + + Asynchronous Postconditions + + + + After you successfully unrescue a server and make a + GET + /v2.1/​{tenant_id}​/servers/​{server_id}​ + request, its status changes to ACTIVE. + + + + + + + + + + + + Specify the unrescue + action in the request body. + + + + + + + diff --git a/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-get-resp-rescue.json b/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-get-resp-rescue.json index d08191977..3767a7b85 100644 --- a/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-get-resp-rescue.json +++ b/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-get-resp-rescue.json @@ -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" } -} \ No newline at end of file +} diff --git a/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-get-resp-unrescue.json b/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-get-resp-unrescue.json index 21a35da7f..7abb52005 100644 --- a/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-get-resp-unrescue.json +++ b/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-get-resp-unrescue.json @@ -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" } -} \ No newline at end of file +} diff --git a/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-rescue-req-with-image-ref.json b/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-rescue-req-with-image-ref.json new file mode 100644 index 000000000..8a4ad0d52 --- /dev/null +++ b/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-rescue-req-with-image-ref.json @@ -0,0 +1,6 @@ +{ + "rescue": { + "adminPass": "MySecretPass", + "rescue_image_ref": "70a599e0-31e7-49b7-b260-868f441e862b" + } +} diff --git a/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-rescue-req.json b/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-rescue-req.json index 379660028..9459932f7 100644 --- a/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-rescue-req.json +++ b/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-rescue-req.json @@ -2,4 +2,4 @@ "rescue": { "adminPass": "MySecretPass" } -} \ No newline at end of file +} diff --git a/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-rescue.json b/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-rescue.json index 6cd942395..a023c720b 100644 --- a/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-rescue.json +++ b/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-rescue.json @@ -1,3 +1,3 @@ { "adminPass": "MySecretPass" -} \ No newline at end of file +} diff --git a/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-unrescue-req.json b/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-unrescue-req.json index cafc9b13a..635fb7a25 100644 --- a/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-unrescue-req.json +++ b/api-ref/src/wadls/compute-api/src/v2/api_samples/os-rescue/server-unrescue-req.json @@ -1,3 +1,3 @@ { "unrescue": null -} \ No newline at end of file +} diff --git a/api-ref/src/wadls/compute-api/src/v2/ext/os-rescue.wadl b/api-ref/src/wadls/compute-api/src/v2/ext/os-rescue.wadl index c04b9982e..05757993a 100644 --- a/api-ref/src/wadls/compute-api/src/v2/ext/os-rescue.wadl +++ b/api-ref/src/wadls/compute-api/src/v2/ext/os-rescue.wadl @@ -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"> @@ -45,7 +46,24 @@ Puts a server in rescue mode. - Changes status to RESCUE. + Changes status to RESCUE. + + + If you specify the rescue_image_ref 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. + + Asynchronous Postconditions + + + + After you successfully unrescue a server and make a + GET + /v2.1/​{tenant_id}​/servers/​{server_id}​ + request, its status changes to ACTIVE. + + @@ -55,6 +73,12 @@ href="../api_samples/os-rescue/server-rescue-req.json" /> + + + + + + + The image reference to use to rescue your server + instance. Specify the image reference by ID or + full URL. + + + If you omit an image reference, default is the + base image reference. + + + + xml:lang="EN" title="Extended rescue server: JSON response"> + + + + The password that enables the administrator to + access the rescued instance. + + + - Unrescues a server. + + Unrescues a server. Changes status to ACTIVE. + + Preconditions + + The specified server must exist. + You can only unrescue a server + when its status is RESCUE. + + Asynchronous Postconditions + + + + After you successfully unrescue a server and make a + GET + /v2.1/​{tenant_id}​/servers/​{server_id}​ + request, its status changes to ACTIVE. + + @@ -126,9 +193,12 @@ required="true"> Specify the unrescue - action in the request - body. + > + + Specify the unrescue + action in the request body. + +