def test_start_and_stop_vm(self): result = startvm(vm_name=self.vm['uuid'], start_type='headless') testify.assert_equal(self.vm['uuid'], result['uuid']) # this looks hacky but waiting on these operations finishing will # be handled in the biz logic at a higher level time.sleep(5) controlvm(vm_uuid=self.vm['uuid'], action='poweroff') time.sleep(5)
def cleanup_vm(self): controlvm(vm_uuid=self.vm0['uuid'], action='poweroff') controlvm(vm_uuid=self.vm1['uuid'], action='poweroff') controlvm(vm_uuid=self.vm2['uuid'], action='poweroff') time.sleep(5) delete_vm(**self.vm0) delete_vm(**self.vm1) delete_vm(**self.vm2)