本文整理汇总了Python中neutronclient.common.utils.add_boolean_argument函数的典型用法代码示例。如果您正苦于以下问题:Python add_boolean_argument函数的具体用法?Python add_boolean_argument怎么用?Python add_boolean_argument使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了add_boolean_argument函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_known_arguments
def add_known_arguments(self, parser):
parser.add_argument(
'name',
help=_('Name for the Service Chain Node.'))
parser.add_argument(
'--description',
help=_('Description of the Service Chain Node.'))
parser.add_argument(
'--servicetype', dest='service_type',
help=_('Service type ID or the Service Type name'))
parser.add_argument(
'--service-profile',
help=_('Service Profile name or UUID'))
parser.add_argument(
'--config',
help=_('Service Configuration for the Service Chain Node.'))
n_utils.add_boolean_argument(
parser, '--shared', dest='shared',
help=_('Shared flag'))
parser.add_argument(
'--template-file',
help=_('Service Configuration Template for the Service Chain '
'Node.'))
parser.add_argument(
'--param-names', dest='param_names',
help=_('List of Configuration Parameter Names for Service '
'Chain Node.'))
示例2: add_known_arguments
def add_known_arguments(self, parser):
super(UpdateL7Rule, self).add_known_arguments(parser)
_add_common_args(parser, False)
utils.add_boolean_argument(
parser, '--admin-state-up',
help=_('Specify the administrative state of the rule'
' (True meaning "Up").'))
示例3: add_known_arguments
def add_known_arguments(self, parser):
parser.add_argument('--name',
help=_('Updated name of the address scope.'))
utils.add_boolean_argument(
parser, '--shared',
help=_('Set sharing of address scope. '
'(True means shared)'))
示例4: add_known_arguments
def add_known_arguments(self, parser):
parser.add_argument(
'--admin-state-down',
dest='admin_state', action='store_false',
help=_('Set admin state up to false.'))
parser.add_argument(
'--admin_state_down',
dest='admin_state', action='store_false',
help=argparse.SUPPRESS)
parser.add_argument(
'name', metavar='NAME',
help=_('Name of the router to be created.'))
parser.add_argument(
'--description',
help=_('Description of router.'))
parser.add_argument(
'--flavor',
help=_('ID or name of flavor.'))
utils.add_boolean_argument(
parser, '--distributed', dest='distributed',
help=_('Create a distributed router.'))
utils.add_boolean_argument(
parser, '--ha', dest='ha',
help=_('Create a highly available router.'))
availability_zone.add_az_hint_argument(parser, self.resource)
示例5: add_known_arguments
def add_known_arguments(self, parser):
utils.add_boolean_argument(
parser,
"--admin-state-up",
help=_("Update the administrative state of " 'the load balancer (True meaning "Up").'),
)
_add_common_args(parser)
示例6: add_known_arguments
def add_known_arguments(self, parser):
parser.add_argument(
"--admin-state-down", dest="admin_state", action="store_false", help=_("Set admin state up to false.")
)
parser.add_argument("--admin_state_down", dest="admin_state", action="store_false", help=argparse.SUPPRESS)
parser.add_argument("name", metavar="NAME", help=_("Name of router to create."))
utils.add_boolean_argument(parser, "--distributed", dest="distributed", help=_("Create a distributed router."))
utils.add_boolean_argument(parser, "--ha", dest="ha", help=_("Create a highly available router."))
示例7: add_known_arguments
def add_known_arguments(self, parser):
add_common_args(parser)
parser.add_argument(
'--policy', metavar='POLICY',
help=_('Firewall policy name or ID.'))
utils.add_boolean_argument(
parser, '--admin-state-up', dest='admin_state_up',
help=_('Update the admin state for the firewall'
'(True means UP)'))
示例8: add_known_arguments
def add_known_arguments(self, parser):
parser.add_argument(
'pool', metavar='POOL',
help=_('ID or name of the pool that this member belongs to.'))
utils.add_boolean_argument(
parser, '--admin-state-up',
help=_('Update the administrative state of '
'the member (True meaning "Up").'))
_add_common_args(parser)
示例9: add_known_arguments
def add_known_arguments(self, parser):
_add_common_args(parser)
parser.add_argument(
'--name',
help=_('Name of the listener.'))
utils.add_boolean_argument(
parser, '--admin-state-up', dest='admin_state_up',
help=_('Specify the administrative state of the listener. '
'(True meaning "Up")'))
示例10: add_known_arguments
def add_known_arguments(self, parser):
add_common_args(parser)
parser.add_argument(
"--policy", metavar="POLICY", help=_("ID or name of the firewall policy " "associated to this firewall.")
)
utils.add_boolean_argument(
parser,
"--admin-state-up",
dest="admin_state_up",
help=_("Update the admin state for the firewall " "(True means UP)."),
)
示例11: add_known_arguments
def add_known_arguments(self, parser):
utils.add_boolean_argument(
parser,
'--shared',
dest='shared',
help=_('Update the shared flag for the firewall rule.'),
default=argparse.SUPPRESS)
parser.add_argument(
'--ip-version',
type=int, choices=[4, 6],
help=_('Update IP version for the firewall rule.'))
_add_common_args(parser, is_create=False)
示例12: add_known_arguments
def add_known_arguments(self, parser):
parser.add_argument(
'--name',
help=_('Name for the flavor.'))
parser.add_argument(
'--description',
help=_('Description for the flavor.'))
utils.add_boolean_argument(
parser,
'--enabled',
default=argparse.SUPPRESS,
help=_('Sets enabled flag.'))
示例13: add_common_arguments
def add_common_arguments(parser):
utils.add_boolean_argument(
parser, '--advertise-floating-ip-host-routes',
help=_('Whether to enable or disable the advertisement '
'of floating-ip host routes by the BGP speaker. '
'By default floating ip host routes will be '
'advertised by the BGP speaker.'))
utils.add_boolean_argument(
parser, '--advertise-tenant-networks',
help=_('Whether to enable or disable the advertisement '
'of tenant network routes by the BGP speaker. '
'By default tenant network routes will be '
'advertised by the BGP speaker.'))
示例14: add_known_arguments
def add_known_arguments(self, parser):
utils.add_boolean_argument(
parser, '--admin-state-up',
help=_('Update the administrative state of '
'the pool (True meaning "Up").'))
parser.add_argument(
'--session-persistence',
metavar='type=TYPE[,cookie_name=COOKIE_NAME]',
type=utils.str2dict_type(required_keys=['type'],
optional_keys=['cookie_name']),
help=_('The type of session persistence to use and associated '
'cookie name.'))
_add_common_args(parser)
示例15: add_known_arguments
def add_known_arguments(self, parser):
add_common_args(parser)
parser.add_argument(
'--name',
help=_('Name for the firewall policy.'))
utils.add_boolean_argument(
parser, '--shared',
help=_('Update the sharing status of the policy. '
'(True means shared).'))
utils.add_boolean_argument(
parser, '--audited',
help=_('Update the audit status of the policy. '
'(True means auditing is enabled).'))