Commit Graph

48706 Commits

Author SHA1 Message Date
Matt Riedemann 85235d229b doc: fix link to creating unit tests in contributor guide
The testing strategy doc was linking to the hacking repo docs
on creating unit tests, which are very specific to creating
unit tests for hacking rules.

This changes the link to the 'creating unit tests' section in
the HACKING.rst file, which has more information on testing
within nova.

Along with that change, the HACKING.rst testing section is
updated a bit to point out that we use stestr now instead of
testr and adds a proper link to the development environment
quickstart docs.

The nova/tests/unit/README.rst actually needs a lot of work,
but that's left for another day.

Change-Id: Ie5106d87d632286162b31ce132e947c306d21abd
Closes-Bug: #1732024
2017-11-14 11:22:43 -05:00
Zuul 50c23d8c86 Merge "Fix wrapping of neutron forbidden error" 2017-11-14 12:37:14 +00:00
Zuul fd75fb0341 Merge "Fix test_get_volume_config method" 2017-11-14 12:37:07 +00:00
Zuul 691d99af63 Merge "block_device_mapping_v2.bus_type is missing from api-ref" 2017-11-14 12:37:01 +00:00
Zuul f248a23033 Merge "Handle InstanceNotFound when setting password via metadata" 2017-11-14 11:58:36 +00:00
Zuul 78dfc7f1f5 Merge "Correct log message when removing a security group" 2017-11-14 06:44:47 +00:00
Zuul 3f65e8043b Merge "Enable reset keypair while rebuilding instance" 2017-11-13 20:59:33 +00:00
Zuul 3813a8ef63 Merge "Fix missing versioned notification sample" 2017-11-13 18:38:12 +00:00
Zuul a80a47ed09 Merge "Updated from global requirements" 2017-11-13 18:03:42 +00:00
Zuul 93d2c5e168 Merge "placement: Contributor doc microversion checklist" 2017-11-13 16:42:04 +00:00
Zuul d3afb7146f Merge "Update contributor microversion doc for compute" 2017-11-13 16:34:13 +00:00
Zuul c299fcf495 Merge "Test allocation_candidates with only sharing RPs" 2017-11-13 16:28:17 +00:00
Saverio Proto 01da04a0a7 Correct log message when removing a security group
When a security group is removed from a port nova
incorrectly logs this as a security group addition

Change-Id: If525313c63c4553abe8bea6f2bfaf75431ed18ea
Closes-bug: 1731889
2017-11-13 13:44:00 +01:00
OpenStack Proposal Bot 2bad877f24 Updated from global requirements
Change-Id: Id0ce6490f2193276454386e314def7440cb7c7b8
2017-11-13 10:24:25 +00:00
Zuul a4fc1bcd08 Merge "Test alloc candidates with same RC in cn & shared" 2017-11-13 07:09:53 +00:00
Zuul 4f258a7535 Merge "Refactor test_allocation_candidates" 2017-11-13 07:09:45 +00:00
LIU Yulong 751f5dec11 Enable reset keypair while rebuilding instance
This patch adds `key_name` param to instance rebuild
API. Then the user could reset the instance keypair
when rebuilding. If set key_name to None, the API
will unset the keypair of the instance.

APIImpact

Implements blueprint: rebuild-keypair-reset

