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


Python CustomInfoAPI.remove_custom_info方法代码示例

本文整理汇总了Python中katello.client.api.custom_info.CustomInfoAPI.remove_custom_info方法的典型用法代码示例。如果您正苦于以下问题:Python CustomInfoAPI.remove_custom_info方法的具体用法?Python CustomInfoAPI.remove_custom_info怎么用?Python CustomInfoAPI.remove_custom_info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在katello.client.api.custom_info.CustomInfoAPI的用法示例。


在下文中一共展示了CustomInfoAPI.remove_custom_info方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: run

# 需要导入模块: from katello.client.api.custom_info import CustomInfoAPI [as 别名]
# 或者: from katello.client.api.custom_info.CustomInfoAPI import remove_custom_info [as 别名]
    def run(self):
        org_name = self.get_option('org')
        env_name = self.get_option('environment')
        dist_name = self.get_option('name')
        dist_uuid = self.get_option('uuid')
        keyname = self.get_option('keyname')

        distributor = get_distributor(org_name, dist_name, env_name, dist_uuid)

        custom_info_api = CustomInfoAPI()

        response = custom_info_api.remove_custom_info("distributor", distributor['id'], keyname)

        ident = dist_uuid if dist_uuid else dist_name

        if len(response) == 0:
            print _("Successfully removed Custom Information from Distributor [ %s ]") % ident
        else:
            print _("Could not remove Custom Information from Distributor [ %s ]") % ident
开发者ID:AsherBond,项目名称:katello,代码行数:21,代码来源:distributor_custom_info.py

示例2: run

# 需要导入模块: from katello.client.api.custom_info import CustomInfoAPI [as 别名]
# 或者: from katello.client.api.custom_info.CustomInfoAPI import remove_custom_info [as 别名]
    def run(self):
        org_name = self.get_option("org")
        env_name = self.get_option("environment")
        sys_name = self.get_option("name")
        sys_uuid = self.get_option("uuid")
        keyname = self.get_option("keyname")

        system = get_system(org_name, sys_name, env_name, sys_uuid)

        custom_info_api = CustomInfoAPI()

        response = custom_info_api.remove_custom_info("system", system["id"], keyname)

        ident = sys_uuid if sys_uuid else sys_name

        if response is not None:
            print _("Successfully removed Custom Information from System [ %s ]") % ident
        else:
            print _("Could not remove Custom Information from System [ %s ]") % ident
开发者ID:AsherBond,项目名称:katello,代码行数:21,代码来源:system_custom_info.py

示例3: run

# 需要导入模块: from katello.client.api.custom_info import CustomInfoAPI [as 别名]
# 或者: from katello.client.api.custom_info.CustomInfoAPI import remove_custom_info [as 别名]
    def run(self):
        org_name = self.get_option('org')
        env_name = self.get_option('environment')
        sys_name = self.get_option('name')
        sys_uuid = self.get_option('uuid')
        keyname = self.get_option('keyname')

        system = get_system(org_name, sys_name, env_name, sys_uuid)

        custom_info_api = CustomInfoAPI()

        response = custom_info_api.remove_custom_info("system", system['id'], keyname)

        ident = sys_uuid if sys_uuid else sys_name

        if len(response) == 0:
            print _("Successfully removed Custom Information from System [ %s ]") % ident
        else:
            print _("Could not remove Custom Information from System [ %s ]") % ident
开发者ID:lzap,项目名称:katello,代码行数:21,代码来源:system_custom_info.py


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