diff options
author | Stephen Finucane <sfinucan@redhat.com> | 2020-02-05 16:16:57 +0000 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2020-05-08 14:45:54 +0100 |
commit | f203da383871aea195fd5a03ac3b5544176344cb (patch) | |
tree | 3c8565b6b36e4a5c3a1d7d76b5f9bf20c99747da /nova/conductor | |
parent | 487c4fa92066c1cc69338aed277468b21b1c5eb9 (diff) | |
download | nova-f203da383871aea195fd5a03ac3b5544176344cb.tar.gz |
objects: Add MigrationTypeField
We use these things many places in the code and it would be good to have
constants to reference. Do just that.
Note that this results in a change in the object hash. However, there
are no actual changes in the output object so that's okay.
Change-Id: If02567ce0a3431dda5b2bf6d398bbf7cc954eed0
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'nova/conductor')
-rw-r--r-- | nova/conductor/manager.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/conductor/manager.py b/nova/conductor/manager.py index 9f816cd533..5c6f507245 100644 --- a/nova/conductor/manager.py +++ b/nova/conductor/manager.py @@ -456,7 +456,7 @@ class ComputeTaskManager(base.Base): migration.status = 'accepted' migration.instance_uuid = instance.uuid migration.source_compute = instance.host - migration.migration_type = 'live-migration' + migration.migration_type = fields.MigrationType.LIVE_MIGRATION if instance.obj_attr_is_set('flavor'): migration.old_instance_type_id = instance.flavor.id migration.new_instance_type_id = instance.flavor.id |