本文整理汇总了Python中opennode.oms.endpoint.ssh.cmdline.VirtualConsoleArgumentParser.add_mutually_exclusive_group方法的典型用法代码示例。如果您正苦于以下问题:Python VirtualConsoleArgumentParser.add_mutually_exclusive_group方法的具体用法?Python VirtualConsoleArgumentParser.add_mutually_exclusive_group怎么用?Python VirtualConsoleArgumentParser.add_mutually_exclusive_group使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类opennode.oms.endpoint.ssh.cmdline.VirtualConsoleArgumentParser
的用法示例。
在下文中一共展示了VirtualConsoleArgumentParser.add_mutually_exclusive_group方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: arguments
# 需要导入模块: from opennode.oms.endpoint.ssh.cmdline import VirtualConsoleArgumentParser [as 别名]
# 或者: from opennode.oms.endpoint.ssh.cmdline.VirtualConsoleArgumentParser import add_mutually_exclusive_group [as 别名]
def arguments(self):
parser = VirtualConsoleArgumentParser()
parser.add_argument('path')
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument('-p', action='store_true', help="Show effective permissions for a given object")
group.add_argument('-r', action=MergeListAction,
help="Check if the user has some rights on a given object")
return parser
示例2: arguments
# 需要导入模块: from opennode.oms.endpoint.ssh.cmdline import VirtualConsoleArgumentParser [as 别名]
# 或者: from opennode.oms.endpoint.ssh.cmdline.VirtualConsoleArgumentParser import add_mutually_exclusive_group [as 别名]
def arguments(self):
parser = VirtualConsoleArgumentParser()
parser.add_argument('paths', nargs='+',
help='Prototype template to be used to find all similar ones')
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument('-i', action='store_true',
help='Set object to inherit permissions from its parent(s)',
default=False)
group.add_argument('-m', action='append',
help="add an Allow ace: {u:[user]:permspec|g:[group]:permspec}")
group.add_argument('-d', action='append',
help="add an Deny ace: {u:[user]:permspec|g:[group]:permspec}")
group.add_argument('-x', action='append',
help="remove an ace: {u:[user]:permspec|g:[group]:permspec}")
return parser