Merge "xenapi: Remove Xen-only code paths"
This commit is contained in:
commit
9a2763f846
|
@ -39,13 +39,7 @@ def main():
|
||||||
CONF.set_default('web', '/usr/share/novnc')
|
CONF.set_default('web', '/usr/share/novnc')
|
||||||
config.parse_args(sys.argv)
|
config.parse_args(sys.argv)
|
||||||
|
|
||||||
# TODO(stephenfin): Always enable the security proxy once we support RFB
|
|
||||||
# version 3.3, as used in XenServer.
|
|
||||||
security_proxy = None
|
|
||||||
if CONF.compute_driver != 'xenapi.XenAPIDriver':
|
|
||||||
security_proxy = rfb.RFBSecurityProxy()
|
|
||||||
|
|
||||||
baseproxy.proxy(
|
baseproxy.proxy(
|
||||||
host=CONF.vnc.novncproxy_host,
|
host=CONF.vnc.novncproxy_host,
|
||||||
port=CONF.vnc.novncproxy_port,
|
port=CONF.vnc.novncproxy_port,
|
||||||
security_proxy=security_proxy)
|
security_proxy=rfb.RFBSecurityProxy())
|
||||||
|
|
|
@ -8439,9 +8439,6 @@ class ComputeManager(manager.Manager):
|
||||||
# vpmem must be cleanped
|
# vpmem must be cleanped
|
||||||
do_cleanup = not migrate_data.is_shared_instance_path or has_vpmem
|
do_cleanup = not migrate_data.is_shared_instance_path or has_vpmem
|
||||||
destroy_disks = not migrate_data.is_shared_block_storage
|
destroy_disks = not migrate_data.is_shared_block_storage
|
||||||
elif isinstance(migrate_data, migrate_data_obj.XenapiLiveMigrateData):
|
|
||||||
do_cleanup = migrate_data.block_migration
|
|
||||||
destroy_disks = migrate_data.block_migration
|
|
||||||
elif isinstance(migrate_data, migrate_data_obj.HyperVLiveMigrateData):
|
elif isinstance(migrate_data, migrate_data_obj.HyperVLiveMigrateData):
|
||||||
# NOTE(claudiub): We need to cleanup any zombie Planned VM.
|
# NOTE(claudiub): We need to cleanup any zombie Planned VM.
|
||||||
do_cleanup = True
|
do_cleanup = True
|
||||||
|
|
|
@ -778,6 +778,8 @@ class DiskFormat(BaseNovaEnum):
|
||||||
ALL = (RBD, LVM, QCOW2, RAW, PLOOP, VHD, VMDK, VDI, ISO)
|
ALL = (RBD, LVM, QCOW2, RAW, PLOOP, VHD, VMDK, VDI, ISO)
|
||||||
|
|
||||||
|
|
||||||
|
# TODO(stephenfin): Remove the xenapi value when we bump the 'Diagnostics'
|
||||||
|
# object (the only user of this enum) to 2.0
|
||||||
class HypervisorDriver(BaseNovaEnum):
|
class HypervisorDriver(BaseNovaEnum):
|
||||||
LIBVIRT = "libvirt"
|
LIBVIRT = "libvirt"
|
||||||
XENAPI = "xenapi"
|
XENAPI = "xenapi"
|
||||||
|
|
|
@ -6224,8 +6224,10 @@ class ComputeTestCase(BaseTestCase,
|
||||||
fake_bdms.append(bdms)
|
fake_bdms.append(bdms)
|
||||||
return bdms
|
return bdms
|
||||||
|
|
||||||
migrate_data = migrate_data_obj.XenapiLiveMigrateData(
|
migrate_data = migrate_data_obj.LibvirtLiveMigrateData(
|
||||||
block_migration=True)
|
block_migration=True,
|
||||||
|
is_shared_instance_path=False,
|
||||||
|
is_shared_block_storage=False)
|
||||||
|
|
||||||
mock_pre.side_effect = test.TestingException
|
mock_pre.side_effect = test.TestingException
|
||||||
mock_get_bdms.side_effect = gen_fake_bdms
|
mock_get_bdms.side_effect = gen_fake_bdms
|
||||||
|
@ -6289,7 +6291,7 @@ class ComputeTestCase(BaseTestCase,
|
||||||
mock_rollback.assert_called_once_with(c, instance, dest_host,
|
mock_rollback.assert_called_once_with(c, instance, dest_host,
|
||||||
destroy_disks=True,
|
destroy_disks=True,
|
||||||
migrate_data=test.MatchType(
|
migrate_data=test.MatchType(
|
||||||
migrate_data_obj.XenapiLiveMigrateData))
|
migrate_data_obj.LibvirtLiveMigrateData))
|
||||||
# Assert that the final attachment_ids returned by
|
# Assert that the final attachment_ids returned by
|
||||||
# BlockDeviceMappingList.get_by_instance_uuid are then deleted.
|
# BlockDeviceMappingList.get_by_instance_uuid are then deleted.
|
||||||
mock_attachment_delete.assert_has_calls([
|
mock_attachment_delete.assert_has_calls([
|
||||||
|
|
|
@ -10435,20 +10435,6 @@ class ComputeManagerMigrationTestCase(test.NoDBTestCase,
|
||||||
self.assertFalse(do_cleanup)
|
self.assertFalse(do_cleanup)
|
||||||
self.assertFalse(destroy_disks)
|
self.assertFalse(destroy_disks)
|
||||||
|
|
||||||
def test_live_migration_cleanup_flags_block_migrate_xenapi(self):
|
|
||||||
migrate_data = objects.XenapiLiveMigrateData(block_migration=True)
|
|
||||||
do_cleanup, destroy_disks = self.compute._live_migration_cleanup_flags(
|
|
||||||
migrate_data)
|
|
||||||
self.assertTrue(do_cleanup)
|
|
||||||
self.assertTrue(destroy_disks)
|
|
||||||
|
|
||||||
def test_live_migration_cleanup_flags_live_migrate_xenapi(self):
|
|
||||||
migrate_data = objects.XenapiLiveMigrateData(block_migration=False)
|
|
||||||
do_cleanup, destroy_disks = self.compute._live_migration_cleanup_flags(
|
|
||||||
migrate_data)
|
|
||||||
self.assertFalse(do_cleanup)
|
|
||||||
self.assertFalse(destroy_disks)
|
|
||||||
|
|
||||||
def test_live_migration_cleanup_flags_live_migrate(self):
|
def test_live_migration_cleanup_flags_live_migrate(self):
|
||||||
do_cleanup, destroy_disks = self.compute._live_migration_cleanup_flags(
|
do_cleanup, destroy_disks = self.compute._live_migration_cleanup_flags(
|
||||||
{})
|
{})
|
||||||
|
|
Loading…
Reference in New Issue