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

Python legacy.modernize_quantum_config函数代码示例

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

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



在下文中一共展示了modernize_quantum_config函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, options=None, config_file=None):
        # If no options have been provided, create an empty dict
        if not options:
            options = {}

        msg = validate_pre_plugin_load()
        if msg:
            LOG.critical(msg)
            raise Exception(msg)

        # NOTE(jkoelker) Testing for the subclass with the __subclasshook__
        #                breaks tach monitoring. It has been removed
        #                intentionally to allow v2 plugins to be monitored
        #                for performance metrics.
        plugin_provider = cfg.CONF.core_plugin
        LOG.info(_("Loading core plugin: %s"), plugin_provider)
        self.plugin = self._get_plugin_instance('neutron.core_plugins',
                                                plugin_provider)
        legacy.modernize_quantum_config(cfg.CONF)

        msg = validate_post_plugin_load()
        if msg:
            LOG.critical(msg)
            raise Exception(msg)

        # core plugin as a part of plugin collection simplifies
        # checking extensions
        # TODO(enikanorov): make core plugin the same as
        # the rest of service plugins
        self.service_plugins = {constants.CORE: self.plugin}
        self._load_service_plugins()
开发者ID:VeenaSL,项目名称:sriov,代码行数:31,代码来源:manager.py


示例2: main

def main():
    eventlet.monkey_patch()
    cfg.CONF.register_opts(ip_lib.OPTS)
    cfg.CONF(project='neutron')
    logging_config.setup_logging(cfg.CONF)
    legacy.modernize_quantum_config(cfg.CONF)

    try:
        agent_config = create_agent_config_map(cfg.CONF)
    except ValueError as e:
        LOG.error(_('%s Agent terminated!'), e)
        sys.exit(1)

    is_xen_compute_host = 'rootwrap-xen-dom0' in agent_config['root_helper']
    if is_xen_compute_host:
        # Force ip_lib to always use the root helper to ensure that ip
        # commands target xen dom0 rather than domU.
        cfg.CONF.set_default('ip_lib_force_root', True)

    plugin = OVSNeutronAgent(**agent_config)

    # Start everything.
    LOG.info(_("Agent initialized successfully, now running... "))
    plugin.daemon_loop()
    sys.exit(0)
开发者ID:kobtea,项目名称:neutron,代码行数:25,代码来源:ovs_neutron_agent.py


示例3: parse

def parse(args):
    cfg.CONF(args=args, project='neutron',
             version='%%prog %s' % neutron_version.release_string())

    legacy.modernize_quantum_config(cfg.CONF)

    # Validate that the base_mac is of the correct format
    msg = attributes._validate_regex(cfg.CONF.base_mac,
                                     attributes.MAC_PATTERN)
    if msg:
        msg = _("Base MAC: %s") % msg
        raise Exception(msg)
开发者ID:CiscoSystems,项目名称:quantum,代码行数:12,代码来源:config.py


示例4: main

def main():
    config = alembic_config.Config(
        os.path.join(os.path.dirname(__file__), 'alembic.ini')
    )
    config.set_main_option('script_location',
                           'neutron.db.migration:alembic_migrations')
    # attach the Neutron conf to the Alembic conf
    config.neutron_config = CONF

    CONF()
    legacy.modernize_quantum_config(CONF)
    CONF.command.func(config, CONF.command.name)
开发者ID:CiscoSystems,项目名称:quantum,代码行数:12,代码来源:cli.py


示例5: main

def main():
    eventlet.monkey_patch()
    register_options()
    cfg.CONF(project='neutron')
    config.setup_logging(cfg.CONF)
    legacy.modernize_quantum_config(cfg.CONF)
    server = neutron_service.Service.create(
        binary='neutron-dhcp-agent',
        topic=topics.DHCP_AGENT,
        report_interval=cfg.CONF.AGENT.report_interval,
        manager='neutron.agent.dhcp_agent.DhcpAgentWithStateReport')
    service.launch(server).wait()
开发者ID:armando-migliaccio,项目名称:neutron,代码行数:12,代码来源:dhcp_agent.py


示例6: main

def main(manager="neutron.services.skycloud.portforward_agent.PortForwardAgent"):
    eventlet.monkey_patch()
    conf = cfg.CONF
    conf(project='neutron')
    config.setup_logging(conf)
    legacy.modernize_quantum_config(conf)
    server = neutron_service.Service.create(
        binary='neutron-portforward-agent',
        topic=skycloud_constants.PORT_FORWARD_AGENT_TOPIC,
        report_interval=60, host=conf.host,
        manager=manager)
    service.launch(server).wait()
开发者ID:swordboy,项目名称:neutron-portforward-service,代码行数:12,代码来源:portforward_agent.py


示例7: main

