当前位置: 首页>>代码示例>>Python>>正文


Python Host.show方法代码示例

本文整理汇总了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
开发者ID:tylerbaker,项目名称:controller-openstack-cinder,代码行数:19,代码来源:vcenterdatacenter.py

示例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
开发者ID:uemurs,项目名称:controller-openstack-cinder,代码行数:21,代码来源:vcenter.py

示例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
开发者ID:Lujoel,项目名称:coprhd-controller,代码行数:23,代码来源:cluster.py

示例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
开发者ID:seagle0128,项目名称:coprhd-controller,代码行数:24,代码来源:tenant.py


注:本文中的host.Host.show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。