当前位置: 首页>>代码示例>>Python>>正文


Python config.register_use_namespaces_opts_helper函数代码示例

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


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

示例1: _register_opts

def _register_opts(conf):
    conf.register_opts(L3DataEngine.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)
开发者ID:HybridCloud-dew,项目名称:hws,代码行数:8,代码来源:l3_data_engine.py

示例2: register_options

def register_options():
    cfg.CONF.register_opts(DhcpAgent.OPTS)
    config.register_interface_driver_opts_helper(cfg.CONF)
    config.register_use_namespaces_opts_helper(cfg.CONF)
    config.register_agent_state_opts_helper(cfg.CONF)
    config.register_root_helper(cfg.CONF)
    cfg.CONF.register_opts(dhcp.OPTS)
    cfg.CONF.register_opts(interface.OPTS)
开发者ID:CingHu,项目名称:neutron-ustack,代码行数:8,代码来源:dhcp_agent.py

示例3: register_options

def register_options():
    config.register_interface_driver_opts_helper(cfg.CONF)
    config.register_use_namespaces_opts_helper(cfg.CONF)
    config.register_agent_state_opts_helper(cfg.CONF)
    config.register_root_helper(cfg.CONF)
    cfg.CONF.register_opts(dhcp_config.DHCP_AGENT_OPTS)
    cfg.CONF.register_opts(dhcp_config.DHCP_OPTS)
    cfg.CONF.register_opts(dhcp_config.DNSMASQ_OPTS)
    cfg.CONF.register_opts(interface.OPTS)
开发者ID:afori,项目名称:neutron,代码行数:9,代码来源:dhcp_agent.py

示例4: register_opts

def register_opts(conf):
    conf.register_opts(l3_config.OPTS)
    conf.register_opts(metadata_driver.MetadataDriver.OPTS)
    conf.register_opts(ha.OPTS)
    config.register_interface_driver_opts_helper(conf)
    config.register_use_namespaces_opts_helper(conf)
    config.register_agent_state_opts_helper(conf)
    conf.register_opts(interface.OPTS)
    conf.register_opts(external_process.OPTS)
开发者ID:waltBB,项目名称:neutron_read,代码行数:9,代码来源:l3_agent.py

示例5: register_options

def register_options(conf):
    config.register_interface_driver_opts_helper(conf)
    config.register_use_namespaces_opts_helper(conf)
    config.register_agent_state_opts_helper(conf)
    conf.register_opts(dhcp_config.DHCP_AGENT_OPTS)
    conf.register_opts(dhcp_config.DHCP_OPTS)
    conf.register_opts(dhcp_config.DNSMASQ_OPTS)
    conf.register_opts(metadata_config.DRIVER_OPTS)
    conf.register_opts(metadata_config.SHARED_OPTS)
    conf.register_opts(interface.OPTS)
开发者ID:dhanunjaya,项目名称:neutron,代码行数:10,代码来源:dhcp_agent.py

示例6: register_opts

def register_opts(conf):
    conf.register_opts(l3_config.OPTS)
    conf.register_opts(metadata_config.DRIVER_OPTS)
    conf.register_opts(metadata_config.SHARED_OPTS)
    conf.register_opts(ha.OPTS)
    config.register_interface_driver_opts_helper(conf)
    config.register_use_namespaces_opts_helper(conf)
    config.register_agent_state_opts_helper(conf)
    conf.register_opts(interface.OPTS)
    conf.register_opts(external_process.OPTS)
    config.register_availability_zone_opts_helper(conf)
开发者ID:asgard-lab,项目名称:neutron,代码行数:11,代码来源:l3_agent.py

示例7: setUp

    def setUp(self):
        super(TestBasicRouterOperations, self).setUp()
        self.conf = cfg.ConfigOpts()
        self.conf.register_opts(base_config.core_opts)
        self.conf.register_opts(l3_agent.L3NATAgent.OPTS)
        agent_config.register_interface_driver_opts_helper(self.conf)
        agent_config.register_use_namespaces_opts_helper(self.conf)
        agent_config.register_root_helper(self.conf)
        self.conf.register_opts(interface.OPTS)
        self.conf.set_override('router_id', 'fake_id')
        self.conf.set_override('interface_driver',
                               'neutron.agent.linux.interface.NullDriver')
        self.conf.set_override('send_arp_for_ha', 1)
        self.conf.root_helper = 'sudo'

        self.device_exists_p = mock.patch(
            'neutron.agent.linux.ip_lib.device_exists')
        self.device_exists = self.device_exists_p.start()

        self.utils_exec_p = mock.patch(
            'neutron.agent.linux.utils.execute')
        self.utils_exec = self.utils_exec_p.start()

        self.external_process_p = mock.patch(
            'neutron.agent.linux.external_process.ProcessManager')
        self.external_process = self.external_process_p.start()

        self.send_arp_p = mock.patch(
            'neutron.agent.l3_agent.L3NATAgent._send_gratuitous_arp_packet')
        self.send_arp = self.send_arp_p.start()

        self.dvr_cls_p = mock.patch('neutron.agent.linux.interface.NullDriver')
        driver_cls = self.dvr_cls_p.start()
        self.mock_driver = mock.MagicMock()
        self.mock_driver.DEV_NAME_LEN = (
            interface.LinuxInterfaceDriver.DEV_NAME_LEN)
        driver_cls.return_value = self.mock_driver

        self.ip_cls_p = mock.patch('neutron.agent.linux.ip_lib.IPWrapper')
        ip_cls = self.ip_cls_p.start()
        self.mock_ip = mock.MagicMock()
        ip_cls.return_value = self.mock_ip

        self.l3pluginApi_cls_p = mock.patch(
            'neutron.agent.l3_agent.L3PluginApi')
        l3pluginApi_cls = self.l3pluginApi_cls_p.start()
        self.plugin_api = mock.Mock()
        l3pluginApi_cls.return_value = self.plugin_api

        self.looping_call_p = mock.patch(
            'neutron.openstack.common.loopingcall.FixedIntervalLoopingCall')
        self.looping_call_p.start()

        self.addCleanup(mock.patch.stopall)
