Commit Graph

48801 Commits

Author SHA1 Message Date
Zuul b4e765ea33 Merge "Change live_migrate tests to use fakedriver" 2017-11-23 12:43:07 +00:00
Zuul 6f39aff34f Merge "Test resource allocation during soft delete" 2017-11-23 12:18:38 +00:00
Zuul 8194491ebe Merge "factor out compute service start in ServerMovingTest" 2017-11-23 12:18:33 +00:00
Zuul 8017c35291 Merge "Clean up exception caught in _validate_and_build_base_options" 2017-11-23 00:24:48 +00:00
Zuul 1a289f1c02 Merge "api-ref: fix the type on the block_device_mapping_v2 parameter" 2017-11-23 00:07:30 +00:00
Zuul 98b53fee26 Merge "VMware: ensure that provider networks work for type 'portgroup'" 2017-11-23 00:07:24 +00:00
Zuul 7ea8563d14 Merge "Implement query param schema for simple_tenant_usage" 2017-11-22 23:06:10 +00:00
Zuul fdd6bae252 Merge "Use the RequestSpec when getting scheduler_hints in compute" 2017-11-22 22:05:43 +00:00
ghanshyam 3fc7609931 Implement query param schema for simple_tenant_usage
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
2017-11-22 19:46:32 +00:00
Zuul 6af4978896 Merge "Moving more utils to ProviderUsageBaseTestCase" 2017-11-22 17:27:52 +00:00
Zuul 86aa85ad1d Merge "Use Migration object in ComputeManagerMigrationTestCase" 2017-11-22 17:17:58 +00:00
Zuul f0643869e3 Merge "rt: Make resource tracker always invoking get_inventory()" 2017-11-22 16:26:12 +00:00
Lajos Katona a01747e6c7 Change live_migrate tests to use fakedriver
Change test_live_migrate_force_complete and test_live_migrate_delete to
use FakeDriver instead of mock.side_effect.

Change-Id: I7eae472b9cbef98ed77cdf22141c8332b17d37c2
2017-11-22 14:40:56 +00:00
Balazs Gibizer 3d663a7608 Test resource allocation during soft delete
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
2017-11-22 14:40:42 +00:00
Balazs Gibizer f4b6a6872b factor out compute service start in ServerMovingTest
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
2017-11-22 14:40:34 +00:00
Balazs Gibizer 6c49c2c8fc Moving more utils to ProviderUsageBaseTestCase
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
2017-11-22 15:33:39 +01:00
Zuul f69d98ea74 Merge "Allow shuffling hosts with the same best weight" 2017-11-22 14:14:13 +00:00
Zuul e9ce5c4c95 Merge "Update bindep.txt for doc builds" 2017-11-22 03:44:14 +00:00
Zuul 8628c75738 Merge "Service token is not experimental" 2017-11-21 20:52:45 +00:00
Zuul 24152a8f8f Merge "Get auth from context for glance endpoint" 2017-11-21 20:04:25 +00:00
Andreas Jaeger 338ed6f955 Update bindep.txt for doc builds
https://governance.openstack.org/tc/reference/project-testing-interface.html#documentation
specifies that doc dependencies need the doc tag in bindep, use it.

Leave test environment in for transition period until we use the new
scripts.

Change-Id: I851a06fbc07a84f70ee76e78062777ad2bade764
2017-11-21 21:01:09 +01:00
Zuul fdf50a1a62 Merge "cleanup mapping/reqspec after archive instance" 2017-11-21 19:04:28 +00:00
Zuul 2469b3593d Merge "vgpu: add enabled white list" 2017-11-21 18:05:34 +00:00
Eric Fried 1acfac0101 Service token is not experimental
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
2017-11-21 17:36:32 +00:00
Zuul 1878039f8f Merge "Merge flavor extensions controller code" 2017-11-21 17:30:46 +00:00
Zuul aa170b0088 Merge "Deduplicate keypair notification samples" 2017-11-21 16:31:06 +00:00
Eric Fried 9519601401 Get auth from context for glance endpoint
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
2017-11-21 10:26:42 -06:00
Zuul bb4faf40df Merge "placement: Document in: prefix for ?member_of=" 2017-11-21 15:25:58 +00:00
Zuul abab805011 Merge "placement: Document request headers in api-ref" 2017-11-21 15:25:48 +00:00
naichuans 0b39b51ae5 vgpu: add enabled white list
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
2017-11-21 06:43:52 -08:00
Surya Seetharaman 32fd58813f cleanup mapping/reqspec after archive instance
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
2017-11-21 15:28:07 +01:00
Zuul 1da7510aeb Merge "Add a note about versioned notification samples being per-release" 2017-11-21 12:27:09 +00:00
Zuul b21f903444 Merge "Document the real behavior of notify_on_state_change" 2017-11-21 12:27:02 +00:00
Zuul 82217e6308 Merge "Using --option ARGUMENT" 2017-11-21 12:26:50 +00:00
Zuul 190579d19a Merge "Fix format in live-migration-usage.rst" 2017-11-21 12:26:44 +00:00
Zuul f7da17b8e3 Merge "[placement] Fix a wrong redirection in placement doc" 2017-11-21 12:23:07 +00:00
Zuul 9633ebdf37 Merge "VMware: serial console log (completed)" 2017-11-21 10:57:15 +00:00
Zuul 497da9f90f Merge "api-ref: Fix an example in "Delete Assisted Volume Snapshot"" 2017-11-21 05:31:11 +00:00
Zuul 82e846a916 Merge "api-ref: Add a description of 'key_name' in rebuild" 2017-11-21 04:35:19 +00:00
Zuul 190deb3fd9 Merge "Include project_id and user_id in AllocationList.get_all_by_consumer_id" 2017-11-21 02:29:37 +00:00
Takashi NATSUME 5444e7ff3a api-ref: Add a description of 'key_name' in rebuild
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
2017-11-21 02:00:51 +00:00
Takashi NATSUME 4f6005f787 api-ref: Fix an example in "Delete Assisted Volume Snapshot"
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
2017-11-21 02:00:32 +00:00
Matt Riedemann 1b2deeb7e6 Use the RequestSpec when getting scheduler_hints in compute
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
2017-11-20 16:22:57 -05:00
ghanshyam 1204e4dab8 Merge flavor extensions controller code
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
2017-11-20 14:37:08 -05:00
Eric Fried 44b77d887a placement: Document request headers in api-ref
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
2017-11-20 10:47:12 -06:00
Előd Illés de9ce26c73 Deduplicate keypair notification samples
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
2017-11-20 16:30:21 +01:00
Zuul 8fd4f9a029 Merge "api-ref: make a note about os:scheduler_hints being a top-level key" 2017-11-20 15:18:38 +00:00
Zuul fbc1e6d720 Merge "Fix docstring for GET /os-migrations and related DB API" 2017-11-20 15:18:33 +00:00
Chris Dent 3f33e89d79 Include project_id and user_id in AllocationList.get_all_by_consumer_id
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
2017-11-20 08:17:22 +00:00
Kevin_Zheng 8964a5e13b Clean up exception caught in _validate_and_build_base_options
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
2017-11-20 06:45:17 +00:00