def test_0050_migrate_vms_back(self): """Migrate VM(s) from one resource pool to another.""" platform = Platform(TestPVDC._sys_admin_client) task = platform.pvdc_migrate_vms(TestPVDC._pvdc_name, TestPVDC._vms_to_migrate, TestPVDC._target_resource_pool) res = TestPVDC._sys_admin_client.get_task_monitor().wait_for_success( task=task) self.assertEqual(res.get('status'), TaskStatus.SUCCESS.value)
def test_0050_migrate_vms_back(self): """Migrate VM(s) from one resource pool to another.""" platform = Platform(TestPVDC._sys_admin_client) task = platform.pvdc_migrate_vms( TestPVDC._pvdc_name, TestPVDC._vms_to_migrate, TestPVDC._target_resource_pool) TestPVDC._sys_admin_client.get_task_monitor().wait_for_success( task=task)
def test_0050_migrate_vms_back(self): """Migrate VM(s) from one resource pool to another.""" platform = Platform(TestPVDC._sys_admin_client) task = platform.pvdc_migrate_vms( TestPVDC._pvdc_name, TestPVDC._vms_to_migrate, TestPVDC._target_resource_pool) res = TestPVDC._sys_admin_client.get_task_monitor().wait_for_success( task=task) self.assertEqual(res.get('status'), TaskStatus.SUCCESS.value)
def migrate_vms(ctx, pvdc_name, source_rp, vm_name, target_rp): try: restore_session(ctx) client = ctx.obj['client'] platform = Platform(client) task = platform.pvdc_migrate_vms(pvdc_name=pvdc_name, vms_to_migrate=vm_name, src_resource_pool=source_rp, target_resource_pool=target_rp) stdout(task, ctx) except Exception as e: stderr(e, ctx)