本文整理汇总了Python中host.Host.show方法的典型用法代码示例。如果您正苦于以下问题:Python Host.show方法的具体用法?Python Host.show怎么用?Python Host.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类host.Host
的用法示例。
在下文中一共展示了Host.show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: vcenterdatacenter_get_hosts
# 需要导入模块: from host import Host [as 别名]
# 或者: from host.Host import show [as 别名]
def vcenterdatacenter_get_hosts(self, label, vcenter, tenantname, xml=False):
'''
Makes a REST API call to retrieve details of a vcenterdatacenter based on its UUID
'''
uri = self.vcenterdatacenter_query(label, vcenter, tenantname)
(s, h) = common.service_json_request(self.__ipAddr, self.__port, "GET",
VcenterDatacenter.URI_DATACENTER_HOSTS.format(uri),
None, None, xml)
from host import Host
obj = Host(self.__ipAddr, self.__port)
o = common.json_decode(s)
hostsdtls = obj.show(o['host'])
return hostsdtls
示例2: vcenter_get_hosts
# 需要导入模块: from host import Host [as 别名]
# 或者: from host.Host import show [as 别名]
def vcenter_get_hosts(self, label, tenantname):
"""
Makes a REST API call to retrieve details of a vcenter based on its UUID
"""
uri = self.vcenter_query(label, tenantname)
(s, h) = common.service_json_request(
self.__ipAddr, self.__port, "GET", VCenter.URI_VCENTER_HOSTS.format(uri), None, None, False
)
from host import Host
obj = Host(self.__ipAddr, self.__port)
o = common.json_decode(s)
hostsdtls = obj.show(o["host"])
return hostsdtls
示例3: cluster_get_hosts
# 需要导入模块: from host import Host [as 别名]
# 或者: from host.Host import show [as 别名]
def cluster_get_hosts(self, label, tenantname):
'''
Makes a REST API call to retrieve details of a hosts
associated with cluster
'''
uri = self.cluster_query(label, tenantname)
(s, h) = common.service_json_request(
self.__ipAddr, self.__port, "GET",
Cluster.URI_CLUSTER_HOSTS.format(uri),
None, None, False)
from host import Host
obj = Host(self.__ipAddr, self.__port)
o = common.json_decode(s)
hostsdtls = obj.show(o['host'])
return hostsdtls
示例4: tenant_get_hosts
# 需要导入模块: from host import Host [as 别名]
# 或者: from host.Host import show [as 别名]
def tenant_get_hosts(self, label, xml=False):
"""
Makes a REST API call to retrieve details of a tenant based on its UUID
"""
if label:
id = self.tenant_query(label)
else:
id = self.tenant_getid()
(s, h) = common.service_json_request(
self.__ipAddr, self.__port, "GET", Tenant.URI_TENANT_HOSTS.format(id), None, None, xml
)
o = common.json_decode(s)
from host import Host
obj = Host(self.__ipAddr, self.__port)
hostsdtls = obj.show(o["host"])
return hostsdtls