• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python utils.add_boolean_argument函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中neutronclient.common.utils.add_boolean_argument函数的典型用法代码示例。如果您正苦于以下问题:Python add_boolean_argument函数的具体用法?Python add_boolean_argument怎么用?Python add_boolean_argument使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了add_boolean_argument函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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.'))
开发者ID:openstack,项目名称:python-group-based-policy-client,代码行数:27,代码来源:servicechain.py


示例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").'))
开发者ID:ChameleonCloud,项目名称:python-neutronclient,代码行数:7,代码来源:l7rule.py


示例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)'))
开发者ID:Juniper,项目名称:python-neutronclient,代码行数:7,代码来源:address_scope.py


示例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)
开发者ID:sebrandon1,项目名称:python-neutronclient,代码行数:26,代码来源:router.py


示例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)
开发者ID:openstack,项目名称:python-neutronclient,代码行数:7,代码来源:loadbalancer.py


示例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."))
开发者ID:yizhongyin,项目名称:OpenstackLiberty,代码行数:8,代码来源:router.py


示例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)'))
开发者ID:ChameleonCloud,项目名称:python-neutronclient,代码行数:9,代码来源:firewall.py


示例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)
开发者ID:openstack,项目名称:python-neutronclient,代码行数:9,代码来源:member.py


示例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")'))
开发者ID:ChameleonCloud,项目名称:python-neutronclient,代码行数:9,代码来源:listener.py


示例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)."),
     )
开发者ID:openstack,项目名称:python-neutronclient,代码行数:11,代码来源:firewall.py


示例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)
开发者ID:ChameleonCloud,项目名称:python-neutronclient,代码行数:12,代码来源:firewallrule.py


示例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.'))
开发者ID:ChameleonCloud,项目名称:python-neutronclient,代码行数:12,代码来源:flavor.py


示例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.'))
开发者ID:ChameleonCloud,项目名称:python-neutronclient,代码行数:13,代码来源:speaker.py


示例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)
开发者ID:ChameleonCloud,项目名称:python-neutronclient,代码行数:13,代码来源:pool.py


示例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).'))
开发者ID:Juniper,项目名称:python-neutronclient,代码行数:13,代码来源:firewallpolicy.py


示例16: add_known_arguments

 def add_known_arguments(self, parser):
     parser.add_argument(
         '--description',
         help=_('Description for the flavor profile.'))
     parser.add_argument(
         '--driver',
         help=_('Python module path to driver.'))
     parser.add_argument(
         '--metainfo',
         help=_('Metainfo for the flavor profile.'))
     utils.add_boolean_argument(
         parser,
         '--enabled',
         default=argparse.SUPPRESS,
         help=_('Sets enabled flag.'))
开发者ID:nmagnezi,项目名称:python-neutronclient,代码行数:15,代码来源:flavor_profile.py


示例17: add_known_arguments

 def add_known_arguments(self, parser):
     parser.add_argument(
         '--admin-state-down',
         dest='admin_state', action='store_false',
         default=argparse.SUPPRESS,
         help=_('[DEPRECATED in Mitaka] Set admin state up to false.'))
     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',
         dest='admin_state',
         help=_('Update the administrative state of '
                'the member (True meaning "Up").'))
     # ToDo(reedip): After Mitaka, remove admin-state-down
     _add_common_args(parser)
开发者ID:ChameleonCloud,项目名称:python-neutronclient,代码行数:16,代码来源:member.py


示例18: 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.'))
开发者ID:Gvkrishna,项目名称:python-neutronclient,代码行数:18,代码来源:router.py


示例19: add_updatable_arguments

def add_updatable_arguments(parser):
    parser.add_argument(
        '--min-prefixlen', type=int,
        help=_('Subnetpool minimum prefix length.'))
    parser.add_argument(
        '--max-prefixlen', type=int,
        help=_('Subnetpool maximum prefix length.'))
    parser.add_argument(
        '--default-prefixlen', type=int,
        help=_('Subnetpool default prefix length.'))
    parser.add_argument(
        '--pool-prefix',
        action='append', dest='prefixes',
        help=_('Subnetpool prefixes (This option can be repeated).'))
    utils.add_boolean_argument(
        parser, '--is-default',
        help=_('Specify whether this should be the default subnetpool '
               '(True meaning default).'))
开发者ID:amotoki,项目名称:python-neutronclient,代码行数:18,代码来源:subnetpool.py


示例20: 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(
            '--shared',
            action='store_true',
            help=_('Set the network as shared.'),
            default=argparse.SUPPRESS)
        parser.add_argument(
            '--provider:network_type',
            metavar='<network_type>',
            help=_('The physical mechanism by which the virtual network'
                   ' is implemented.'))
        parser.add_argument(
            '--provider:physical_network',
            metavar='<physical_network_name>',
            help=_('Name of the physical network over which the virtual '
                   'network is implemented.'))
        parser.add_argument(
            '--provider:segmentation_id',
            metavar='<segmentation_id>',
            help=_('VLAN ID for VLAN networks or tunnel-id for GRE/VXLAN '
                   'networks.'))
        utils.add_boolean_argument(
            parser,
            '--vlan-transparent',
            default=argparse.SUPPRESS,
            help=_('Create a VLAN transparent network.'))
        parser.add_argument(
            'name', metavar='NAME',
            help=_('Name of the network to be created.'))
        parser.add_argument(
            '--description',
            help=_('Description of network.'))

        self.add_arguments_qos_policy(parser)
        availability_zone.add_az_hint_argument(parser, self.resource)
        dns.add_dns_argument_create(parser, self.resource, 'domain')
开发者ID:noironetworks,项目名称:python-neutronclient,代码行数:44,代码来源:network.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utils.dumps函数代码示例发布时间:2022-05-27
下一篇:
Python _i18n._函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap