def test_runs_migration_for_cobalt(self):
        nova_client = mock.Mock()
        config = mock.Mock()

        config.migrate.incloud_live_migration = "cobalt"
        vm_id = "some-id"
        dest_host = "dest-host"

        instances.incloud_live_migrate(nova_client, config, vm_id, dest_host)
Esempio n. 2
0
 def live_migrate_vm(self, vm_id, destination_host):
     migration_type = self.config.migrate.incloud_live_migration
     if migration_type == 'cold':
         cold_evacuate.cold_evacuate(self.config, self.nova_client, vm_id,
                                     destination_host)
     else:
         # VM source host is taken from VM properties
         instances.incloud_live_migrate(self.nova_client, self.config,
                                        vm_id, destination_host)
Esempio n. 3
0
 def live_migrate_vm(self, vm_id, destination_host):
     migration_type = self.config.migrate.incloud_live_migration
     if migration_type == 'cold':
         cold_evacuate.cold_evacuate(self.config, self.nova_client, vm_id,
                                     destination_host)
     else:
         # VM source host is taken from VM properties
         instances.incloud_live_migrate(self.nova_client, self.config,
                                        vm_id, destination_host)
Esempio n. 4
0
    def test_runs_migration_for_cobalt(self):
        nova_client = mock.Mock()
        config = mock.Mock()

        config.migrate.incloud_live_migration = "cobalt"
        vm_id = "some-id"
        dest_host = "dest-host"

        instances.incloud_live_migrate(nova_client, config, vm_id, dest_host)