From 044cab859d6f2c48f4f55ebdc5f526fce84026b2 Mon Sep 17 00:00:00 2001 From: He Jie Xu Date: Thu, 15 Oct 2015 10:49:44 +0800 Subject: [PATCH] Correct flavors API docs for compute api There isn't sub-resources 'os-flavor-rxtx' under 'flavors', this patch removed it. And also use all_extensions api sample instead of only flavor enabled api sample files, because the nova v2.1 API must enable all the extensions. Change-Id: I98da27dd616fe829e9f1d8e9ad6cb58eb5660597 Closes-Bug: #1506281 --- .../all_extensions/flavor-get-resp.json | 24 ++++ .../all_extensions/flavors-detail-resp.json | 114 ++++++++++++++++++ .../all_extensions/flavors-list-resp.json | 74 ++++++++++++ .../src/v2.1/wadl/os-flavors-v2.1.wadl | 74 +----------- 4 files changed, 215 insertions(+), 71 deletions(-) create mode 100644 api-ref/src/wadls/compute-api/src/v2.1/api_samples/all_extensions/flavor-get-resp.json create mode 100644 api-ref/src/wadls/compute-api/src/v2.1/api_samples/all_extensions/flavors-detail-resp.json create mode 100644 api-ref/src/wadls/compute-api/src/v2.1/api_samples/all_extensions/flavors-list-resp.json diff --git a/api-ref/src/wadls/compute-api/src/v2.1/api_samples/all_extensions/flavor-get-resp.json b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/all_extensions/flavor-get-resp.json new file mode 100644 index 000000000..b68bc3c97 --- /dev/null +++ b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/all_extensions/flavor-get-resp.json @@ -0,0 +1,24 @@ +{ + "flavor": { + "OS-FLV-DISABLED:disabled": false, + "OS-FLV-EXT-DATA:ephemeral": 0, + "disk": 1, + "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", + "os-flavor-access:is_public": true, + "ram": 512, + "rxtx_factor": 1.0, + "swap": "", + "vcpus": 1 + } +} diff --git a/api-ref/src/wadls/compute-api/src/v2.1/api_samples/all_extensions/flavors-detail-resp.json b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/all_extensions/flavors-detail-resp.json new file mode 100644 index 000000000..6c34aa279 --- /dev/null +++ b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/all_extensions/flavors-detail-resp.json @@ -0,0 +1,114 @@ +{ + "flavors": [ + { + "OS-FLV-DISABLED:disabled": false, + "disk": 1, + "OS-FLV-EXT-DATA:ephemeral": 0, + "os-flavor-access:is_public": true, + "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, + "swap": "", + "vcpus": 1 + }, + { + "OS-FLV-DISABLED:disabled": false, + "disk": 20, + "OS-FLV-EXT-DATA:ephemeral": 0, + "os-flavor-access:is_public": true, + "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, + "swap": "", + "vcpus": 1 + }, + { + "OS-FLV-DISABLED:disabled": false, + "disk": 40, + "OS-FLV-EXT-DATA:ephemeral": 0, + "os-flavor-access:is_public": true, + "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, + "swap": "", + "vcpus": 2 + }, + { + "OS-FLV-DISABLED:disabled": false, + "disk": 80, + "OS-FLV-EXT-DATA:ephemeral": 0, + "os-flavor-access:is_public": true, + "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, + "swap": "", + "vcpus": 4 + }, + { + "OS-FLV-DISABLED:disabled": false, + "disk": 160, + "OS-FLV-EXT-DATA:ephemeral": 0, + "os-flavor-access:is_public": true, + "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, + "swap": "", + "vcpus": 8 + } + ] +} diff --git a/api-ref/src/wadls/compute-api/src/v2.1/api_samples/all_extensions/flavors-list-resp.json b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/all_extensions/flavors-list-resp.json new file mode 100644 index 000000000..fb9a8ff1f --- /dev/null +++ b/api-ref/src/wadls/compute-api/src/v2.1/api_samples/all_extensions/flavors-list-resp.json @@ -0,0 +1,74 @@ +{ + "flavors": [ + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + } + ] +} diff --git a/api-ref/src/wadls/compute-api/src/v2.1/wadl/os-flavors-v2.1.wadl b/api-ref/src/wadls/compute-api/src/v2.1/wadl/os-flavors-v2.1.wadl index b7d2e2b8f..743158718 100644 --- a/api-ref/src/wadls/compute-api/src/v2.1/wadl/os-flavors-v2.1.wadl +++ b/api-ref/src/wadls/compute-api/src/v2.1/wadl/os-flavors-v2.1.wadl @@ -25,16 +25,6 @@ - - - - - - - &flavorIdRequestParameter; - - - @@ -53,7 +43,7 @@ &x-openstack-request-idHeader; @@ -69,7 +59,7 @@ &x-openstack-request-idHeader; @@ -85,68 +75,10 @@ &x-openstack-request-idHeader; - - - - - - Shows details for a specified - flavor. - - - - - - &x-openstack-request-idHeader; - - - - - - Lists flavors with details. - - - - - - &x-openstack-request-idHeader; - - - - - - Creates a flavor. - - - - - - - - - - - - - - - -