Commit Graph

6 Commits

Author SHA1 Message Date
Ghanshyam Mann
b26bc7fd7a Multiple API cleanup changes
This microversion implements below API cleanups:

1. 400 for unknown param for query param and for request body.

2. Making server representation always consistent among all APIs
   returning the complete server representation.

3. Change the default return value of ``swap`` field from the empty string
   to 0 (integer) in flavor APIs.

4. Return ``servers`` field always in the response of GET
   hypervisors API even there are no servers on hypervisor

Details: https://specs.openstack.org/openstack/nova-specs/specs/train/approved/api-consistency-cleanup.html

Partial-Implements: blueprint api-consistency-cleanup

Change-Id: I9d257a003d315b84b937dcef91f3cb41f3e24b53
2019-08-12 08:52:38 -05:00
Yikun Jiang
0baba40b1b Add microversion to support extra_specs in flavor API.
Exposes flavor extra_specs in the flavor representation since
microversion 2.61. Now users can see the flavor extra-specs
in flavor APIs response only and do not need to call
``GET /flavors/{flavor_id}/extra_specs`` API.

Flavor extra_specs will be included in Response body of the
following APIs:

* ``GET /flavors/detail``
* ``GET /flavors/{flavor_id}``
* ``POST /flavors``
* ``PUT /flavors/{flavor_id}``

Part of blueprint add-extra-specs-to-flavor-list

Change-Id: I048747633babf690a63c6de9773bff5547872053
2018-04-11 17:47:57 +08:00
Matt Riedemann
034d7f3795 Add microversion to allow setting flavor description
This adds the new microversion to allow providing
a description when creating a flavor, returning a
flavor description when showing flavor details, and
updating the description on an existing flavor.

Implements blueprint flavor-description

Change-Id: Ib16b0de82f9f9492f5cacf646dc3165a0849d75e
2017-11-15 22:10:39 +00:00
ghanshyam
8291e5e247 Enable all extension for Flavor API sample tests
As extensions options has been deprecated, API sample tests
should run against all extension enable.

This commit enables all extensions for Flavor API tests and remove its specific
extensions tests and sample files.

Partially implements blueprint api-sample-tests-with-all-extensions

Change-Id: I9fc496a6a05f794a31b0b361cc98d2f4b2f79818
2016-06-09 10:25:21 +09:00
Sean Dague
0c57f3c4e0 Drop the use of magic openstack project_id
When we put validation into the project_id in urls we had to expand
the default set of allowed values to include 'openstack' and
'fake'. This cleans up all the instances of 'openstack' in the
functional tests, and api samples, and instead uses a constant string
which looks like a real project_id.

We need a stable project_id and not a sentinel otherwise the samples
will be arbitrarily changes on every update.

Change-Id: I1099fd43d2374abd1658b0917765d5375c4b8d1d
2016-03-08 19:34:56 +00:00
He Jie Xu
9f9802eebd Move the v2 api_sample functional tests
This patch move the all v2.1 api sample tests under
'functional/api_sample_tests'. Also move sample files under
'doc/api-samples'.

Co-Authored-By: Ed Leafe <ed@leafe.com>
Co-Authored-By: Alex Xu <hejie.xu@intel.com>
Partial-Bug: #1462901
Change-Id: I2b924f2ad7687a23a018a9b658e8acd9e04d7963
2015-08-18 15:25:41 +08:00