Change-Id: I23886a89c25f811cfbe7e2500ce7ff52f9162966
2017-11-13 10:49:02 +08:00
Zuul 2aa5fb3385 Merge "Don't update RT in _allocate_network" 2017-11-11 21:42:23 +00:00
Zuul 8771db8ca9 Merge "Deduplicate instance.reboot notification samples" 2017-11-11 02:13:18 +00:00
Zuul a7c29fa7e6 Merge "Deduplicate instance.live_migration notification samples" 2017-11-11 02:13:12 +00:00
Zuul f30793ce86 Merge "Deduplicate instance.interface_attach samples" 2017-11-11 02:13:06 +00:00
Zuul b649190ca8 Merge "Deduplicate instance.power-off notification samples" 2017-11-11 02:13:01 +00:00
Zuul b84f2c025d Merge "Deduplicated instance.(un)pause notification samples" 2017-11-11 01:55:13 +00:00
Zuul 8b174196c1 Merge "Factor out duplicated notification sample data (2)" 2017-11-11 01:55:07 +00:00
Zuul a41c484d3e Merge "Factor out duplicated notification sample data" 2017-11-11 01:50:36 +00:00
Zuul 745ae83ec1 Merge "Move last_bytes into the path module" 2017-11-11 01:50:31 +00:00
Zuul fbe48607c8 Merge "libvirt: remove old code in post_live_migration_at_destination" 2017-11-10 16:10:08 +00:00
Eric Fried b80e885e0e Test allocation_candidates with only sharing RPs
This change set contains a functional test demonstrating broken-ness
in AllocationCandidates.get_by_filters when all the providers in the
database are sharing providers.

Change-Id: Ifc5f0b11e54d937d960d5dd9102e6287ee7320d8
Related-Bug: #1730730
2017-11-10 09:09:10 -06:00
Eric Fried d4398f715f Test alloc candidates with same RC in cn & shared
This change set adds a couple of failing test cases that demonstrate
holes in the design of GET /allocation_candidates when inventory from
the same resource class is present on both the compute node (the "main"
resource provider) and a shared resource provider.

The example being used is where the compute node has some local disk,
and is also associated with a shared storage pool.  Both the compute
node RP and the shared storage RP will provide inventory of DISK_GB.

Test case test_common_rc demonstrates bug #1724613: when I ask for
DISK_GB in this setup, the shared storage pool is ignored.  I expect to
get two candidates back: one with the storage from the compute node; the
other with the storage from the shared storage pool.  But I actually
only get the former candidate back.

Test case test_common_rc_traits_split shows bug #1724633: that placement
can't tell which traits are supposed to apply to which resources.  In
the above scenario, if the local storage is SSD and the shared storage
is RAID, and I ask for SSD + RAID, I "expect" to get back no hits.  But
I would in fact get back a candidate with the storage from the shared
storage pool, because the cumulative set of traits would satisfy my
requested SSD + RAID.

Note that the two tests are functionally identical (traits are ignored
entirely) until https://review.openstack.org/#/c/479766/ lands.  At that
point, depending on how we decide to implement the code that would deal
with this scenario, the test may fail *differently* until bug #1724613
is fixed.

Related-Bug: #1724613
Related-Bug: #1724633

Change-Id: I42edf102379cf329aa2252ab779a9f945f5fc155
2017-11-10 09:09:06 -06:00
Zuul a9d3e3cd7c Merge "Revert "Don't overwrite binding-profile"" 2017-11-10 10:01:11 +00:00
Zuul d1f2ef9c53 Merge "Fix instance lookup in hide_server_addresses extension" 2017-11-10 08:26:55 +00:00
Rabi Mishra ce35e9c26f Revert "Don't overwrite binding-profile"
This reverts commit ee7858ffca.

Looks like heat gate is broken with this change, and the
revert fixes it. Tested with https://review.openstack.org/#/c/518834/

Change-Id: I3fefcda93e496e97474bd419d50bd9753a4d1fed
Closes-Bug: #1731395
2017-11-10 06:47:42 +00:00
Zuul 80525ae82e Merge "Cleanup build_request_spec" 2017-11-10 04:42:55 +00:00
Zuul 3371c958f4 Merge "Avoid redundant security group queries in GET /servers/{id}/os-security-groups" 2017-11-10 04:07:29 +00:00
Zuul 989b6d48ba Merge "Add Flavor.description attribute" 2017-11-10 03:22:39 +00:00
Matt Riedemann 749b220ef6 Cleanup build_request_spec
The RequestContext parameter was unused so it's removed.

