From 35328ddd8fd1aadf0800ae282a7654c106bc52f3 Mon Sep 17 00:00:00 2001 From: Giampaolo Lauria Date: Tue, 8 Jan 2013 17:43:51 -0500 Subject: Added sample tests to FlavorSwap API. Partially implements blueprint nova-api-samples Fixes bug 1096653 Change-Id: I9a6ca8a023bf0f3404b3a9af635dd29a7a584aa3 --- .../os-flavor-swap/flavor-swap-get-resp.json | 20 +++++ .../os-flavor-swap/flavor-swap-get-resp.xml | 5 ++ .../os-flavor-swap/flavor-swap-list-resp.json | 94 ++++++++++++++++++++++ .../os-flavor-swap/flavor-swap-list-resp.xml | 23 ++++++ .../os-flavor-swap/flavor-swap-post-req.json | 10 +++ .../os-flavor-swap/flavor-swap-post-req.xml | 9 +++ .../os-flavor-swap/flavor-swap-post-resp.json | 20 +++++ .../os-flavor-swap/flavor-swap-post-resp.xml | 5 ++ 8 files changed, 186 insertions(+) create mode 100644 doc/api_samples/os-flavor-swap/flavor-swap-get-resp.json create mode 100644 doc/api_samples/os-flavor-swap/flavor-swap-get-resp.xml create mode 100644 doc/api_samples/os-flavor-swap/flavor-swap-list-resp.json create mode 100644 doc/api_samples/os-flavor-swap/flavor-swap-list-resp.xml create mode 100644 doc/api_samples/os-flavor-swap/flavor-swap-post-req.json create mode 100644 doc/api_samples/os-flavor-swap/flavor-swap-post-req.xml create mode 100644 doc/api_samples/os-flavor-swap/flavor-swap-post-resp.json create mode 100644 doc/api_samples/os-flavor-swap/flavor-swap-post-resp.xml (limited to 'doc') diff --git a/doc/api_samples/os-flavor-swap/flavor-swap-get-resp.json b/doc/api_samples/os-flavor-swap/flavor-swap-get-resp.json new file mode 100644 index 000000000..15604fe2b --- /dev/null +++ b/doc/api_samples/os-flavor-swap/flavor-swap-get-resp.json @@ -0,0 +1,20 @@ +{ + "flavor": { + "disk": 0, + "id": "1", + "links": [ + { + "href": "http://openstack.example.com/v2/openstack/flavors/1", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/flavors/1", + "rel": "bookmark" + } + ], + "name": "m1.tiny", + "ram": 512, + "swap": "", + "vcpus": 1 + } +} \ No newline at end of file diff --git a/doc/api_samples/os-flavor-swap/flavor-swap-get-resp.xml b/doc/api_samples/os-flavor-swap/flavor-swap-get-resp.xml new file mode 100644 index 000000000..5357967f3 --- /dev/null +++ b/doc/api_samples/os-flavor-swap/flavor-swap-get-resp.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/doc/api_samples/os-flavor-swap/flavor-swap-list-resp.json b/doc/api_samples/os-flavor-swap/flavor-swap-list-resp.json new file mode 100644 index 000000000..5bb94f348 --- /dev/null +++ b/doc/api_samples/os-flavor-swap/flavor-swap-list-resp.json @@ -0,0 +1,94 @@ +{ + "flavors": [ + { + "disk": 0, + "id": "1", + "links": [ + { + "href": "http://openstack.example.com/v2/openstack/flavors/1", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/flavors/1", + "rel": "bookmark" + } + ], + "name": "m1.tiny", + "ram": 512, + "swap": "", + "vcpus": 1 + }, + { + "disk": 20, + "id": "2", + "links": [ + { + "href": "http://openstack.example.com/v2/openstack/flavors/2", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/flavors/2", + "rel": "bookmark" + } + ], + "name": "m1.small", + "ram": 2048, + "swap": "", + "vcpus": 1 + }, + { + "disk": 40, + "id": "3", + "links": [ + { + "href": "http://openstack.example.com/v2/openstack/flavors/3", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/flavors/3", + "rel": "bookmark" + } + ], + "name": "m1.medium", + "ram": 4096, + "swap": "", + "vcpus": 2 + }, + { + "disk": 80, + "id": "4", + "links": [ + { + "href": "http://openstack.example.com/v2/openstack/flavors/4", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/flavors/4", + "rel": "bookmark" + } + ], + "name": "m1.large", + "ram": 8192, + "swap": "", + "vcpus": 4 + }, + { + "disk": 160, + "id": "5", + "links": [ + { + "href": "http://openstack.example.com/v2/openstack/flavors/5", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/flavors/5", + "rel": "bookmark" + } + ], + "name": "m1.xlarge", + "ram": 16384, + "swap": "", + "vcpus": 8 + } + ] +} \ No newline at end of file diff --git a/doc/api_samples/os-flavor-swap/flavor-swap-list-resp.xml b/doc/api_samples/os-flavor-swap/flavor-swap-list-resp.xml new file mode 100644 index 000000000..55b54f700 --- /dev/null +++ b/doc/api_samples/os-flavor-swap/flavor-swap-list-resp.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/api_samples/os-flavor-swap/flavor-swap-post-req.json b/doc/api_samples/os-flavor-swap/flavor-swap-post-req.json new file mode 100644 index 000000000..83b94cea0 --- /dev/null +++ b/doc/api_samples/os-flavor-swap/flavor-swap-post-req.json @@ -0,0 +1,10 @@ +{ + "flavor": { + "name": "flavortest", + "ram": 1024, + "vcpus": 2, + "disk": 10, + "id": "100", + "swap": 5 + } +} \ No newline at end of file diff --git a/doc/api_samples/os-flavor-swap/flavor-swap-post-req.xml b/doc/api_samples/os-flavor-swap/flavor-swap-post-req.xml new file mode 100644 index 000000000..b604f9bdf --- /dev/null +++ b/doc/api_samples/os-flavor-swap/flavor-swap-post-req.xml @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/doc/api_samples/os-flavor-swap/flavor-swap-post-resp.json b/doc/api_samples/os-flavor-swap/flavor-swap-post-resp.json new file mode 100644 index 000000000..d8e75d381 --- /dev/null +++ b/doc/api_samples/os-flavor-swap/flavor-swap-post-resp.json @@ -0,0 +1,20 @@ +{ + "flavor": { + "disk": 10, + "id": "100", + "links": [ + { + "href": "http://openstack.example.com/v2/openstack/flavors/100", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/flavors/100", + "rel": "bookmark" + } + ], + "name": "flavortest", + "ram": 1024, + "swap": 5, + "vcpus": 2 + } +} \ No newline at end of file diff --git a/doc/api_samples/os-flavor-swap/flavor-swap-post-resp.xml b/doc/api_samples/os-flavor-swap/flavor-swap-post-resp.xml new file mode 100644 index 000000000..7b779cf3f --- /dev/null +++ b/doc/api_samples/os-flavor-swap/flavor-swap-post-resp.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file -- cgit