GET simple_tenant_usage API accept query param to filter the
tenant usage.
This commit adds json schema to validate the valid
query parameters.
There is no change in API behaviour and additionalProperties
is kept True for backward compatibility.
Partially implements blueprint json-schema-validation-for-query-param
Change-Id: I24726fd9a82617798a13597ad9883db22a4a9846
Change test_live_migrate_force_complete and test_live_migrate_delete to
use FakeDriver instead of mock.side_effect.
Change-Id: I7eae472b9cbef98ed77cdf22141c8332b17d37c2
This patch covers the following two scenarios while checking the
resource allocations at every steps:
* boot a server, soft delete, wait until automatic reclaim
* boot a server, soft delete, restore, normal delete
Change-Id: I635481b944b8a6c73001bbc69f1393a2eeb54527
Starting multiple compute service in a single functional test is
not a single line of code and it repeated multiple times. So
this patch pulls that code out into a common util function.
Change-Id: I204e17fe105f6378f1c9f8a7fc622a1886babecc
The I55edd2c6e4c752dbe675b6d51d71a047bf49597a refactor created a base class
for test cases that are checking allocations. This patch moves additional util
functions from the ServerMovingTest class to the base. The subsequent patch
covering soft delete cases needs these utils for non server moving tests.
Also the utils are made more generic to handle arbitrary number of compute
services. For this to work the setUp of the existing test classes needed
a small enhancement too.
Change-Id: I8430d39b8e8147731080e76f14a1a2b809c9863c
The service token feature is no longer considered experimental. This
change set rewords the help strings in the service_token conf
accordingly (fixing some typographical issues at the same time).
Change-Id: Ibaf06ff4f19283544de720b0b5f01ddf655b0b46
Change the Adapter loading for glance to use the auth from the user
context instead of exposing and requiring it in the conf. With this
change, it is possible to leave the [glance] conf section empty and
still be able to discover the image API endpoint from the service
catalog.
Note that, when we do this, we often end up with the user auth being a
_ContextAuthPlugin, which doesn't conform to the characteristics of
keystoneauth1.identity.base.BaseIdentityPlugin as augmented in
keystoneauth1 3.1.0. This requires a series of workarounds until bug
1709118 is fixed. These, along with workarounds for bugs 1707993 and
1707995, are subsumed with this change set in a (hopefully temporary)
helper method nova.utils.get_endpoint.
This lays the foundation for other services that should use user
context for authentication - those via which Nova is acting on behalf
of the user, i.e. cinder, keystone, and (sometimes) neutron[1].
(Services such as placement and ironic (and sometimes neutron) should
continue to use admin auth context loaded from the conf.)
[1] https://github.com/openstack/nova/blob/bb4faf40dfb02237af119646a5ebd960b072b31e/nova/network/neutronv2/api.py#L149-L160
Co-Authored-By: Eric Fried <efried@us.ibm.com>
Partial-Implements: bp use-ksa-adapter-for-endpoints
Change-Id: I4e755b9c66ec8bc3af0393e81cffd91c56064717
Some pGPUs (e.g. NVIDIA GRID K1) support different vGPU types. User can
use `enabled_vgpu_types` to specify the enabled vGPU types that a guest
could consume from the host.
NOTE(sbauza) :
Since that configuration is shared between all virt drivers, we need to
provide a single change that will just add that conf opt and then use
it in separate series as a common base. That implies that configuration
option is useless until we merge the code that reads it, but that's a
necessary compromise for making sure we can move both Xen and libvirt
efforts in parallel.
Partially Implements: blueprint add-support-for-vgpu
Co-Authored-By: Sylvain Bauza <sbauza@redhat.com>
Change-Id: I56f9597e968eac041832cdb90fe52cf0d3b4a4ef
This patch aims at deleting the records of the archived instances from
the instance_mappings and request_specs tables in the API database
immediately following their archival from instances to shadow_instances
table. So upon running the 'nova-manage db archive_deleted_rows' command
the records of the archived instances will be automatically removed from
the instance_mappings and request_specs tables as well. A warning has
also been added to fix the issue of 'nova-manage verify_instance'
returning a valid instance mapping even after the instance is deleted.
The patch also adds InstanceMappingList.destory_bulk() and
RequestSpec.destroy_bulk() methods for ease of bulk deletion of records.
Change-Id: I483701a55576c245d091ff086b32081b392f746e
Closes-Bug: #1724621
Closes-Bug: #1678056
In rebuild operation, users can unset the existing keypair
by setting 'key_name' to 'null' in a request body.
(The function has been added in
I23886a89c25f811cfbe7e2500ce7ff52f9162966).
But it is not described obviously in API reference.
So add an additional description in API reference.
Change-Id: I2d1b8eddd8555ad6896541b308895dc537686168
In "Delete Assisted Volume Snapshot",
there is an incorrect example in the description for
the 'delete_info' parameter.
So fix it.
Change-Id: I0b984bee06b0890d7705b9e47a5f975266b6a670
Closes-Bug: #1726254
For the first chosen host during an instance build, conductor
will pass both filter_properties and request_spec and they
both have scheduler_hints.
We want to eventually get rid of the legacy filter_properties,
so this change uses the request_spec, if available, to get the
scheduler_hints in the compute during the build. These are only
used when validating server group (anti-)affinity policies.
If the request_spec isn't available, because we rescheduled to
another host for example, then we fallback to the filter_properties
to get the hints.
Part of blueprint request-spec-use-by-compute
Change-Id: I49ffebcd129990f1835f404d98b51732a32171eb
As nova extensions concept has already been removed, next
goal is to merge all scattered code into main controller code.
Currently schema, request and response extended code are present
in multiple extensions files.
This commit merge the flavor extensions code into main
controller view.
Note: test_flavor_rxtx.py is removed as those tests are now
covered in test_flavors.py
Partially implements: blueprint api-extensions-merge-queens
Change-Id: I7ddda37ffb1afc72256624b0ddad319f133e0dd8
Briefly document in the Placement API reference:
a) the use of Content-Type: application/json
b) how to use microversion headers, including a link to the main
Microversions reference.
Change-Id: I60d7b9dfe4f1c50fc50eaf07a04848c220ffcf62
This patch refactors the sample files of keypair-create, keypair-delete
and keypair-import notifications to use a common KeypairPayload sample
data.
Change-Id: Ic8f2d51fe4922cd7633b0d77dc86702798bae1d6
To support including project_id and user_id in the output of GET
/allocations/{consumer_uuid} adjust the
_get_allocations_by_consumer_uuid query to join the necessary tables to
get project_id and user_id information.
Note that this is done as outer joins because in order to support older
(but not much older) microversions we need to allow those fields to be
null.
_get_allocations_by_provider_id is not extended in the same way as we
do not yet have any immediate need for the information in GET
/resource_providers/{uuid}/allocations.
Change-Id: I59175fa51e9553f41c73a6bcd1a77a134e0b19e3
Partially-Implements: bp symmetric-allocations
As mentioned in the TODO info, patch
https://review.openstack.org/#/c/418066/
has been released in oslo.serialization
2.18.0, so it's time to clean this up.
Change-Id: Iaff716feb5f65740b3bd8aeaa899665cb599e878