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

Python config.register_interface_driver_opts_helper函数代码示例

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

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



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

示例1: 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.')),
    ]

    opts = [
        cfg.StrOpt('dhcp_driver',
                   default='neutron.agent.linux.dhcp.Dnsmasq',
                   help=_("The driver used to manage the DHCP server.")),
    ]

    conf = cfg.CONF
    conf.register_cli_opts(cli_opts)
    conf.register_opts(opts)
    agent_config.register_interface_driver_opts_helper(conf)
    agent_config.register_root_helper(conf)
    conf.register_opts(dhcp.OPTS)
    return conf
开发者ID:50infivedays,项目名称:neutron,代码行数:26,代码来源:netns_cleanup_util.py


示例2: setUp

    def setUp(self):
        super(TestMetaInterfaceDriver, self).setUp()
        config.register_interface_driver_opts_helper(self.conf)
        self.client_cls_p = mock.patch('neutronclient.v2_0.client.Client')
        client_cls = self.client_cls_p.start()
        self.client_inst = mock.Mock()
        client_cls.return_value = self.client_inst

        fake_network = {'network': {flavor.FLAVOR_NETWORK: 'fake1'}}
        fake_port = {'ports':
                     [{'mac_address':
                      'aa:bb:cc:dd:ee:ffa', 'network_id': 'test'}]}

        self.client_inst.list_ports.return_value = fake_port
        self.client_inst.show_network.return_value = fake_network

        self.conf.set_override('auth_url', 'http://localhost:35357/v2.0')
        self.conf.set_override('auth_region', 'RegionOne')
        self.conf.set_override('admin_user', 'neutron')
        self.conf.set_override('admin_password', 'password')
        self.conf.set_override('admin_tenant_name', 'service')
        self.conf.set_override(
            'meta_flavor_driver_mappings',
            'fake1:neutron.agent.linux.interface.OVSInterfaceDriver,'
            'fake2:neutron.agent.linux.interface.BridgeInterfaceDriver')
        self.conf.set_override('endpoint_type', 'internalURL')
开发者ID:kongseokhwan,项目名称:kulcloud-iitp-neutron,代码行数:26,代码来源:test_interface.py


示例3: 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


示例4: _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


示例5: _configure

 def _configure(self):
     config.register_interface_driver_opts_helper(cfg.CONF)
     cfg.CONF.set_override(
         'interface_driver',
         'neutron.agent.linux.interface.OVSInterfaceDriver')
     cfg.CONF.register_opts(interface.OPTS)
     self.driver = importutils.import_object(cfg.CONF.interface_driver,
                                             cfg.CONF)
开发者ID:Lily913,项目名称:neutron,代码行数:8,代码来源:test_ip_lib.py


示例6: register_options

def register_options(conf):
    config.register_interface_driver_opts_helper(conf)
    config.register_agent_state_opts_helper(conf)
    config.register_availability_zone_opts_helper(conf)
    dhcp_config.register_agent_dhcp_opts(conf)
    conf.register_opts(metadata_config.DRIVER_OPTS)
    conf.register_opts(metadata_config.SHARED_OPTS)
    conf.register_opts(interface.OPTS)
开发者ID:annp,项目名称:neutron,代码行数:8,代码来源:dhcp_agent.py


示例7: _get_config_opts

 def _get_config_opts(self):
     config = cfg.ConfigOpts()
     config.register_opts(common_config.core_opts)
     config.register_opts(interface.OPTS)
     config.register_opts(ovs_config.ovs_opts, "OVS")
     config.register_opts(ovs_config.agent_opts, "AGENT")
     agent_config.register_interface_driver_opts_helper(config)
     agent_config.register_agent_state_opts_helper(config)
     return config
开发者ID:Gin077,项目名称:neutron,代码行数:9,代码来源:test_l2_ovs_agent.py


示例8: 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


示例9: 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


示例10: setUp

 def setUp(self):
     super(TestDhcpNoOpDriver, self).setUp()
     self.conf = config.setup_conf()
     config.register_interface_driver_opts_helper(self.conf)
     self.conf.register_opts(base_config.core_opts)
     self.conf.register_opts(dhcp.OPTS)
     self.conf.enable_isolated_metadata = True
     self.conf.use_namespaces = True
     instance = mock.patch("neutron.agent.linux.dhcp.DeviceManager")
     self.mock_mgr = instance.start()
开发者ID:AsherBond,项目名称:quantum,代码行数:10,代码来源:test_midonet_driver.py


示例11: 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


示例12: 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_agent_state_opts_helper(conf)
    conf.register_opts(interface.OPTS)
    conf.register_opts(external_process.OPTS)
    config.register_availability_zone_opts_helper(conf)
开发者ID:abhilabh,项目名称:neutron,代码行数:10,代码来源:l3_agent.py


示例13: 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


示例14: _configure

 def _configure(self):
     config.setup_logging()
     config.register_root_helper(cfg.CONF)
     cfg.CONF.set_override('root_helper', self.root_helper, group='AGENT')
     config.register_interface_driver_opts_helper(cfg.CONF)
     cfg.CONF.set_override(
         'interface_driver',
         'neutron.agent.linux.interface.OVSInterfaceDriver')
     cfg.CONF.register_opts(interface.OPTS)
     self.driver = importutils.import_object(cfg.CONF.interface_driver,
                                             cfg.CONF)
开发者ID:Jieming,项目名称:neutron,代码行数:11,代码来源:test_ip_lib.py


示例15: register_opts

def register_opts(conf):
    l3_config.register_l3_agent_config_opts(l3_config.OPTS, conf)
    ha_conf.register_l3_agent_ha_opts(conf)
    meta_conf.register_meta_conf_opts(meta_conf.DRIVER_OPTS, conf)
    meta_conf.register_meta_conf_opts(meta_conf.SHARED_OPTS, conf)
    config.register_interface_driver_opts_helper(conf)
    config.register_agent_state_opts_helper(conf)
    conf.register_opts(interface.OPTS)
    conf.register_opts(external_process.OPTS)
    conf.register_opts(pd.OPTS)
    conf.register_opts(ra.OPTS)
    config.register_availability_zone_opts_helper(conf)
开发者ID:2020human,项目名称:neutron,代码行数:12,代码来源:l3_agent.py


示例16: 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


示例17: 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


示例18: 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.
    """

    conf = cfg.CONF
    cmd.register_cmd_opts(cmd.ovs_opts, conf)
    l3_config.register_l3_agent_config_opts(l3_config.OPTS, conf)
    conf.register_opts(interface.OPTS)
    agent_config.register_interface_driver_opts_helper(conf)
    return conf
开发者ID:2020human,项目名称:neutron,代码行数:13,代码来源:ovs_cleanup.py


示例19: main

def main():
    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)

    common_config.init(sys.argv[1:])
    config.setup_logging()

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


示例20: 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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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