开发者ID:yuhui7red,项目名称:neutron,代码行数:54,代码来源:test_l3_agent.py

示例8: setUp

    def setUp(self):
        super(TestMetadataDriverProcess, self).setUp()
        mock.patch("eventlet.spawn").start()
        agent_config.register_interface_driver_opts_helper(cfg.CONF)
        cfg.CONF.set_override("interface_driver", "neutron.agent.linux.interface.NullDriver")
        agent_config.register_use_namespaces_opts_helper(cfg.CONF)

        mock.patch("neutron.agent.l3.agent.L3PluginApi").start()
        mock.patch("neutron.agent.l3.ha.AgentMixin" "._init_ha_conf_path").start()

        cfg.CONF.register_opts(l3_config.OPTS)
        cfg.CONF.register_opts(l3_ha_agent.OPTS)
        cfg.CONF.register_opts(metadata_driver.MetadataDriver.OPTS)
开发者ID:waltBB,项目名称:neutron_read,代码行数:13,代码来源:test_driver.py

示例9: setUp

    def setUp(self):
        super(TestMetadataDriverProcess, self).setUp()
        agent_config.register_interface_driver_opts_helper(cfg.CONF)
        cfg.CONF.set_override('interface_driver',
                              'neutron.agent.linux.interface.NullDriver')
        agent_config.register_use_namespaces_opts_helper(cfg.CONF)

        mock.patch('neutron.agent.l3.agent.L3PluginApi').start()
        mock.patch('neutron.agent.l3.ha.AgentMixin'
                   '._init_ha_conf_path').start()

        cfg.CONF.register_opts(l3_config.OPTS)
        cfg.CONF.register_opts(metadata_driver.MetadataDriver.OPTS)
开发者ID:insequent,项目名称:neutron,代码行数:13,代码来源:test_driver.py

示例10: setUp

    def setUp(self):
        super(TestBasicRouterOperations, self).setUp()
        self.conf = agent_config.setup_conf()
        self.conf.register_opts(base_config.core_opts)
        self.conf.register_opts(l3_config.OPTS)
        self.conf.register_opts(ha.OPTS)
        agent_config.register_process_monitor_opts(self.conf)
        agent_config.register_interface_driver_opts_helper(self.conf)
        agent_config.register_use_namespaces_opts_helper(self.conf)
        self.conf.register_opts(interface.OPTS)
        self.conf.set_override('interface_driver',
                               'neutron.agent.linux.interface.NullDriver')
        self.conf.state_path = ''

        self.device_exists_p = mock.patch(
            'neutron.agent.linux.ip_lib.device_exists')
        self.device_exists = self.device_exists_p.start()

        self.utils_exec_p = mock.patch(
            'neutron.agent.linux.utils.execute')
        self.utils_exec = self.utils_exec_p.start()

        self.external_process_p = mock.patch(
            'neutron.agent.linux.external_process.ProcessManager')
        self.external_process = self.external_process_p.start()

        self.makedirs_p = mock.patch('os.makedirs')
        self.makedirs = self.makedirs_p.start()

        self.dvr_cls_p = mock.patch('neutron.agent.linux.interface.NullDriver')
        driver_cls = self.dvr_cls_p.start()
        self.mock_driver = mock.MagicMock()
        self.mock_driver.DEV_NAME_LEN = (
            interface.LinuxInterfaceDriver.DEV_NAME_LEN)
        driver_cls.return_value = self.mock_driver

        self.ip_cls_p = mock.patch('neutron.agent.linux.ip_lib.IPWrapper')
        ip_cls = self.ip_cls_p.start()
        self.mock_ip = mock.MagicMock()
        ip_cls.return_value = self.mock_ip

        mock.patch('neutron.agent.l3.agent.L3PluginApi').start()

        self.looping_call_p = mock.patch(
            'oslo_service.loopingcall.FixedIntervalLoopingCall')
        self.looping_call_p.start()

        self.fake_agent_mode = None
        self.ri_kwargs = {'agent_conf': self.conf,
                          'interface_driver': self.mock_driver}
