We prevent a lot of tests from getting run on tools/ changes given
that most of that is unrelated to running any tests. By having the
gate hooks in that directory it made for somewhat odd separation of
what is test sensitive and what is not.
This moves things to the gate/ top level directory, and puts a symlink
in place to handle project-config compatibility until that can be
updated.
Change-Id: Iec9e89f0380256c1ae8df2d19c547d67bbdebd65
Fix the following parameters.
- 'id'(server group id) defined as a path parameter in body
- 'server_group' object defined as 'server_groups' list
- missing 'server_group' object
- 'user_id' defined as a query parameter in body
Change-Id: I3dcf6aa317b428d6984b0dcb61496594a68bba6f
Closes-Bug: #1652897
Right now with CellsV2 the servers api will fail to load the fault
for an instance because it does not target it to a particular cell.
This makes us look up the instance mapping and use it to target
loading of the fault.
Change-Id: Ic2df2c3cfa66a91bd20437f534287e770b85f51d
placement_dev.rst provides a nova-developer oriented perspective on
the placement API including some explanation of its structure, some
gotchas to be aware of, and some instruction on how to add to it.
Subsequent patches will fill in the missing sections.
Change-Id: Ia571800774aa14beab121c85a693d75fc30ed517
Based on the mail discussion [1] I think we should use the same payload
for delete, create, update notifications of the same entity.
This will help keep the notifications more consistent and easier
to filter.
[1] http://lists.openstack.org/pipermail/openstack-dev/2016-December/109501.html
Change-Id: If4237b111ffb0e8511b6a73c57807b9bd4addf80
The instance_fault_get_by_instance_uuids DB API method returns
results sorted by created_at in descending order, so the newest
fault should be at the front of the list for a given instance
uuid in the resulting dict.
However, the way the test for this was written the 'expected'
list actually had the faults in order from oldest to newest. The
reason this didn't fail the test was because it was using
_assertEqualListsOfObjects to compare the results, which sorts
the lists before comparing them, which is exactly NOT what we want
when we care about the sort order of the results.
The test is fixed by using _assertEqualOrderedListOfObjects which
leaves the original sort order of the lists to compare and fixes
the 'expected' list by inserting the newest faults at the front
of the list.
Change-Id: I58990194016447b05b42df76141a193595cdcb9c
Related-Bug: #1632247
In order to store the emulator policy requested for an instance, a new
field cpu_emulator_threads_policy has been added to the object
InstanceNUMATopology.
implements blueprint libvirt-emulator-threads-policy
Change-Id: Id0f3726069a00955d32cf394fccc39e2a149e5ca
If the audit hasn’t been triggered and confirm resize is executed, the
resources aren't dropped right away because the itype stored in the
self.tracked_migrations corresponds to the new flavor. However, the
resource usage would get recalculated correctly by the next periodic
resource audit.
If the audit got executed, it corresponds to the old flavor, and resources
get dropped properly.
This patch removes part of the condition in drop_move_claim() which was
trying to validate that the instance type (itype) stored in the
tracked_migration was corresponding instance type being passed in the
method. Looking at the code where drop_move_claim() is being called shows
that we can safely remove this check since it is known (based on the prefix)
which resources needs to be dropped.
Also, unit test changes from b816e3 were moved to a separate test. It
introduced a hacky way to force the migration dest_compute and makes it hard
to keep _test_finish_revert_resize() generic and have the resources correctly
tracked.
Closes-Bug: #1647370
Change-Id: Ic02b56be5684d9206ece4c20f5194802dfe12e25
The mox stubs have been replaced in the following files.
* nova/tests/unit/cells/test_cells_filters.py
* nova/tests/unit/cells/test_cells_rpcapi.py
* nova/tests/unit/cells/test_cells_scheduler.py
* nova/tests/unit/cells/test_cells_state_manager.py
* nova/tests/unit/cells/test_cells_utils.py
Change-Id: I27b22e7b1ae22527c4f99371a417679afbe07048
Implements: blueprint remove-mox-ocata
* Use encode_utils.safe_decode from oslo.utils
to decode result of urllib.parse.unquote(cidr)
Partially-Implements: blueprint goal-python35
Change-Id: If139d093f8951f59753c06a88a59b4fb2f878940
The multi-queue feature was added:
https://blueprints.launchpad.net/nova/+spec/libvirt-virtio-net-multiqueue
and it is controlled using image metadata:
hw_vif_mutliqueue_enabled=true|false
when users want to launch an instance with
a SRIOV port and several normal ports
with multi-queue feature, ERROR can take
place due to wrong driver name for SRIOV
interface. Details could be found in bug
description.
Change-Id: I52c51ff17f43133154f6ea8aa4107f1673f82dde
Closes-bug: #1641814
nova/tests/unit/scheduler/client/test_report.py had a bunch of tests in
a base test class instead of just the setUp(). This resulted in
re-running a whole bunch of tests unnecessarily.
Before:
Ran: 61 tests in 35.0000 sec.
- Passed: 61
- Skipped: 0
- Expected Fail: 0
- Unexpected Success: 0
- Failed: 0
Sum of execute time for each test: 11.8261 sec.
after:
Ran: 35 tests in 35.0000 sec.
- Passed: 35
- Skipped: 0
- Expected Fail: 0
- Unexpected Success: 0
- Failed: 0
Sum of execute time for each test: 5.0003 sec.
Same test content and coverage, just not re-running tests unnecessarily.
Change-Id: Icbdf8dd4e221259fd4a2683cb12cc26dc87733bd
This patch replaces mox with mock in
tests/unit/objects/test_instance_info_cache
Partially-Implements: blueprint remove-mox-ocata
Change-Id: I6e2a86bd6641144e19d45fca996ce6beef1a3c59