mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Add helper method to migrate router vms
This commit is contained in:
parent
88774a93e8
commit
3dba689f31
@ -56,7 +56,8 @@ from marvin.cloudstackAPI import (listConfigurations,
|
|||||||
listVirtualRouterElements,
|
listVirtualRouterElements,
|
||||||
listNetworkOfferings,
|
listNetworkOfferings,
|
||||||
listResourceLimits,
|
listResourceLimits,
|
||||||
listVPCOfferings)
|
listVPCOfferings,
|
||||||
|
migrateSystemVm)
|
||||||
from marvin.sshClient import SshClient
|
from marvin.sshClient import SshClient
|
||||||
from marvin.codes import (PASS, FAILED, ISOLATED_NETWORK, VPC_NETWORK,
|
from marvin.codes import (PASS, FAILED, ISOLATED_NETWORK, VPC_NETWORK,
|
||||||
BASIC_ZONE, FAIL, NAT_RULE, STATIC_NAT_RULE,
|
BASIC_ZONE, FAIL, NAT_RULE, STATIC_NAT_RULE,
|
||||||
@ -1898,3 +1899,10 @@ def verifyVCenterPortGroups(
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
return [FAIL, e]
|
return [FAIL, e]
|
||||||
return [PASS, None]
|
return [PASS, None]
|
||||||
|
|
||||||
|
def migrate_router(apiclient, router_id, host_id):
|
||||||
|
cmd = migrateSystemVm.migrateSystemVmCmd()
|
||||||
|
cmd.hostid = host_id
|
||||||
|
cmd.virtualmachineid = router_id
|
||||||
|
|
||||||
|
apiclient.migrateSystemVm(cmd)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user