nova/nova/tests/unit/compute
Matt Riedemann f1ac5183d4 Temporarily mutate migration object in finish_revert_resize
As the comment in the code suggests, when calling migrate_instance_finish
in finish_revert_resize we need to temporarily set the migration
object dest_compute to the source_compute since we are moving port
bindings from the dest back to the source. However, this is not
really a temporary change to the object if something fails after
this because the @errors_out_migration decorator will persist the
change which could be confusing later if trying to debug this migration
from the API and the dest_compute and source_compute have the same value.

This fixes the issue by using the temporary_mutation utility.

Also, the obj_to_primitive dance in here is removed since it is not
necessary as migrate_instance_finish handles a Migration object.

Conflicts:
      nova/tests/unit/compute/test_compute_mgr.py

NOTE(mriedem): The conflict is due to not having change
I0851e2d54a1fdc82fe3291fb7e286e790f121e92 in Rocky.

Change-Id: I312d61383345ea0ac1ab0c277b4c468e6aa94656
Closes-Bug: #1818730
(cherry picked from commit 855b554656)
(cherry picked from commit bcb42a43a9)
2019-03-29 09:47:36 -04:00
..
monitors Allow monitor plugins to set own metric object 2016-06-27 14:38:32 +05:30
__init__.py
eventlet_utils.py
fake_resource_tracker.py rt: explicitly pass compute node to _update() 2017-01-12 11:30:03 -08:00
test_claims.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_compute.py Merge "Avoid redundant initialize_connection on source post live migration" into stable/rocky 2019-02-25 11:58:33 +00:00
test_compute_api.py Use nova-consoleauth only if workaround enabled 2018-10-15 17:38:39 +00:00
test_compute_cells.py Fix host validity check for live-migration 2018-08-08 15:02:13 +00:00
test_compute_mgr.py Temporarily mutate migration object in finish_revert_resize 2019-03-29 09:47:36 -04:00
test_compute_utils.py Heal RequestSpec.is_bfv for legacy instances during moves 2018-07-23 12:24:10 -04:00
test_compute_xen.py Remove mox in nova/tests/unit/virt/xenapi/stubs.py 2018-06-21 23:59:39 +00:00
test_flavors.py Make compute unit tests inherit from test.NoDBTestCase 2015-02-24 17:54:29 +02:00
test_host_api.py Enforce case-sensitive hostnames in aggregate host add 2018-09-25 19:08:25 -04:00
test_instance_list.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_keypairs.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_multi_cell_list.py Some nit fix in multi_cell_list 2017-12-13 14:27:20 +08:00
test_provider_tree.py Add method to get cpu traits 2018-07-24 12:37:46 +00:00
test_resource_tracker.py Fix resource tracker updates during instance evacuation 2019-03-05 19:22:14 +08:00
test_rpcapi.py Make compute rpcapi version calculation check all cells 2018-12-13 16:10:05 +00:00
test_shelve.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_stats.py Change consecutive build failure limit to a weigher 2018-06-06 15:18:50 -07:00
test_virtapi.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00