本文整理汇总了Python中cfme.infrastructure.virtual_machines.Vm.migrate_vm方法的典型用法代码示例。如果您正苦于以下问题:Python Vm.migrate_vm方法的具体用法?Python Vm.migrate_vm怎么用?Python Vm.migrate_vm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cfme.infrastructure.virtual_machines.Vm
的用法示例。
在下文中一共展示了Vm.migrate_vm方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_vm_migrate
# 需要导入模块: from cfme.infrastructure.virtual_machines import Vm [as 别名]
# 或者: from cfme.infrastructure.virtual_machines.Vm import migrate_vm [as 别名]
def test_vm_migrate(setup_provider, provider, request):
"""Tests migration of a vm
Metadata:
test_flag: migrate, provision
"""
vm = Vm("vmtest", provider)
vm.migrate_vm("[email protected]", "first", "last")
flash.assert_no_errors()
row_description = 'vmtest'
cells = {'Description': row_description}
row, __ = wait_for(requests.wait_for_request, [cells, True],
fail_func=requests.reload, num_sec=600, delay=20)
assert row.request_state.text == 'Migrated'
示例2: test_vm_migrate
# 需要导入模块: from cfme.infrastructure.virtual_machines import Vm [as 别名]
# 或者: from cfme.infrastructure.virtual_machines.Vm import migrate_vm [as 别名]
def test_vm_migrate(provider_init, provider_crud, provider_mgmt, request):
"""Tests migration of a vm
Metadata:
test_flag: migrate, provision
"""
vm = Vm("vmtest", provider_crud)
vm.migrate_vm("[email protected]", "first", "last", "host", "datstore")
flash.assert_no_errors()
row_description = 'VM Migrate'
cells = {'Request Type': row_description}
row, __ = wait_for(requests.wait_for_request, [cells],
fail_func=requests.reload, num_sec=600, delay=20)
assert row.last_message.text == 'Request complete'