Add missing condition

Change [1] added new fields 'src|dst_supports_numa_live_migration'
to LibvirtLiveMigrateData object, but missed if condition for
dst_supports_numa_live_migration field in obj_make_compatible
method.

This change adds the if condition as well as fix typo in unit test
because of which this wasn't catched earlier.

Closes-Bug: #1975891
Change-Id: Ice5a2c7aca77f47ea6328a10d835854d9aff408e
(cherry picked from commit 3aa77a3999)
(cherry picked from commit dfa05d62da)
This commit is contained in:
Rajesh Tailor 2022-05-27 09:51:11 +05:30 committed by Elod Illes
parent 90c51902e9
commit 7c4059669c
2 changed files with 5 additions and 2 deletions

View File

@ -279,6 +279,9 @@ class LibvirtLiveMigrateData(LiveMigrateData):
if (target_version < (1, 10) and
'src_supports_numa_live_migration' in primitive):
del primitive['src_supports_numa_live_migration']
if (target_version < (1, 10) and
'dst_supports_numa_live_migration' in primitive):
del primitive['dst_supports_numa_live_migration']
if target_version < (1, 10) and 'dst_numa_info' in primitive:
del primitive['dst_numa_info']
if target_version < (1, 9) and 'vifs' in primitive:

View File

@ -94,8 +94,8 @@ class _TestLibvirtLiveMigrateData(object):
target_connect_addr='127.0.0.1',
dst_wants_file_backed_memory=False,
file_backed_memory_discard=False,
src_supports_numa_live_migraton=True,
dst_supports_numa_live_migraton=True,
src_supports_numa_live_migration=True,
dst_supports_numa_live_migration=True,
dst_numa_info=migrate_data.LibvirtLiveMigrateNUMAInfo())
manifest = ovo_base.obj_tree_get_versions(obj.obj_name())