MCPcopy Create free account
hub / github.com/apache/cloudstack / importUnmanagedInstance

Method importUnmanagedInstance

tools/marvin/marvin/lib/base.py:1101–1141  ·  view source on GitHub ↗

Import an unmanaged VM (currently VMware only)

(cls, apiclient, clusterid, name, serviceofferingid, services, templateid=None,
                                account=None, domainid=None, projectid=None, migrateallowed=None, forced=None)

Source from the content-addressed store, hash-verified

1099
1100 @classmethod
1101 def importUnmanagedInstance(cls, apiclient, clusterid, name, serviceofferingid, services, templateid=None,
1102 account=None, domainid=None, projectid=None, migrateallowed=None, forced=None):
1103 """Import an unmanaged VM (currently VMware only)"""
1104 cmd = importUnmanagedInstance.importUnmanagedInstanceCmd()
1105 cmd.clusterid = clusterid
1106 cmd.name = name
1107 cmd.serviceofferingid = serviceofferingid
1108 if templateid:
1109 cmd.templateid = templateid
1110 elif "templateid" in services:
1111 cmd.templateid = services["templateid"]
1112 if account:
1113 cmd.account = account
1114 elif "account" in services:
1115 cmd.account = services["account"]
1116 if domainid:
1117 cmd.domainid = domainid
1118 elif "domainid" in services:
1119 cmd.domainid = services["domainid"]
1120 if projectid:
1121 cmd.projectid = projectid
1122 elif "projectid" in services:
1123 cmd.projectid = services["projectid"]
1124 if migrateallowed:
1125 cmd.migrateallowed = migrateallowed
1126 elif "migrateallowed" in services:
1127 cmd.migrateallowed = services["migrateallowed"]
1128 if forced:
1129 cmd.forced = forced
1130 elif "forced" in services:
1131 cmd.forced = services["forced"]
1132 if "details" in services:
1133 cmd.details = services["details"]
1134 if "datadiskofferinglist" in services:
1135 cmd.datadiskofferinglist = services["datadiskofferinglist"]
1136 if "nicnetworklist" in services:
1137 cmd.nicnetworklist = services["nicnetworklist"]
1138 if "nicipaddresslist" in services:
1139 cmd.nicipaddresslist = services["nicipaddresslist"]
1140 virtual_machine = apiclient.importUnmanagedInstance(cmd)
1141 return VirtualMachine(virtual_machine.__dict__, services)
1142
1143
1144class Volume:

Callers

nothing calls this directly

Implementers 2

VMEntityVOengine/schema/src/main/java/org/apache
VMInstanceVOengine/schema/src/main/java/com/cloud/

Calls 2

VirtualMachineClass · 0.70

Tested by

no test coverage detected