Python oslo_config.cfg 模块,SubCommandOpt() 实例源码

我们从Python开源项目中,提取了以下5个代码示例,用于说明如何使用oslo_config.cfg.SubCommandOpt()

项目:craton    作者:openstack    | 项目源码 | 文件源码
def main():
    command_opt = cfg.SubCommandOpt('command',
                                    title='Command',
                                    help=('Available commands'),
                                    handler=add_command_parsers)

    CONF.register_cli_opt(command_opt)
    CONF(project='craton-api')
    CONF.command.func()
项目:cyborg    作者:openstack    | 项目源码 | 文件源码
def main():
    command_opt = cfg.SubCommandOpt('command',
                                    title='Command',
                                    help=_('Available commands'),
                                    handler=add_command_parsers)

    CONF.register_cli_opt(command_opt)

    service.prepare_service(sys.argv)
    CONF.command.func()
项目:zun    作者:openstack    | 项目源码 | 文件源码
def main():
    command_opt = cfg.SubCommandOpt('command',
                                    title='Command',
                                    help='Available commands',
                                    handler=add_command_parsers)
    CONF.register_cli_opt(command_opt)

    CONF(project='zun')
    CONF.command.func()
项目:mixmatch    作者:openstack    | 项目源码 | 文件源码
def main():
    command = cfg.SubCommandOpt('command',
                                title='Command',
                                help='Mixmatch management commands.',
                                handler=register_parsers)
    CONF.register_cli_opt(command)
    config.load_from_file()

    CONF.command.func()
项目:mogan    作者:openstack    | 项目源码 | 文件源码
def main():
    command_opt = cfg.SubCommandOpt('command',
                                    title='Command',
                                    help=_('Available commands'),
                                    handler=add_command_parsers)

    CONF.register_cli_opt(command_opt)

    service.prepare_service(sys.argv)
    CONF.command.func()