def main():
    config.init(sys.argv[1:])
    if not cfg.CONF.config_file:
        sys.exit(_("ERROR: Unable to find configuration file via the default"
                   " search paths (~/.neutron/, ~/, /etc/neutron/, /etc/) and"
                   " the '--config-file' option!"))

    config.setup_logging(cfg.CONF)
    legacy.modernize_quantum_config(cfg.CONF)
    utils.log_opt_values(LOG)

    neutron_api = Neutron(prog='neutron')
    neutron_api.run()
开发者ID:anilkumarkodi,项目名称:quark,代码行数:13,代码来源:gunicorn_server.py


示例8: create

    def create(cls, app_name='neutron'):

        # Setup logging early, supplying both the CLI options and the
        # configuration mapping from the config file
        # We only update the conf dict for the verbose and debug
        # flags. Everything else must be set up in the conf file...
        # Log the options used when starting if we're in debug mode...

        config.setup_logging(cfg.CONF)
        legacy.modernize_quantum_config(cfg.CONF)
        # Dump the initial option values
        cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
        service = cls(app_name)
        return service
开发者ID:CampHarmony,项目名称:neutron,代码行数:14,代码来源:service.py


示例9: initialize_app

 def initialize_app(self, argv):
     super(NeutronDebugShell, self).initialize_app(argv)
     if not self.options.config_file:
         raise exc.CommandError(
             _("You must provide a config file for bridge -"
               " either --config-file or env[NEUTRON_TEST_CONFIG_FILE]"))
     client = self.client_manager.neutron
     cfg.CONF.register_opts(interface.OPTS)
     cfg.CONF.register_opts(NeutronDebugAgent.OPTS)
     config.register_root_helper(cfg.CONF)
     cfg.CONF(['--config-file', self.options.config_file])
     config.setup_logging(cfg.CONF)
     legacy.modernize_quantum_config(cfg.CONF)
     driver = importutils.import_object(cfg.CONF.interface_driver, cfg.CONF)
     self.debug_agent = NeutronDebugAgent(cfg.CONF, client, driver)
开发者ID:ChengZuo,项目名称:neutron,代码行数:15,代码来源:shell.py


示例10: main

def main(manager='neutron.agent.l3_agent.L3NATAgentWithStateReport'):
    eventlet.monkey_patch()
    conf = cfg.CONF
    conf.register_opts(L3NATAgent.OPTS)
    config.register_agent_state_opts_helper(conf)
    config.register_root_helper(conf)
    conf.register_opts(interface.OPTS)
    conf.register_opts(external_process.OPTS)
    conf(project='neutron')
    config.setup_logging(conf)
    legacy.modernize_quantum_config(conf)
    server = neutron_service.Service.create(
        binary='neutron-l3-agent',
        topic=topics.L3_AGENT,
        report_interval=cfg.CONF.AGENT.report_interval,
        manager=manager)
    service.launch(server).wait()
开发者ID:674009287,项目名称:neutron,代码行数:17,代码来源:l3_agent.py


示例11: main

def main():
    eventlet.monkey_patch()
    cfg.CONF.register_opts(OPTS)
    cfg.CONF.register_opts(manager.OPTS)
    # import interface options just in case the driver uses namespaces
    cfg.CONF.register_opts(interface.OPTS)
    config.register_interface_driver_opts_helper(cfg.CONF)
    config.register_agent_state_opts_helper(cfg.CONF)
    config.register_root_helper(cfg.CONF)

    cfg.CONF(project="neutron")
    config.setup_logging(cfg.CONF)
    legacy.modernize_quantum_config(cfg.CONF)

    mgr = manager.LbaasAgentManager(cfg.CONF)
    svc = LbaasAgentService(host=cfg.CONF.host, topic=topics.LOADBALANCER_AGENT, manager=mgr)
    service.launch(svc).wait()
开发者ID:nabilmaad,项目名称:neutron,代码行数:17,代码来源:agent.py


示例12: main

def main():
    eventlet.monkey_patch()
    cfg.CONF.register_opts(ip_lib.OPTS)
    cfg.CONF(project='neutron')
    logging_config.setup_logging(cfg.CONF)
    legacy.modernize_quantum_config(cfg.CONF)

    try:
        agent_config = create_agent_config_map(cfg.CONF)
    except ValueError as e:
        LOG.exception(_("%s Agent terminated!"), e)
        raise SystemExit(1)

    plugin = SdnveNeutronAgent(**agent_config)

    # Start everything.
    LOG.info(_("Agent initialized successfully, now running... "))
    plugin.daemon_loop()
开发者ID:Doude,项目名称:neutron,代码行数:18,代码来源:sdnve_neutron_agent.py


示例13: main

def main():
    eventlet.monkey_patch()
    cfg.CONF.register_opts(OPTS)
    cfg.CONF.register_opts(manager.OPTS)
    config.register_agent_state_opts_helper(cfg.CONF)
    config.register_root_helper(cfg.CONF)

    cfg.CONF(project='neutron')
    config.setup_logging(cfg.CONF)
    legacy.modernize_quantum_config(cfg.CONF)

    mgr = manager.LbaasAgentManager(cfg.CONF)
    svc = LbaasAgentService(
        host=mgr.agent_host,
        topic=plugin_driver.TOPIC_LOADBALANCER_AGENT,
        manager=mgr
    )
    service.launch(svc).wait()
