本文整理汇总了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
示例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
示例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