Method | URI | Description |
---|---|---|
POST | /v2/{tenant_id}/servers/{server_id}/action | Rebuilds the specified server.
Specify the |
Normal response codes: 202
Error response codes: computeFault (400, 500, …), serviceUnavailable (503), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), itemNotFound (404), badMediaType (415), serverCapacityUnavailable (503), buildInProgress (409)
This table shows the URI parameters for the rebuild server request:
Name | Type | Description |
---|---|---|
| UUID | The tenant ID in a multi-tenancy cloud. |
| UUID | The UUID for the server. |
Example 2.29. Rebuild server: JSON request
{ "rebuild" : { "imageRef" : "http://openstack.example.com/v2/32278/images/70a599e0-31e7-49b7-b260-868f441e862b", "name" : "foobar", "adminPass" : "seekr3t", "accessIPv4" : "1.2.3.4", "accessIPv6" : "fe80::100", "metadata" : { "meta var" : "meta val" }, "personality" : [ { "path" : "/etc/banner.txt", "contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA==" } ] } }
Example 2.30. Rebuild server: XML request
<?xml version="1.0" encoding="UTF-8"?> <rebuild xmlns="http://docs.openstack.org/compute/api/v1.1" name="foobar" imageRef="http://openstack.example.com/v1.1/32278/images/70a599e0-31e7-49b7-b260-868f441e862b" accessIPv4="1.2.3.4" accessIPv6="fe80::100" adminPass="seekr3t"> <metadata> <meta key="My Server Name">Apache1</meta> </metadata> <personality> <file path="/etc/banner.txt"> ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA== </file> </personality> </rebuild>
This table shows the header parameters for the rebuild server response:
Name | Type | Description |
---|---|---|
| AnyURI (Required) | Specific URL of the server you want to rebuild. |
Example 2.31. Rebuild server: JSON response
{ "server": { "accessIPv4": "1.2.3.4", "accessIPv6": "fe80::100", "addresses": { "private": [ { "addr": "192.168.0.3", "version": 4 } ] }, "adminPass": "seekr3t", "created": "2012-09-12T17:20:36Z", "flavor": { "id": "1", "links": [ { "href": "http://openstack.example.com/openstack/flavors/1", "rel": "bookmark" } ] }, "hostId": "1e3da81662354c25560b7e5ea6d8123031f67168b6992f20bb84df69", "id": "075e40fe-9f03-4652-ba8e-5f8e2547899a", "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/075e40fe-9f03-4652-ba8e-5f8e2547899a", "rel": "self" }, { "href": "http://openstack.example.com/openstack/servers/075e40fe-9f03-4652-ba8e-5f8e2547899a", "rel": "bookmark" } ], "metadata": { "meta var": "meta val" }, "name": "foobar", "progress": 0, "status": "ACTIVE", "tenant_id": "openstack", "updated": "2012-09-12T17:20:37Z", "user_id": "fake" } }
Example 2.32. Rebuild server: XML response
<?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="ACTIVE" updated="2012-09-14T16:41:46Z" hostId="a0e37e3bd9f674600aabeeccb123d80ae2717ace90893d79cd4abc46" name="foobar" created="2012-09-14T16:41:45Z" userId="fake" tenantId="openstack" accessIPv4="1.2.3.4" accessIPv6="fe80::100" progress="0" id="943acea5-2fc8-4f31-bab6-8f7b9ac923ca" adminPass="seekr3t"> <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/943acea5-2fc8-4f31-bab6-8f7b9ac923ca" rel="self"/> <atom:link href="http://openstack.example.com/openstack/servers/943acea5-2fc8-4f31-bab6-8f7b9ac923ca" rel="bookmark"/> </server>