diff options
| author | Giampaolo Lauria <lauria@us.ibm.com> | 2013-01-08 17:43:51 -0500 |
|---|---|---|
| committer | Giampaolo Lauria <lauria@us.ibm.com> | 2013-01-09 20:47:23 -0500 |
| commit | 35328ddd8fd1aadf0800ae282a7654c106bc52f3 (patch) | |
| tree | b8805bcdda29a027ec138aefb6d157e0b48bda09 /doc | |
| parent | 664ea40ebb0ee29a5fd11effeeed279ddc543f89 (diff) | |
Added sample tests to FlavorSwap API.
Partially implements blueprint nova-api-samples
Fixes bug 1096653
Change-Id: I9a6ca8a023bf0f3404b3a9af635dd29a7a584aa3
Diffstat (limited to 'doc')
8 files changed, 186 insertions, 0 deletions
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 @@ +<?xml version='1.0' encoding='UTF-8'?> +<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="0" vcpus="1" ram="512" name="m1.tiny" id="1" swap=""> + <atom:link href="http://openstack.example.com/v2/openstack/flavors/1" rel="self"/> + <atom:link href="http://openstack.example.com/openstack/flavors/1" rel="bookmark"/> +</flavor>
\ 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 @@ +<?xml version='1.0' encoding='UTF-8'?> +<flavors xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1"> + <flavor disk="0" vcpus="1" ram="512" name="m1.tiny" id="1" swap=""> + <atom:link href="http://openstack.example.com/v2/openstack/flavors/1" rel="self"/> + <atom:link href="http://openstack.example.com/openstack/flavors/1" rel="bookmark"/> + </flavor> + <flavor disk="20" vcpus="1" ram="2048" name="m1.small" id="2" swap=""> + <atom:link href="http://openstack.example.com/v2/openstack/flavors/2" rel="self"/> + <atom:link href="http://openstack.example.com/openstack/flavors/2" rel="bookmark"/> + </flavor> + <flavor disk="40" vcpus="2" ram="4096" name="m1.medium" id="3" swap=""> + <atom:link href="http://openstack.example.com/v2/openstack/flavors/3" rel="self"/> + <atom:link href="http://openstack.example.com/openstack/flavors/3" rel="bookmark"/> + </flavor> + <flavor disk="80" vcpus="4" ram="8192" name="m1.large" id="4" swap=""> + <atom:link href="http://openstack.example.com/v2/openstack/flavors/4" rel="self"/> + <atom:link href="http://openstack.example.com/openstack/flavors/4" rel="bookmark"/> + </flavor> + <flavor disk="160" vcpus="8" ram="16384" name="m1.xlarge" id="5" swap=""> + <atom:link href="http://openstack.example.com/v2/openstack/flavors/5" rel="self"/> + <atom:link href="http://openstack.example.com/openstack/flavors/5" rel="bookmark"/> + </flavor> +</flavors>
\ 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<flavor xmlns="http://docs.openstack.org/compute/api/v1.1" + xmlns:OS-FLV-EXT-DATA="http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1" + 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-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 @@ +<?xml version='1.0' encoding='UTF-8'?> +<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="flavortest" id="100" swap="5"> + <atom:link href="http://openstack.example.com/v2/openstack/flavors/100" rel="self"/> + <atom:link href="http://openstack.example.com/openstack/flavors/100" rel="bookmark"/> +</flavor>
\ No newline at end of file |
