From 6dd32c6c92e3734c44fa39533eadabb148319062 Mon Sep 17 00:00:00 2001 From: Atsushi SAKAI Date: Fri, 18 Sep 2015 09:59:57 +0900 Subject: [PATCH] Compute v2.1 docs clean up (part15) (os-block-device-mapping) WADL file and JSON files are from v2 ext. Removes listServers (since it does not exist on nova/nova/api/openstack/compute/block_device_mapping.py) Adds block-device-mapping-v1 URL path is changed from /v2 to /v2.1 Keep JSON sample files only (XML sample files are not included) P.S. All attributes of block-device mapping is in https://github.com/openstack/nova/blob/stable/kilo/nova/block_device.py (Both version) Change-Id: I5aa201102aabd4b7581002f6eccca0b67e070fcb Partial-Bug: #1488144 --- api-ref/src/docbkx/ch_compute-v2.1.xml | 8 ++ .../server-post-req.json | 33 ++++++ .../server-post-resp.json | 16 +++ .../src/wadls/compute-api/src/v2.1/common.ent | 109 +++++++++++++++--- .../wadl/os-block-device-mapping-v2.1.wadl | 104 +++++++++++++++++ 5 files changed, 257 insertions(+), 13 deletions(-) create mode 100644 api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-block-device-mapping/server-post-req.json create mode 100644 api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-block-device-mapping/server-post-resp.json create mode 100644 api-ref/src/wadls/compute-api/src/v2.1/wadl/os-block-device-mapping-v2.1.wadl diff --git a/api-ref/src/docbkx/ch_compute-v2.1.xml b/api-ref/src/docbkx/ch_compute-v2.1.xml index 3db3d5292..57a4aee9a 100644 --- a/api-ref/src/docbkx/ch_compute-v2.1.xml +++ b/api-ref/src/docbkx/ch_compute-v2.1.xml @@ -412,6 +412,14 @@ href="../wadls/compute-api/src/v2.1/wadl/os-baremetal-nodes-v2.1.wadl" xmlns:wadl="http://wadl.dev.java.net/2009/02"/> +
+ Servers with block device mapping format + (servers, os-block-device-mapping) + Creates a server with a block device mapping. + +
Cells (os-cells, capacities) diff --git a/api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-block-device-mapping/server-post-req.json b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-block-device-mapping/server-post-req.json new file mode 100644 index 000000000..41983de60 --- /dev/null +++ b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-block-device-mapping/server-post-req.json @@ -0,0 +1,33 @@ +{ + "server": { + "name": "new-server-test", + "imageRef": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b", + "flavorRef": "http://openstack.example.com/openstack/flavors/1", + "metadata": { + "My Server Name": "Apache1" + }, + "personality": [ + { + "path": "/etc/banner.txt", + "contents": "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA==" + } + ], + "block_device_mapping_v2": [ + { + "device_name": "/dev/sdb1", + "source_type": "blank", + "destination_type": "local", + "delete_on_termination": "True", + "guest_format": "swap", + "boot_index": "-1" + }, + { + "device_name": "/dev/sda1", + "source_type": "volume", + "destination_type": "volume", + "uuid": "fake-volume-id-1", + "boot_index": "0" + } + ] + } +} diff --git a/api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-block-device-mapping/server-post-resp.json b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-block-device-mapping/server-post-resp.json new file mode 100644 index 000000000..d3a4f558c --- /dev/null +++ b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/os-block-device-mapping/server-post-resp.json @@ -0,0 +1,16 @@ +{ + "server": { + "adminPass": "N4x7wFX6iN8D", + "id": "babd1af0-4fc6-4529-b32f-aad69811ccf5", + "links": [ + { + "href": "http://openstack.example.com/v2/openstack/servers/babd1af0-4fc6-4529-b32f-aad69811ccf5", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/servers/babd1af0-4fc6-4529-b32f-aad69811ccf5", + "rel": "bookmark" + } + ] + } +} diff --git a/api-ref/src/wadls/compute-api/src/v2.1/common.ent b/api-ref/src/wadls/compute-api/src/v2.1/common.ent index dbcf57314..9585a06b8 100644 --- a/api-ref/src/wadls/compute-api/src/v2.1/common.ent +++ b/api-ref/src/wadls/compute-api/src/v2.1/common.ent @@ -135,7 +135,7 @@