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
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
This is os-migrateLive API changes:
* 2.25 - Make block_migration to support 'auto' value, remove
disk_over_commit.
Partially implements: blueprint making-live-migration-api-friendly
APIImpact
DocImpact
Change-Id: Ibb0d50f0f7444028ef9d0c294aea41edf0024b31
For example, When aggregate zone is updated, time is not getting updated
in updated_at field.
So, modified the code such that time gets updated in updated_at field
whenever the aggregate metadata content gets modified.
Change-Id: Icb65313ba85562fadeddbc1890ca5d463e74d3c2
Closes-Bug: #1538014
This change adds a DELETE call on the server-migrations object to cancel
a running live migration of a specific instance.
TO perform the cancellation the virtualization driver needs to support
it, in case that the feature is not supported we return an error.
We allow a cancellation of a migration only if the migration is
running at the moment of the request and if the migration type is equal
to 'live-migration'.
In this change we implement this feature for the libvirt driver.
When the cancellation of a live migration succeeded we rollback the live
migration and we set the state of the Migration object equals to
'cancelled'.
The implementation of this change is based on the work done by the
implementation of the feature called 'force live migration':
https://review.openstack.org/245921
DocImpact
ApiImpact
Implements blueprint: abort-live-migration
Change-Id: I1ff861e54997a069894b542bd764ac3ef1b3dbb2
This patch does two things:
1. Add two APIs /servers/migrations:index/show for server migrations.
Two new novaclient commands server-migration-list and
server-migration-show will also be added.
ref: I071198fa9ba0699383bdebf4fab54714a435e6c3
2. Add ref link for /os-migrations
The old top-level resource `/os-migrations` won't be extended anymore.
It is deprecated.
Adding migration_type for it, also add ref link to
/servers/{uuid}/migrations/{id} for it when the migration is an
in progress migration.
Partially implements blueprint live-migration-progress-report
Change-Id: Ia92ecbe3c99082e3a34adf4fd29041b1a95ef21e
Co-authored-by: ShaoHe Feng <shaohe.feng@intel.com>
This change adds manual knob to force ongoing live migration to
complete. It is implemented as a new server-migrations API.
DocImpact
ApiImpact
Implements: blueprint pause-vm-during-live-migration
Change-Id: I034b4041414a797f65ede52db2963107f2ef7456
Add a microversion change to the os-instance-actions API so that we
mutate the context to set 'read_deleted="yes"' when looking up the
instance.
Blueprint: os-instance-actions-read-deleted-instances
Change-Id: I607a28bbe06e20e17ee47a283e06b1d42b5c0e84
This change enables the attach and detach volume operations for
instances which are in shelve and shelved_offloaded state.
The code to manage the actual attach and detach is implemented by this
change: https://review.openstack.org/259528
New tempest tests are going to be written for testing the new feature.
APIImpact
DocImpact by this change we are allowing operations which were not
allowed before, we need to track this change in the documentation.
Partially implements blueprint: volume-ops-when-shelved
Change-Id: I43b67a50d998d43a6ff78c917093c513231b6ff2
I74b1a340c5ab98fdea2186e87dd13f42ce7c7661 introduced a malformed api
sample and the tox -e docs fails since then. This patch fixes the
sample file.
Closes-bug: #1539071
Change-Id: Ica76db8928fc98db1a09074fdc46439c920e93d8
As extensions options has been deprecated, API sample tests
should run against all extension enable.
This commit enables all extensions for server PUT API tests and
remove its specific extensions tests and sample files.
Adding a hack for other tests which are still running with specific
extensions. That is needed to avoid all tests updates in single commit.
Partially implements blueprint api-sample-tests-with-all-extensions
Change-Id: I9c44da3d9df39c1db0948194502be52f4f15acf2
This patches adds changes to the Nova REST API to allow
users to create a server with a description, rebuild
a server with a description, update the description,
and get the description in the server details.
Note: Future commits will be done to support the server
description in python-novaclient and openstack-client.
APIImpact
Implements blueprint: user-settable-server-description
Change-Id: I74b1a340c5ab98fdea2186e87dd13f42ce7c7661
This introduces microversion 2.18 which signals that the {project_id}
is no longer required in URLs.
It tests this with an additional scenario in api_samples which makes
all the requests without the project_id in the url (using a different
noauth middleware to accomplish this).
Update the link fixer in the ApiSamples matching code to also update
for optional project_id. This is the least worse approach here,
because if we set request_api_version, then we have to duplicate the
entire template tree as well, which we definitely don't want to do, as
it now correctly handles either url form.
This updates the auth tests to bifurcate with testscenarios instead of
the subclass model, which makes for more consistent tests.
In order to support adding routes without project_id we have to be
able to restrict project_id something that doesn't match any of our
top level routes.
The default for this is [0-9a-f\-]+ which will match all of the
following:
- keystone default generated project_ids [0-9a-f]{32}
- integer project_ids (\d+) - known in use by RAX
- uuids with dashes (no known users, but suspect there might be)
This can be overrided with the new (but already deprecated)
``project_id_regex`` config option.
NOTE: we used this feature to expand the regex to match 'fake' and
'openstack' as valid project ids in tests. Those concepts are deeply
embedded in our tests, and need to be unwound independently.
APIImpact
Implements bp:service-catalog-tng
Co-Authored-By: Augustina Ragwitz <auggy@cpan.org>
Change-Id: Id92251243d9e92f30e466419110fce5781304823
servers-detail-resp.json of microversion v2.16 contains some invalid
indents which are made with tabs instead of spaces.
This patch fixes them by replacing with spaces.
Change-Id: I1ee55e7b8ec78bde1d2e6097585b8d3db07d68f2
Change I9b649aafba011d537e3fe4eebef7a678ff6733e4 has added a
compute API to trigger crash dump in instance. This patch adds
the REST API to nova. It enables users to trigger crash dump in
an instance through REST API.
Change-Id: I6ed777ff637254b4b79417008f9055dd19fc7405
Implements: blueprint instance-crash-dump
Co-Authored-By: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
When a compute service fails, the power states of the hosted VMs are not
updated. A normal user querying his or her VMs does not get any indication
about the failure. Also there is no indication about maintenance.
This change will expose new attribute host_status to user querying his
VMs. Attribute is only seen if policy allows.
DocImpact: This adds API microversion
Implements blueprint get-valid-server-state
APIImpact
Change-Id: I5abea08bdc27624a7f23a7db8964f8c2a7b0eaa7
This API samples test was not using testscenarios properly,
and it wasn't extending the correct test class, so it was:
1. Not actually running tests.
2. Not running tests at the correct microversion (v2.13).
This fixes the testscenarios setup for the subclass and the
API samples and templates (since it's not using subs for the
intended project_id that was in the samples).
Also fixes a typo in ApiSampleTestBaseV21.
Change-Id: I27e8fce5d456914d88098c6cfabe05fa8afbc8eb
Closes-Bug: #1534354
Allows soft-affinity and soft-anti-affinity to be used as a policy
for the server group api extension. Add soft policies
to the JSONSchema, which validates server group definitions.
Bump API microversion to 2.15.
Implements: blueprint soft-affinity-for-server-group
Change-Id: I376bdba7df1344d269aa126f4896610baf2e16a2