This is the final patch in this series. This patch bumps the
microversion to 2.36, all the proxy APIs were deprecated.
Partially implements blueprint deprecate-api-proxies
Change-Id: I1a8a44530be29292561e90d6f7bd7ed512a88ee3
After this microversion Nova API allows to get several keypairs
with the help of new optional parameters 'limit' and 'marker'
which were added to GET /os-keypairs request.
Partial-Bug: #1599904
Implements blueprint: keypairs-pagination
Change-Id: Idd3757f5be90ec4af1bd1a7ca3f9c20319dbfd33
pre live-migration checks now are done in async way. This patch
updates rest api version to keep this tracked.
bp: async-live-migration-rest-check
Change-Id: I9fed3079d0f1b7de3ad1b3ecd309c93785fd11fe
This completes the verification of os-assisted-volume-snapshots.inc
for all required area(parameter, example, body)
Part of bp:api-ref-in-rst
Change-Id: I9544e9681bcdd83ca5d2bf6b8722db0a71665b8b
When there are thousands of compute nodes, it would be slow to get the
whole hypervisor list, and it is bad for user experience to display
thousands of items in a table in horizon. This patch is proposed to
support pagination for hypervisor by adding `limit` and `marker` to
the list api.
Implements blueprint: pagination-for-hypervisor
Change-Id: Ie7f8b5c733b383f3e69fa23188e56257e503b5f7
This patch allows the user to specify a tag for a virtual network
interface and/or block device mapping when booting an instance.
Implements: blueprint bp/virt-device-role-tagging
Change-Id: I89247200f4cf1f644daf476727b4a6acb22b0cf6
Currently only 'xen' is supported for the 'hypervisor'
parameter. So examples are changed to 'xen'
instead of 'hypervisor'.
Change-Id: Ibd40dcfd3801c7a4165e299a1232ea46f2f17cf4
Implements: blueprint api-ref-in-rst
The current API allows getting connection info only for tokens which
correspond to RDP consoles. It should work for all types of tokens. This
patch introduces a new microversion which fixes this problem.
APIImpact
blueprint fix-console-auth-tokens
Change-Id: I27a65e0cd8b5eb51ecdc84cbf310ae107ff131dc
Improve api samples for os-instance_usage_audit_log
and fix a parameter.
Change-Id: I8436a6ab0610e41d8c6c95c55a263fdfbbf58476
Implements: blueprint api-ref-in-rst
JSON standard does not allow trailing comma.
Because of this comma my local tox -e docs failed.
It's strange that it works in gate and check jobs.
Change-Id: I58bf48c248b1722a730667ec7c5e792e6929d2df
This removes the facility in the API router to have limited lists of
extensions. From this point forward, what is in Nova is loaded, no
exceptions.
A number of unit tests and fakes have to be updated to pass after
this, as many unit tests were sending small lists of extensions to the
API router to simplify the responses they were getting back. This also
required stubbing out the request db cache in some cases, because
extensions later get content from there to avoid additional db
hits. As well as adjusting a few samples tests which now return more
data because all the extensions are always loaded.
There is much cleanup to happen after this, but this is the smallest
unit to get us over this boundary which will start letting us to
refold extensions back into the base views (and massively simplify the
API code).
This does not yet remove the config options because there is another
place those get used in servers.py and the testing fallout of that is
much bigger.
The reno will come with that patch.
Change-Id: I3e72f5e23ce39148f31dfdb76d18f403c6d04842
OS-SCH-HNT:scheduler_hint is actually a top level attribute, because
of historical accident in the yesteryear of v1 (and thus v2 and
v2.1). One day we should fix this.
Change-Id: I34c105628e274dcc2f8101514f95b9032b2b9f71
As extensions options has been deprecated, API sample tests
should run against all extension enable.
This commit enables all extensions for all the remaining sample tests
and remove extensions specific tests and sample files.
Also remove extension setting specific logic from base test class
along with TODOs.
Partially implements blueprint api-sample-tests-with-all-extensions
Change-Id: I66b593760789e5b3b92137a672246f8d91e44cba
As extensions options has been deprecated, API sample tests
should run against all extension enable.
This commit enables all extensions for remaining server API tests
and remove its specific extensions tests and sample files.
Partially implements blueprint api-sample-tests-with-all-extensions
Change-Id: I3cf5762477b8b77bec4e6cb8f7119c62df7c706a
As extensions options has been deprecated, API sample tests
should run against all extension enable.
This commit enables all extensions for server API tests and remove its specific
extensions tests and sample files.
Partially implements blueprint api-sample-tests-with-all-extensions
Change-Id: I7e12a4491738c2908c1dd134c05f38e0db497ee7
As extensions options has been deprecated, API sample tests
should run against all extension enable.
This commit enables all extensions for server actions tests and
remove its specific extensions tests and sample files.
Partially implements blueprint api-sample-tests-with-all-extensions
Change-Id: I88a293958c4c8a1b2c50a837c23bcdda8010e075
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
After modifying the evacuate action, we now add a new microversion
change for modifying the live-migrate call so that the scheduler is
called when the admin user provides an hostname unless the force
field is provided.
APIImpact
Implements: blueprint check-destination-on-migrations-newton
Change-Id: I212cbb44f46d7cb36b5d8c74a79065d38fc526d8
Adding a new microversion for changing the evacuate action behaviour
to call the scheduler anyway unless the admin user provides a force
flag that then keeps the previous behaviour by forcing the conductor
to call the destination without verifying it.
Implements: blueprint check-destination-on-migrations
APIImpact
Change-Id: I9ecbe3d481bf17b12072511da4bb106ff1b6404e
After this microversion Nova API the GET request to
/v2.1/os-hypervisors/{hypervisor_id} responses cpu_info
as regular JSON object instead of string.
Implements blueprint nova-api-hypervsor-cpu-info
Change-Id: I14db9017f69e70e759cc80d031f76af8be179e45
In order to add an example creating an interface with
net_id and fixed_ips, add the sample test for it.
Change-Id: I6b2567db82d000e4b1cdf46020ce1b57103c3f46
Implements: blueprint api-ref-in-rst
In this change the new OpenStack-API-Version headers is allowed,
but not required, for requesting a microversion.
Both headers are accepted in the request and both headers are sent in
the response (both the header and its value, and the addition to the Vary
header).
Many tests which explicitly use a microversion header have been
updated to use both. This change is not 100% as most of the tests
are testing the handling of the value of the header, not which
header is involved.
Partially-Implements: blueprint modern-microversions
Change-Id: I68da13b5ba0c2f3357523e765a5b9db81899daf1
Change I89b18709e0cfbbcbf9be96a91a13a1356cdf85b0 added new
microversion 2.37. This microversion added required field 'networks'
into create server request. By default Nova functional api tests use
samples from '/servers' directory to create a server. But now such
requests got 400 Bad Request because of missed 'networks' field.
We must handle this case if we are testing microversions >= 2.37.
This patch will add sample for microversion 2.37+
Closes-Bug: 1613998
Change-Id: I40cac263c97a4a871072d0efe5ebff295c2d917e
We correctly stopped reporting the limits for things like security
groups and floating ips after mv 2.35. We completely missed that
limits are modified by the used_limits extension, and hilarity
ensued. We were reporting no maxSecurityGroups over the wire, but we
were reporting totalSecurityGroups through the magic of extensions.
Change-Id: I85b2b41d919ed6987d4c9288905ccce49c10c81f
Closes-Bug: #1614133
Raised 400 HTTPBadRequest if user passes invalid status to list
server API. Increased API microversion to v2.38 to maintain
backward compatibility.
Implements: blueprint response-for-invalid-status
Co-Authored-By: Ed Leafe <ed@leafe.com>
Change-Id: I25608280c2f30e70802e173c183de4e8da9a983b
This adds the 2.37 microversion to the REST API for automatically
allocating a network, i.e. get me a network.
The majority of the changes to the REST API concern request
validation. 'networks' is now required in the server POST body
after this microversion. The 'auto' or 'none' special network
uuid values are used, but if specified, can not be specified
with any other requested network values.
The other special case that is checked is when the minimum
compute service version is not new enough to support this change,
i.e. a Mitaka compute will not have the network API code that
knows how to deal with the special auto/none network IDs. Because
the REST API is checking the service version, the service caches
the service version after the first check. Once all computes are
updated to Newton then a restart of the nova-api service(s) will
be required to flush the cache. A release note is provided for
this situation.
The api-ref docs are also updated for this microversion including
an example API sample request.
The matching Tempest change to test this is here:
I89b18709e0cfbbcbf9be96a91a13a1356cdf85b0
The matching python-novaclient change is here:
I6636ddcd3be7bf393d2d69cc6c1ba5c7d65ff674
Implements blueprint get-me-a-network
Change-Id: I89b18709e0cfbbcbf9be96a91a13a1356cdf85b0
Currently imageRef in server create, rebuild and rescue
operation can be accepted as random url which contains image
UUID and fetch the UUID from that.
As /images proxy APIs are deprecated, and ImageRef in
server creation etc are UUID only and valid against glance.
This patch makes imageRef handling as UUID only and
return 400 if non UUID are requested.
NOTE- Previously nova use to allow the empty string which was
ok in case of boot from volume.
We will keep the same behavior of allowing empty string in case of
boot from volume only and 400 in all other case.
Closes-Bug: #1607229
Change-Id: I49f4da62c1b5b3fd8c5f67039ae113f76722b26c
verified all sample files is correct and adjust
some format of the request Json file
part of bp:api-ref-in-rst
Change-Id: Ie9dd24858056337bcae9b03259d4f84de4fc1ab8
The method of showing quota detail is missing the api sample test.
This patch adds that.
Part of bp:api-ref-in-rst
Change-Id: I943af1d856f890eab4c34674d251f698ee84a836
This patches from the test scenarios for the legacy v2 from API
sample tests. There still have some codes for legacy v2 which should
be cleanup, but that can be done later patches. This patch just stop
the test on the legacy v2 API.
Partially implements blueprint remove-legacy-v2-api-code
Change-Id: I38626e5a4aa98cbfd7b65b5eb0edbcae96e5b3f2
Currently, unit testcases of api emit FutureWarnings
from oslo.versionedobjects about invalid uuids as documented here[1].
This commit changes these tests to use valid uuids so
that when they are run these warnings are no longer emitted.
Made changes to project_id in fakes.py to use valid project_id
which removes warnings related to invalid uuids in testcases.
Also made changes to project_id in JSON headers to use valid
uuids in functional testcases same as that in unit testcases.
[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField
Partial-Bug: #1557378
Change-Id: I5f69a2c3dc4d0279aed11750e6758b624debb64f
Previously all testing of the PUT method assumed that a body existed,
which is implied by the HTTP spec, but not strictly stated. The tags
api-wg spec specifies an interface with tags that uses PUT with no
payload.
This makes our _do_put able to handle that case, and removes empty
templates when not needed.
Change-Id: I3d869d63affd08e321944c0082ee9865124d38e2
Added new API microversion which allows the following:
- add tag to the server
- replace set of server tags with new set of tags
- get information about server, including list of tags for server
- get just list of tags for server
- check if tag exists on a server
- remove specified tag from server
- remove all tags from server
- search servers by tags
DocImpact
APIImpact
Implements: blueprint tag-instances
Change-Id: I9573aa52aae9f49945d8806ca5e52ada29fb087a
microversion v2.7 was added without a functional test,
even though we can cover most cases in unit test
for negative case, it would be better to
have a functional test for a specific microversion API change.
Change-Id: I4d5576cc4ebcdeaa4e4f067fe9c6207280ad7eda
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