本文整理汇总了Python中subscription_manager.repolib.RepoActionInvoker.is_managed方法的典型用法代码示例。如果您正苦于以下问题:Python RepoActionInvoker.is_managed方法的具体用法?Python RepoActionInvoker.is_managed怎么用?Python RepoActionInvoker.is_managed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类subscription_manager.repolib.RepoActionInvoker
的用法示例。
在下文中一共展示了RepoActionInvoker.is_managed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_is_managed
# 需要导入模块: from subscription_manager.repolib import RepoActionInvoker [as 别名]
# 或者: from subscription_manager.repolib.RepoActionInvoker import is_managed [as 别名]
def test_is_managed(self):
self._stub_content()
repo_action_invoker = RepoActionInvoker()
repo_label = 'a_test_repo'
im_result = repo_action_invoker.is_managed(repo_label)
self.assertTrue(im_result)
示例2: str
# 需要导入模块: from subscription_manager.repolib import RepoActionInvoker [as 别名]
# 或者: from subscription_manager.repolib.RepoActionInvoker import is_managed [as 别名]
#!/usr/bin/python
#
# This script was downloaded from https://bugzilla.redhat.com/attachment.cgi?id=1027300 and slightly modified
# This purpose of this script is to verify bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1223038
# Bug 1223038 - RepoActionInvoker.is_managed() broken in subscription-manager-1.14.5-1.el6.x86_64 /usr/share/rhsm/subscription_manager/repolib.py
#
import sys
import logging
LOG_FILENAME = 'ismanagedtest.log'
logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG)
# read argument to this script
some_repo = str(sys.argv[1])
_LIBPATH = "/usr/share/rhsm"
# add to the path if need be
if _LIBPATH not in sys.path:
sys.path.append(_LIBPATH)
from subscription_manager.injectioninit import init_dep_injection
init_dep_injection()
from subscription_manager.repolib import RepoActionInvoker
rai = RepoActionInvoker()
# Should print "False" if is_managed is working
print rai.is_managed(some_repo)