From 8596e8b8405c7239b209348ea57263f1017ad7e7 Mon Sep 17 00:00:00 2001 From: Giampaolo Lauria Date: Tue, 8 Jan 2013 10:18:59 -0500 Subject: Added sample tests to FlavorRxtx API. Partially implements blueprint nova-api-samples Fixes bug 1091743 Change-Id: I400e627cfc499b3e7bb1c88d6ce7d24b4d222b84 --- .../os-flavor-rxtx/flavor-rxtx-get-resp.json | 20 +++++ .../os-flavor-rxtx/flavor-rxtx-get-resp.xml | 5 ++ .../os-flavor-rxtx/flavor-rxtx-list-resp.json | 94 ++++++++++++++++++++++ .../os-flavor-rxtx/flavor-rxtx-list-resp.xml | 23 ++++++ .../os-flavor-rxtx/flavor-rxtx-post-req.json | 10 +++ .../os-flavor-rxtx/flavor-rxtx-post-req.xml | 9 +++ .../os-flavor-rxtx/flavor-rxtx-post-resp.json | 20 +++++ .../os-flavor-rxtx/flavor-rxtx-post-resp.xml | 5 ++ 8 files changed, 186 insertions(+) create mode 100644 doc/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.json create mode 100644 doc/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.xml create mode 100644 doc/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.json create mode 100644 doc/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.xml create mode 100644 doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.json create mode 100644 doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.xml create mode 100644 doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.json create mode 100644 doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.xml (limited to 'doc') diff --git a/doc/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.json b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.json new file mode 100644 index 000000000..63eaddeb6 --- /dev/null +++ b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-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, + "rxtx_factor": 1.0, + "vcpus": 1 + } +} \ No newline at end of file diff --git a/doc/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.xml b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.xml new file mode 100644 index 000000000..78b430eca --- /dev/null +++ b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/doc/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.json b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.json new file mode 100644 index 000000000..81e9c993c --- /dev/null +++ b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-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, + "rxtx_factor": 1.0, + "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, + "rxtx_factor": 1.0, + "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, + "rxtx_factor": 1.0, + "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, + "rxtx_factor": 1.0, + "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, + "rxtx_factor": 1.0, + "vcpus": 8 + } + ] +} \ No newline at end of file diff --git a/doc/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.xml b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.xml new file mode 100644 index 000000000..05192e3f9 --- /dev/null +++ b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.json b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.json new file mode 100644 index 000000000..b86a63df6 --- /dev/null +++ b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.json @@ -0,0 +1,10 @@ +{ + "flavor": { + "name": "flavortest", + "ram": 1024, + "vcpus": 2, + "disk": 10, + "id": "100", + "rxtx_factor": 2.0 + } +} \ No newline at end of file diff --git a/doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.xml b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.xml new file mode 100644 index 000000000..7038e1b88 --- /dev/null +++ b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.xml @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.json b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.json new file mode 100644 index 000000000..5129dbeb8 --- /dev/null +++ b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-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, + "rxtx_factor": 2.0, + "vcpus": 2 + } +} \ No newline at end of file diff --git a/doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.xml b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.xml new file mode 100644 index 000000000..8fb4f46be --- /dev/null +++ b/doc/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file -- cgit