开发者ID:vijayendrabvs,项目名称:ssl-f5-neutron-lbaas,代码行数:18,代码来源:agent.py


示例14: main

def main():
    eventlet.monkey_patch()
    conf = cfg.CONF
    conf.register_opts(firewall_netconf_agent.OPTS)
    config.register_interface_driver_opts_helper(conf)
    config.register_use_namespaces_opts_helper(conf)
    config.register_agent_state_opts_helper(conf)
    config.register_root_helper(conf)
    conf.register_opts(interface.OPTS)
    conf.register_opts(external_process.OPTS)
    conf(project='neutron')
    config.setup_logging(conf)
    legacy.modernize_quantum_config(conf)
    server = neutron_service.Service.create(
        binary='neutron-FW-appliance-aS',
        topic=topics.L3_AGENT,
        report_interval=cfg.CONF.AGENT.report_interval,
        manager='neutron.services.firewall.agents.fw_netconf.fw_agent_bkp.'
                'NetconfFirewallAgentWithStateReport')
    service.launch(server).wait()
开发者ID:TCS-TelcoCloud,项目名称:FWaaS_plugin,代码行数:20,代码来源:netconf_fw_agent.py


示例15: __init__

    def __init__(self, options=None, config_file=None):
        # If no options have been provided, create an empty dict
        if not options:
            options = {}

        msg = validate_pre_plugin_load()
        if msg:
            LOG.critical(msg)
            raise Exception(msg)

        # NOTE(jkoelker) Testing for the subclass with the __subclasshook__
        #                breaks tach monitoring. It has been removed
        #                intentianally to allow v2 plugins to be monitored
        #                for performance metrics.
        plugin_provider = cfg.CONF.core_plugin
        LOG.debug(_("Plugin location: %s"), plugin_provider)
        # If the plugin can't be found let them know gracefully
        try:
            LOG.info(_("Loading Plugin: %s"), plugin_provider)
            plugin_klass = importutils.import_class(plugin_provider)
        except ImportError:
            LOG.exception(_("Error loading plugin"))
            raise Exception(_("Plugin not found. "))
        legacy.modernize_quantum_config(cfg.CONF)
        self.plugin = plugin_klass()

        msg = validate_post_plugin_load()
        if msg:
            LOG.critical(msg)
            raise Exception(msg)

        # core plugin as a part of plugin collection simplifies
        # checking extensions
        # TODO(enikanorov): make core plugin the same as
        # the rest of service plugins
        self.service_plugins = {constants.CORE: self.plugin}
        self._load_service_plugins()
开发者ID:CampHarmony,项目名称:neutron,代码行数:37,代码来源:manager.py


示例16: main

def main():
    cfg.CONF.register_opts(OPTS)
    cfg.CONF.register_opts(manager.OPTS)
    config.register_agent_state_opts_helper(cfg.CONF)
    config.register_root_helper(cfg.CONF)

    if preJuno:
        cfg.CONF(project='neutron')
        config.setup_logging(cfg.CONF)
        legacy.modernize_quantum_config(cfg.CONF)
    else:
        common_config.init(sys.argv[1:])
        config.setup_logging()

    mgr = manager.LbaasAgentManager(cfg.CONF)
    svc = LbaasAgentService(
        host=mgr.agent_host,
        topic=lbaasconstants.TOPIC_LOADBALANCER_AGENT,
        manager=mgr
    )
    if preLiberty:
        service.launch(svc).wait()
    else:
        service.launch(cfg.CONF, svc).wait()
开发者ID:F5Networks,项目名称:f5-openstack-lbaasv1,代码行数:24,代码来源:agent.py


示例17: print

        if need_target:
            print('Did not find another agent in env %s group %s'
                  % (env_prefix, env_group))
    else:
        print('No agent with id %s found.' % agent_id)


if __name__ == "__main__":

    OPTS = [
        cfg.StrOpt(
            'agent_id',
            default=None
        )
    ]

    cfg.CONF.register_cli_opts(opts=OPTS)

    if preJuno:
        config.setup_logging(cfg.CONF)
        legacy.modernize_quantum_config(cfg.CONF)
    else:
        common_config.init(sys.argv[1:])
        config.setup_logging()

    if cfg.CONF.agent_id is None:
        print_usage()
        sys.exit(1)

    rebind_pools(cfg.CONF.agent_id)
开发者ID:swormke,项目名称:f5-openstack-lbaasv1,代码行数:30,代码来源:rebind_pools.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python rpc.create_connection函数代码示例发布时间:2022-05-27
下一篇:
Python ipv6_utils.is_ipv6_pd_enabled函数代码示例发布时间: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