From 530b48386b9b2d4a0ad85095d6a929cdd0153274 Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Tue, 27 Nov 2012 21:19:53 +0000 Subject: Added sample tests to extended status API. Partially implements blueprint nova-api-samples Fixes bug 1070160 Change-Id: Ide7119a308a03ded101ae76faf8204352ffc8566 --- doc/api_samples/OS-EXT-STS/server-post-req.json | 16 ++++++ doc/api_samples/OS-EXT-STS/server-post-req.xml | 19 +++++++ doc/api_samples/OS-EXT-STS/server-post-resp.json | 16 ++++++ doc/api_samples/OS-EXT-STS/server-post-resp.xml | 6 +++ .../OS-EXT-STS/servers-detail-resp.json | 59 ++++++++++++++++++++++ doc/api_samples/OS-EXT-STS/servers-detail-resp.xml | 21 ++++++++ doc/api_samples/OS-EXT-STS/servers-list-resp.json | 18 +++++++ doc/api_samples/OS-EXT-STS/servers-list-resp.xml | 7 +++ 8 files changed, 162 insertions(+) create mode 100644 doc/api_samples/OS-EXT-STS/server-post-req.json create mode 100644 doc/api_samples/OS-EXT-STS/server-post-req.xml create mode 100644 doc/api_samples/OS-EXT-STS/server-post-resp.json create mode 100644 doc/api_samples/OS-EXT-STS/server-post-resp.xml create mode 100644 doc/api_samples/OS-EXT-STS/servers-detail-resp.json create mode 100644 doc/api_samples/OS-EXT-STS/servers-detail-resp.xml create mode 100644 doc/api_samples/OS-EXT-STS/servers-list-resp.json create mode 100644 doc/api_samples/OS-EXT-STS/servers-list-resp.xml (limited to 'doc') diff --git a/doc/api_samples/OS-EXT-STS/server-post-req.json b/doc/api_samples/OS-EXT-STS/server-post-req.json new file mode 100644 index 000000000..09366b4c9 --- /dev/null +++ b/doc/api_samples/OS-EXT-STS/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==" + } + ] + } +} diff --git a/doc/api_samples/OS-EXT-STS/server-post-req.xml b/doc/api_samples/OS-EXT-STS/server-post-req.xml new file mode 100644 index 000000000..077dd7618 --- /dev/null +++ b/doc/api_samples/OS-EXT-STS/server-post-req.xml @@ -0,0 +1,19 @@ + + + + Apache1 + + + + ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp + dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k + IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs + c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g + QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo + ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv + dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy + c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 + b25zLiINCg0KLVJpY2hhcmQgQmFjaA== + + + diff --git a/doc/api_samples/OS-EXT-STS/server-post-resp.json b/doc/api_samples/OS-EXT-STS/server-post-resp.json new file mode 100644 index 000000000..db9ed3d6d --- /dev/null +++ b/doc/api_samples/OS-EXT-STS/server-post-resp.json @@ -0,0 +1,16 @@ +{ + "server": { + "adminPass": "MVk5HPrazHcG", + "id": "5bbcc3c4-1da2-4437-a48a-66f15b1b13f9", + "links": [ + { + "href": "http://openstack.example.com/v2/openstack/servers/5bbcc3c4-1da2-4437-a48a-66f15b1b13f9", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/servers/5bbcc3c4-1da2-4437-a48a-66f15b1b13f9", + "rel": "bookmark" + } + ] + } +} diff --git a/doc/api_samples/OS-EXT-STS/server-post-resp.xml b/doc/api_samples/OS-EXT-STS/server-post-resp.xml new file mode 100644 index 000000000..68f0933c7 --- /dev/null +++ b/doc/api_samples/OS-EXT-STS/server-post-resp.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/doc/api_samples/OS-EXT-STS/servers-detail-resp.json b/doc/api_samples/OS-EXT-STS/servers-detail-resp.json new file mode 100644 index 000000000..6764bd883 --- /dev/null +++ b/doc/api_samples/OS-EXT-STS/servers-detail-resp.json @@ -0,0 +1,59 @@ +{ + "servers": [ + { + "OS-EXT-STS:power_state": 1, + "OS-EXT-STS:task_state": null, + "OS-EXT-STS:vm_state": "active", + "accessIPv4": "", + "accessIPv6": "", + "addresses": { + "private": [ + { + "addr": "192.168.0.3", + "version": 4 + } + ] + }, + "created": "2012-12-05T07:34:10Z", + "flavor": { + "id": "1", + "links": [ + { + "href": "http://openstack.example.com/openstack/flavors/1", + "rel": "bookmark" + } + ] + }, + "hostId": "585aa01f94eca692eff9f77ffe3eab866d8a819e97397e28c5c7df12", + "id": "030758aa-5c41-41c6-8fb4-29d44eb96a85", + "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/030758aa-5c41-41c6-8fb4-29d44eb96a85", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/servers/030758aa-5c41-41c6-8fb4-29d44eb96a85", + "rel": "bookmark" + } + ], + "metadata": { + "My Server Name": "Apache1" + }, + "name": "new-server-test", + "progress": 0, + "status": "ACTIVE", + "tenant_id": "openstack", + "updated": "2012-12-05T07:34:10Z", + "user_id": "fake" + } + ] +} \ No newline at end of file diff --git a/doc/api_samples/OS-EXT-STS/servers-detail-resp.xml b/doc/api_samples/OS-EXT-STS/servers-detail-resp.xml new file mode 100644 index 000000000..e4dafd70b --- /dev/null +++ b/doc/api_samples/OS-EXT-STS/servers-detail-resp.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + Apache1 + + + + + + + + + + \ No newline at end of file diff --git a/doc/api_samples/OS-EXT-STS/servers-list-resp.json b/doc/api_samples/OS-EXT-STS/servers-list-resp.json new file mode 100644 index 000000000..d0309cc1f --- /dev/null +++ b/doc/api_samples/OS-EXT-STS/servers-list-resp.json @@ -0,0 +1,18 @@ +{ + "servers": [ + { + "id": "a5dd5b16-552c-441c-8a03-f19c4da9e6f5", + "links": [ + { + "href": "http://openstack.example.com/v2/openstack/servers/a5dd5b16-552c-441c-8a03-f19c4da9e6f5", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/servers/a5dd5b16-552c-441c-8a03-f19c4da9e6f5", + "rel": "bookmark" + } + ], + "name": "new-server-test" + } + ] +} \ No newline at end of file diff --git a/doc/api_samples/OS-EXT-STS/servers-list-resp.xml b/doc/api_samples/OS-EXT-STS/servers-list-resp.xml new file mode 100644 index 000000000..f1c3cabf4 --- /dev/null +++ b/doc/api_samples/OS-EXT-STS/servers-list-resp.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file -- cgit