nova/nova/tests
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
..
functional Merge "Fix resetting non-persistent fields when saving obj" into stable/rocky 2019-03-15 22:32:13 +00:00
live_migration/hooks Fix legacy-grenade-dsvm-neutron-multinode-live-migration 2019-02-28 15:43:57 -05:00
unit Temporarily mutate migration object in finish_revert_resize 2019-03-29 09:47:36 -04:00
__init__.py
fixtures.py Fix race in test_volume_swap_server_with_error 2019-03-02 14:38:25 +00:00
json_ref.py Transform instance.exists notification 2018-06-05 12:51:30 +00:00
uuidsentinel.py