From 4a1d27c4ade3c40bc28455a49eeef5a199b5098c Mon Sep 17 00:00:00 2001 From: Tiago Mello Date: Tue, 26 Feb 2013 14:17:54 -0300 Subject: Adds API Sample tests for Volume Attachments Partially implements bp nova-api-samples Fixes Bug 1126204 Change-Id: I4b061f1916d688ad97c6a6ba4011dd13431a4fcb --- .../os-volumes/attach-volume-to-server-req.json | 6 ++++++ .../os-volumes/attach-volume-to-server-req.xml | 2 ++ .../os-volumes/attach-volume-to-server-resp.json | 8 ++++++++ .../os-volumes/attach-volume-to-server-resp.xml | 2 ++ .../os-volumes/list-volume-attachments-resp.json | 16 ++++++++++++++++ .../os-volumes/list-volume-attachments-resp.xml | 5 +++++ doc/api_samples/os-volumes/server-post-req.json | 16 ++++++++++++++++ doc/api_samples/os-volumes/server-post-req.xml | 19 +++++++++++++++++++ doc/api_samples/os-volumes/server-post-resp.json | 16 ++++++++++++++++ doc/api_samples/os-volumes/server-post-resp.xml | 6 ++++++ .../os-volumes/volume-attachment-detail-resp.json | 8 ++++++++ .../os-volumes/volume-attachment-detail-resp.xml | 2 ++ 12 files changed, 106 insertions(+) create mode 100644 doc/api_samples/os-volumes/attach-volume-to-server-req.json create mode 100644 doc/api_samples/os-volumes/attach-volume-to-server-req.xml create mode 100644 doc/api_samples/os-volumes/attach-volume-to-server-resp.json create mode 100644 doc/api_samples/os-volumes/attach-volume-to-server-resp.xml create mode 100644 doc/api_samples/os-volumes/list-volume-attachments-resp.json create mode 100644 doc/api_samples/os-volumes/list-volume-attachments-resp.xml create mode 100644 doc/api_samples/os-volumes/server-post-req.json create mode 100644 doc/api_samples/os-volumes/server-post-req.xml create mode 100644 doc/api_samples/os-volumes/server-post-resp.json create mode 100644 doc/api_samples/os-volumes/server-post-resp.xml create mode 100644 doc/api_samples/os-volumes/volume-attachment-detail-resp.json create mode 100644 doc/api_samples/os-volumes/volume-attachment-detail-resp.xml (limited to 'doc') diff --git a/doc/api_samples/os-volumes/attach-volume-to-server-req.json b/doc/api_samples/os-volumes/attach-volume-to-server-req.json new file mode 100644 index 000000000..4062687fc --- /dev/null +++ b/doc/api_samples/os-volumes/attach-volume-to-server-req.json @@ -0,0 +1,6 @@ +{ + "volumeAttachment": { + "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803", + "device": "/dev/vdd" + } +} \ No newline at end of file diff --git a/doc/api_samples/os-volumes/attach-volume-to-server-req.xml b/doc/api_samples/os-volumes/attach-volume-to-server-req.xml new file mode 100644 index 000000000..eedfc329a --- /dev/null +++ b/doc/api_samples/os-volumes/attach-volume-to-server-req.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/doc/api_samples/os-volumes/attach-volume-to-server-resp.json b/doc/api_samples/os-volumes/attach-volume-to-server-resp.json new file mode 100644 index 000000000..2e512ac99 --- /dev/null +++ b/doc/api_samples/os-volumes/attach-volume-to-server-resp.json @@ -0,0 +1,8 @@ +{ + "volumeAttachment": { + "device": "/dev/vdd", + "id": "a26887c6-c47b-4654-abb5-dfadf7d3f803", + "serverId": "0c92f3f6-c253-4c9b-bd43-e880a8d2eb0a", + "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803" + } +} \ No newline at end of file diff --git a/doc/api_samples/os-volumes/attach-volume-to-server-resp.xml b/doc/api_samples/os-volumes/attach-volume-to-server-resp.xml new file mode 100644 index 000000000..aaa85dd43 --- /dev/null +++ b/doc/api_samples/os-volumes/attach-volume-to-server-resp.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/doc/api_samples/os-volumes/list-volume-attachments-resp.json b/doc/api_samples/os-volumes/list-volume-attachments-resp.json new file mode 100644 index 000000000..9ae9b4a2a --- /dev/null +++ b/doc/api_samples/os-volumes/list-volume-attachments-resp.json @@ -0,0 +1,16 @@ +{ + "volumeAttachments": [ + { + "device": "/dev/sdd", + "id": "a26887c6-c47b-4654-abb5-dfadf7d3f803", + "serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0", + "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803" + }, + { + "device": "/dev/sdc", + "id": "a26887c6-c47b-4654-abb5-dfadf7d3f804", + "serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0", + "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f804" + } + ] +} \ No newline at end of file diff --git a/doc/api_samples/os-volumes/list-volume-attachments-resp.xml b/doc/api_samples/os-volumes/list-volume-attachments-resp.xml new file mode 100644 index 000000000..7d70882c0 --- /dev/null +++ b/doc/api_samples/os-volumes/list-volume-attachments-resp.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/doc/api_samples/os-volumes/server-post-req.json b/doc/api_samples/os-volumes/server-post-req.json new file mode 100644 index 000000000..d88eb4122 --- /dev/null +++ b/doc/api_samples/os-volumes/server-post-req.json @@ -0,0 +1,16 @@ +{ + "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==" + } + ] + } +} \ No newline at end of file diff --git a/doc/api_samples/os-volumes/server-post-req.xml b/doc/api_samples/os-volumes/server-post-req.xml new file mode 100644 index 000000000..0a3c8bb53 --- /dev/null +++ b/doc/api_samples/os-volumes/server-post-req.xml @@ -0,0 +1,19 @@ + + + + Apache1 + + + + ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp + dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k + IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs + c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g + QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo + ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv + dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy + c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 + b25zLiINCg0KLVJpY2hhcmQgQmFjaA== + + + \ No newline at end of file diff --git a/doc/api_samples/os-volumes/server-post-resp.json b/doc/api_samples/os-volumes/server-post-resp.json new file mode 100644 index 000000000..6ae553403 --- /dev/null +++ b/doc/api_samples/os-volumes/server-post-resp.json @@ -0,0 +1,16 @@ +{ + "server": { + "adminPass": "8VqALQcVB9MT", + "id": "a80b9477-84c1-4242-9731-14a3c2a04241", + "links": [ + { + "href": "http://openstack.example.com/v2/openstack/servers/a80b9477-84c1-4242-9731-14a3c2a04241", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/servers/a80b9477-84c1-4242-9731-14a3c2a04241", + "rel": "bookmark" + } + ] + } +} \ No newline at end of file diff --git a/doc/api_samples/os-volumes/server-post-resp.xml b/doc/api_samples/os-volumes/server-post-resp.xml new file mode 100644 index 000000000..b2474027d --- /dev/null +++ b/doc/api_samples/os-volumes/server-post-resp.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/doc/api_samples/os-volumes/volume-attachment-detail-resp.json b/doc/api_samples/os-volumes/volume-attachment-detail-resp.json new file mode 100644 index 000000000..5375033bb --- /dev/null +++ b/doc/api_samples/os-volumes/volume-attachment-detail-resp.json @@ -0,0 +1,8 @@ +{ + "volumeAttachment": { + "device": "/dev/sdd", + "id": "a26887c6-c47b-4654-abb5-dfadf7d3f803", + "serverId": "2390fb4d-1693-45d7-b309-e29c4af16538", + "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803" + } +} \ No newline at end of file diff --git a/doc/api_samples/os-volumes/volume-attachment-detail-resp.xml b/doc/api_samples/os-volumes/volume-attachment-detail-resp.xml new file mode 100644 index 000000000..dea235292 --- /dev/null +++ b/doc/api_samples/os-volumes/volume-attachment-detail-resp.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file -- cgit