开发者ID:carlosv5,项目名称:OaaS-network,代码行数:50,代码来源:test_varmour_oaas.py

示例11: 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_interface_driver_opts_helper(cfg.CONF)
     config.register_use_namespaces_opts_helper(cfg.CONF)
     config.register_root_helper(cfg.CONF)
     cfg.CONF(['--config-file', self.options.config_file])
     config.setup_logging(cfg.CONF)
     driver = importutils.import_object(cfg.CONF.interface_driver, cfg.CONF)
     self.debug_agent = NeutronDebugAgent(cfg.CONF, client, driver)
开发者ID:aaronknister,项目名称:neutron,代码行数:16,代码来源:shell.py

示例12: setUp

    def setUp(self):
        super(TestBasicRouterOperations, self).setUp()
        self.conf = agent_config.setup_conf()
        self.conf.register_opts(base_config.core_opts)
        self.conf.register_opts(varmour_router.vArmourL3NATAgent.OPTS)
        self.conf.register_opts(l3_ha_agent.OPTS)
        agent_config.register_interface_driver_opts_helper(self.conf)
        agent_config.register_use_namespaces_opts_helper(self.conf)
        agent_config.register_root_helper(self.conf)
        self.conf.register_opts(interface.OPTS)
        self.conf.set_override('interface_driver',
                               'neutron.agent.linux.interface.NullDriver')
        self.conf.root_helper = 'sudo'
        self.conf.state_path = ''

        self.device_exists_p = mock.patch(
            'neutron.agent.linux.ip_lib.device_exists')
        self.device_exists = self.device_exists_p.start()

        self.utils_exec_p = mock.patch(
            'neutron.agent.linux.utils.execute')
        self.utils_exec = self.utils_exec_p.start()

        self.external_process_p = mock.patch(
            'neutron.agent.linux.external_process.ProcessManager')
        self.external_process = self.external_process_p.start()

        self.makedirs_p = mock.patch('os.makedirs')
        self.makedirs = self.makedirs_p.start()

        self.dvr_cls_p = mock.patch('neutron.agent.linux.interface.NullDriver')
        driver_cls = self.dvr_cls_p.start()
        self.mock_driver = mock.MagicMock()
        self.mock_driver.DEV_NAME_LEN = (
            interface.LinuxInterfaceDriver.DEV_NAME_LEN)
        driver_cls.return_value = self.mock_driver

        self.ip_cls_p = mock.patch('neutron.agent.linux.ip_lib.IPWrapper')
        ip_cls = self.ip_cls_p.start()
        self.mock_ip = mock.MagicMock()
        ip_cls.return_value = self.mock_ip

        mock.patch('neutron.agent.l3_agent.L3PluginApi').start()

        self.looping_call_p = mock.patch(
            'neutron.openstack.common.loopingcall.FixedIntervalLoopingCall')
        self.looping_call_p.start()
开发者ID:dougwig,项目名称:x-neutron-fwaas,代码行数:47,代码来源:test_varmour_fwaas.py

示例13: main

def main(manager='neutron.agent.l3_agent.L3NATAgentWithStateReport'):
    conf = cfg.CONF
    conf.register_opts(L3NATAgent.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)
    common_config.init(sys.argv[1:])
    config.setup_logging(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:aignatov,项目名称:neutron,代码行数:17,代码来源:l3_agent.py

示例14: setup_conf

def setup_conf():
    """Setup the cfg for the clean up utility.

    Use separate setup_conf for the utility because there are many options
    from the main config that do not apply during clean-up.
    """

    cli_opts = [cfg.BoolOpt("force", default=False, help=_("Delete the namespace by removing all devices."))]

    conf = cfg.CONF
    conf.register_cli_opts(cli_opts)
    agent_config.register_interface_driver_opts_helper(conf)
    agent_config.register_use_namespaces_opts_helper(conf)
    agent_config.register_root_helper(conf)
    conf.register_opts(dhcp.OPTS)
    conf.register_opts(dhcp_agent.DhcpAgent.OPTS)
    conf.register_opts(interface.OPTS)
    return conf
开发者ID:asadoughi,项目名称:neutron,代码行数:18,代码来源:netns_cleanup_util.py

示例15: main

def main():
    conf = cfg.CONF
    conf.register_opts(vArmourL3NATAgent.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)
    server = neutron_service.Service.create(
        binary='neutron-l3-agent',
        topic=topics.L3_AGENT,
        report_interval=cfg.CONF.AGENT.report_interval,
        manager='neutron.services.firewall.agents.varmour.varmour_router.'
                'vArmourL3NATAgentWithStateReport')
    service.launch(server).wait()
开发者ID:NKSG,项目名称:neutron,代码行数:18,代码来源:varmour_router.py


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