本文整理汇总了Python中neutron.agent.common.config.register_agent_state_opts_helper函数的典型用法代码示例。如果您正苦于以下问题:Python register_agent_state_opts_helper函数的具体用法?Python register_agent_state_opts_helper怎么用?Python register_agent_state_opts_helper使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了register_agent_state_opts_helper函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: register_options
def register_options():
cfg.CONF.register_opts(DhcpAgent.OPTS)
config.register_agent_state_opts_helper(cfg.CONF)
config.register_root_helper(cfg.CONF)
cfg.CONF.register_opts(DeviceManager.OPTS)
cfg.CONF.register_opts(dhcp.OPTS)
cfg.CONF.register_opts(interface.OPTS)
开发者ID:abhirajbutala,项目名称:neutron,代码行数:7,代码来源:dhcp_agent.py
示例2: setUp
def setUp(self):
self.conf = cfg.ConfigOpts()
config.register_agent_state_opts_helper(cfg.CONF)
self.conf.register_opts(bc_attr.core_opts)
self.conf.register_opts(cfg_agent.OPTS, "cfg_agent")
cfg.CONF.set_override('report_interval', 0, 'AGENT')
super(TestCiscoCfgAgentWithStateReporting, self).setUp()
self.devmgr_plugin_api_cls_p = mock.patch(
'networking_cisco.plugins.cisco.cfg_agent.cfg_agent.'
'CiscoDeviceManagementApi')
devmgr_plugin_api_cls = self.devmgr_plugin_api_cls_p.start()
self.devmgr_plugin_api = mock.Mock()
devmgr_plugin_api_cls.return_value = self.devmgr_plugin_api
self.devmgr_plugin_api.register_for_duty.return_value = True
self.plugin_reportstate_api_cls_p = mock.patch(
'neutron.agent.rpc.PluginReportStateAPI')
plugin_reportstate_api_cls = self.plugin_reportstate_api_cls_p.start()
self.plugin_reportstate_api = mock.Mock()
plugin_reportstate_api_cls.return_value = self.plugin_reportstate_api
self.looping_call_p = mock.patch(
'oslo_service.loopingcall.FixedIntervalLoopingCall')
self.looping_call_p.start()
mock.patch('neutron.common.rpc.create_connection').start()
开发者ID:noironetworks,项目名称:networking-cisco,代码行数:26,代码来源:test_cfg_agent.py
示例3: main
def main():
cfg.CONF.register_opts(ip_lib.OPTS)
common_config.init(sys.argv[1:])
common_config.setup_logging()
cfg.CONF.register_opts(ServiceChainAgent.OPTS,'servicechain')
cfg.CONF.register_opts(ServiceChainAgent.agent_opts, "AGENT")
config.register_root_helper(cfg.CONF)
config.register_agent_state_opts_helper(cfg.CONF)
cfg.CONF(project='neutron')
try:
agent_config = create_agent_config_map(cfg.CONF)
except ValueError as e:
LOG.error(_('%s ServiceChain-Agent terminated!'), e)
sys.exit(1)
plugin = ServiceChainAgent(**agent_config)
signal.signal(signal.SIGTERM, plugin._handle_sigterm)
# Start everything.
LOG.info(_("ServiceChain-Agent initialized successfully, now running... "))
plugin.daemon_loop()
sys.exit(0)
开发者ID:HybridCloud-dew,项目名称:hws,代码行数:31,代码来源:servicechain_agent.py
示例4: setUp
def setUp(self):
super(TestManager, self).setUp()
self.conf = cfg.CONF
config.register_ovsdb_opts_helper(self.conf)
agent_config.register_agent_state_opts_helper(self.conf)
self.driver_mock = mock.Mock()
self.fake_record_dict = {n_const.OVSDB_IDENTIFIER: 'fake_ovsdb_id'}
cfg.CONF.set_override('report_interval', 1, 'AGENT')
self.plugin_rpc = mock.patch.object(agent_api,
'L2GatewayAgentApi').start()
self.context = mock.Mock
self.cntxt = mock.patch.object(context,
'get_admin_context_without_session'
).start()
self.test_rpc = mock.patch.object(rpc, 'get_client').start()
self.mock_looping_call = mock.patch.object(loopingcall,
'FixedIntervalLoopingCall'
).start()
self.l2gw_agent_manager = manager.OVSDBManager(
self.conf)
self.l2gw_agent_manager.plugin_rpc = self.plugin_rpc
self.fake_config_json = {n_const.OVSDB_IDENTIFIER:
'fake_ovsdb_identifier',
'ovsdb_ip': '5.5.5.5',
'ovsdb_port': '6672',
'private_key': 'dummy_key',
'enable_ssl': False,
'certificate': 'dummy_cert',
'ca_cert': 'dummy_ca'}
开发者ID:koteswar16,项目名称:networking-l2gw,代码行数:29,代码来源:test_manager.py
示例5: _load_device_plugins
def _load_device_plugins(self):
# Load OVS plug-in, if configured, and use its database parameters
if len(self.ovs_plugin) != 0:
# if ovs plug-in is configured, use ovs plug-in's database parameters
self.ovs_plugin_obj = importutils.import_object(self.ovs_plugin)
self.omni_db_obj = importutils.import_object(omni_const.OMNI_DB_CLASS)
self.omni_db_obj.initialize(None, None, None, omni_const.OVS_TABLES)
else:
# if ovs plug-in is not configured, use omni plug-in's database parameters
self.omni_db_obj = importutils.import_object(omni_const.OMNI_DB_CLASS)
self.omni_db_obj.initialize(None, None, None, omni_const.OMNI_TABLES)
self._parse_network_vlan_ranges()
self.omni_db_obj.sync_vlan_allocations(self.network_vlan_ranges)
config.register_agent_state_opts_helper(cfg.CONF)
config.register_root_helper(cfg.CONF)
#cfg.CONF.register_opts(scheduler.AGENTS_SCHEDULER_OPTS) # for havana
# Load Omni device plug-in
if len(self.omni_plugin) != 0:
self.omni_plugin_obj = importutils.import_object(self.omni_plugin)
self.omni_plugin_obj.initialize(self.omni_db_obj)
else:
LOG.info("Omni Device plug-in is not specified in the config!!!")
return
LOG.info("Device plug-ins loaded!")
开发者ID:Alcatel-LucentEnterpriseData,项目名称:ALUe-OONP_H_R01,代码行数:28,代码来源:omniswitch_network_plugin.py
示例6: setUp
def setUp(self):
self.conf = cfg.ConfigOpts()
config.register_agent_state_opts_helper(cfg.CONF)
self.conf.register_opts(base_config.core_opts)
self.conf.register_opts(cfg_agent.CiscoCfgAgent.OPTS, "cfg_agent")
# set class path to the fake firewall class since the real
# firewall calss will be in another package (neutron-fwaas)
self.conf.set_override('fw_svc_helper_class',
'networking_cisco.tests.unit.cisco.cfg_agent.'
'test_cfg_agent.FakeFirewallSvcHelper',
'cfg_agent')
cfg.CONF.set_override('report_interval', 0, 'AGENT')
super(TestCiscoCfgAgentWIthStateReporting, self).setUp()
self.devmgr_plugin_api_cls_p = mock.patch(
'networking_cisco.plugins.cisco.cfg_agent.cfg_agent.'
'CiscoDeviceManagementApi')
devmgr_plugin_api_cls = self.devmgr_plugin_api_cls_p.start()
self.devmgr_plugin_api = mock.Mock()
devmgr_plugin_api_cls.return_value = self.devmgr_plugin_api
self.devmgr_plugin_api.register_for_duty.return_value = True
self.plugin_reportstate_api_cls_p = mock.patch(
'neutron.agent.rpc.PluginReportStateAPI')
plugin_reportstate_api_cls = self.plugin_reportstate_api_cls_p.start()
self.plugin_reportstate_api = mock.Mock()
plugin_reportstate_api_cls.return_value = self.plugin_reportstate_api
self.looping_call_p = mock.patch(
'oslo_service.loopingcall.FixedIntervalLoopingCall')
self.looping_call_p.start()
mock.patch('neutron.common.rpc.create_connection').start()
开发者ID:Kannan-onecloud,项目名称:networking-cisco,代码行数:33,代码来源:test_cfg_agent.py
示例7: 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
示例8: _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
示例9: 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
示例10: 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
示例11: 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
示例12: _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
示例13: main
def main():
eventlet.monkey_patch()
cfg.CONF.register_opts(UnixDomainMetadataProxy.OPTS)
cfg.CONF.register_opts(MetadataProxyHandler.OPTS)
agent_conf.register_agent_state_opts_helper(cfg.CONF)
cfg.CONF(project='neutron')
config.setup_logging(cfg.CONF)
utils.log_opt_values(LOG)
proxy = UnixDomainMetadataProxy(cfg.CONF)
proxy.run()
开发者ID:Karbit,项目名称:neutron,代码行数:10,代码来源:agent.py
示例14: 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
示例15: main
def main():
config.register_agent_state_opts_helper(cfg.CONF)
common_config.init(sys.argv[1:])
config.setup_logging()
hyperv_agent = HyperVNeutronAgent()
# Start everything.
LOG.info(_LI("Agent initialized successfully, now running... "))
hyperv_agent.daemon_loop()
开发者ID:alinbalutoiu,项目名称:networking-hyperv,代码行数:10,代码来源:l2_agent.py
示例16: 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
示例17: main
def main():
cfg.CONF.register_opts(UnixDomainMetadataProxy.OPTS)
cfg.CONF.register_opts(MetadataProxyHandler.OPTS)
cache.register_oslo_configs(cfg.CONF)
cfg.CONF.set_default(name='cache_url', default='memory://?default_ttl=5')
agent_conf.register_agent_state_opts_helper(cfg.CONF)
config.init(sys.argv[1:])
config.setup_logging()
utils.log_opt_values(LOG)
proxy = UnixDomainMetadataProxy(cfg.CONF)
proxy.run()
开发者ID:leesurezen,项目名称:neutron,代码行数:11,代码来源:agent.py
示例18: main
def main():
cfg.CONF.register_opts(metadata_conf.UNIX_DOMAIN_METADATA_PROXY_OPTS)
cfg.CONF.register_opts(metadata_conf.METADATA_PROXY_HANDLER_OPTS)
cache.register_oslo_configs(cfg.CONF)
cfg.CONF.set_default(name='cache_url', default='memory://?default_ttl=5')
agent_conf.register_agent_state_opts_helper(cfg.CONF)
config.init(sys.argv[1:])
config.setup_logging()
utils.log_opt_values(LOG)
proxy = agent.UnixDomainMetadataProxy(cfg.CONF)
proxy.run()
开发者ID:bradleyjones,项目名称:neutron,代码行数:11,代码来源:metadata_agent.py
示例19: main
def main():
eventlet.monkey_patch()
cfg.CONF.register_opts(UnixDomainMetadataProxy.OPTS)
cfg.CONF.register_opts(MetadataProxyHandler.OPTS)
cache.register_oslo_configs(cfg.CONF)
cfg.CONF.set_default(name='cache_url', default='memory://?default_ttl=5')
agent_conf.register_agent_state_opts_helper(cfg.CONF)
cfg.CONF(project='neutron')
config.setup_logging(cfg.CONF)
utils.log_opt_values(LOG)
proxy = UnixDomainMetadataProxy(cfg.CONF)
proxy.run()
开发者ID:B-Rich,项目名称:neutron,代码行数:12,代码来源:agent.py
示例20: 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
注:本文中的neutron.agent.common.config.register_agent_state_opts_helper函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论