Change-Id: I2391aa8e61c5e450d123cf3df1294bc119d361dc
2017-11-10 12:03:39 +11:00
Eric Fried 01bee2e32c Refactor test_allocation_candidates
For the sake of code deduplication, LOC reduction, and readability
(improved signal:noise ratio), this change set implements some
convenience methods in AllocationCandidatesTestCase for creation of
placement artifacts such as resource providers, inventory, and
allocations, as well as for extracting and comparing results of
get_allocation_candidates.

This only changes test code; and is just a refactor - no tests are
added, removed, or substantively changed.

Change-Id: I34527a3b2ac33ec3b1c6cce2c4a2163eea1ada4d
2017-11-09 15:29:45 -06:00
Zuul 6979a62aef Merge "Extract allocation candidates functional tests" 2017-11-09 20:18:41 +00:00
Zuul 75f2da2e38 Merge "Don't overwrite binding-profile" 2017-11-09 11:48:01 +00:00
Kevin_Zheng b6ed91d05c block_device_mapping_v2.bus_type is missing from api-ref
block_device_mapping_v2.bus_type is missing from
POST /servers API reference. This patch add it.

Change-Id: I998cf6195d72c80649e9e0fd43be0cf37f8e2f48
Closes-Bug: #1713895
2017-11-09 09:33:09 +08:00
Moshe Levi ee7858ffca Don't overwrite binding-profile
Currently when providing existing direct port, nova-compute
will overwrite the binding-profile information with pci_vendor_info
and pci_slot. The binding-profile will be used to request
NIC capabilities for SR-IOV ports [1]. This also allows to distinguish
which neutron mechanism driver will bind the port [2].

This patch updates the behaviour that on update port it will update,
rather than overwrite, the binding-profile information with
pci_vendor_info and pci_slot. And on unbind port it will remove
only the pci_vendor_info and pci_slot from the port binding-profile
rather than unsetting the entire field.

[1] https://review.openstack.org/#/c/435954/
[2] https://review.openstack.org/#/c/499203/

Closes-Bug: #1719327

Change-Id: I80106707a037d567d0f690570f2cf9cfcd30d594
2017-11-08 02:26:15 -05:00
Zuul b7f53a33fa Merge "Fix return type in FilterScheduler._legacy_find_hosts" 2017-11-08 07:16:14 +00:00
Zuul e48db05b0d Merge "VMware: add support for graceful shutdown of instances" 2017-11-07 09:50:06 +00:00
Zuul 9961a91b0d Merge "check query param for used_limits function" 2017-11-07 07:58:09 +00:00
Matt Riedemann c91ee68d49 Handle InstanceNotFound when setting password via metadata
When setting an instance password via the metadata service, if the
instance is not found it results in a 500 response to the caller.

This change handles the InstanceNotFound error and returns it as
a 400. Note it's a 400 since the instance uuid is part of the POST
request body, not on the URL path so it's not a 404 response.

Change-Id: I4aa99b563e1a5a87aa3e3dfb28800f107676df92
Partial-Bug: #1696848
2017-11-06 17:14:02 -05:00
Eric Fried b974e20862 Extract allocation candidates functional tests
This change set pulls AllocationCandidatesTestCase out of
test_resource_provider and into its own test_allocation_candidates
module.

There is no change to the code.  This is just a refactor.  We're going
to add a bunch more test cases for allocation candidates, and the
test_resource_provider module was already getting out of hand.

Change-Id: Iedfb712d4668a2d34112449aa6ef0263d02e24a4
2017-11-06 14:50:00 -06:00
Zuul 760eb4643a Merge "Transform instance-live_migration_abort notification" 2017-11-06 20:10:14 +00:00
Zuul 3fae792c92 Merge "Granularize resources_from_{flavor|request_spec}" 2017-11-06 19:06:19 +00:00
Zuul bc1e83581a Merge "Parse granular resources/traits from extra_specs" 2017-11-06 19:06:13 +00:00
Balazs Gibizer 41c86ff103 Deduplicate instance.reboot notification samples
This patch refactors the sample files of instance.reboot notifications
to use the previously introduced common sample data.

Change-Id: I6a9e8af79153a9b7825aef0838b60a8d1f97a421
2017-11-06 16:18:22 +01:00