本文整理汇总了Python中cloudmesh_client.cloud.iaas.CloudProvider.CloudProvider.start_vm方法的典型用法代码示例。如果您正苦于以下问题:Python CloudProvider.start_vm方法的具体用法?Python CloudProvider.start_vm怎么用?Python CloudProvider.start_vm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cloudmesh_client.cloud.iaas.CloudProvider.CloudProvider
的用法示例。
在下文中一共展示了CloudProvider.start_vm方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: start
# 需要导入模块: from cloudmesh_client.cloud.iaas.CloudProvider import CloudProvider [as 别名]
# 或者: from cloudmesh_client.cloud.iaas.CloudProvider.CloudProvider import start_vm [as 别名]
def start(cls, **kwargs):
arg = dotdict(kwargs)
cloud_provider = CloudProvider(arg.cloud).provider
for server in kwargs["servers"]:
cloud_provider.start_vm(server)
Console.ok("Machine {:} is being started on {:} Cloud..."
.format(server, cloud_provider.cloud))
示例2: start
# 需要导入模块: from cloudmesh_client.cloud.iaas.CloudProvider import CloudProvider [as 别名]
# 或者: from cloudmesh_client.cloud.iaas.CloudProvider.CloudProvider import start_vm [as 别名]
def start(cls, **kwargs):
cloud_provider = CloudProvider(kwargs["cloud"]).provider
for server in kwargs["servers"]:
cloud_provider.start_vm(server)
print("Machine {:} is being started on {:} Cloud...".format(server, cloud_provider.cloud))