本文整理汇总了Python中cluster.Cluster.cluster_get_details_list方法的典型用法代码示例。如果您正苦于以下问题:Python Cluster.cluster_get_details_list方法的具体用法?Python Cluster.cluster_get_details_list怎么用?Python Cluster.cluster_get_details_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cluster.Cluster
的用法示例。
在下文中一共展示了Cluster.cluster_get_details_list方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: vcenterdatacenter_get_clusters
# 需要导入模块: from cluster import Cluster [as 别名]
# 或者: from cluster.Cluster import cluster_get_details_list [as 别名]
def vcenterdatacenter_get_clusters(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_CLUSTERS.format(uri),
None, None, xml)
o = common.json_decode(s)
from cluster import Cluster
obj = Cluster(self.__ipAddr, self.__port)
dtlslst = obj.cluster_get_details_list(o['cluster'])
return dtlslst
示例2: vcenter_get_clusters
# 需要导入模块: from cluster import Cluster [as 别名]
# 或者: from cluster.Cluster import cluster_get_details_list [as 别名]
def vcenter_get_clusters(self, label, tenantname, xml=False):
"""
Makes a REST API call to retrieve details of all clusters associated with a vcenter
"""
uri = self.vcenter_query(label, tenantname)
(s, h) = common.service_json_request(
self.__ipAddr, self.__port, "GET", VCenter.URI_VCENTER_CLUSTERS.format(uri), None, None, xml
)
o = common.json_decode(s)
from cluster import Cluster
obj = Cluster(self.__ipAddr, self.__port)
dtlslst = obj.cluster_get_details_list(o["cluster"])
return dtlslst
示例3: tenant_get_clusters
# 需要导入模块: from cluster import Cluster [as 别名]
# 或者: from cluster.Cluster import cluster_get_details_list [as 别名]
def tenant_get_clusters(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_CLUSTERS.format(id), None, None, xml
)
o = common.json_decode(s)
from cluster import Cluster
obj = Cluster(self.__ipAddr, self.__port)
dtlslst = obj.cluster_get_details_list(o["cluster"])
return dtlslst