本文整理汇总了Python中neutron.plugins.bigswitch.config.register_config函数的典型用法代码示例。如果您正苦于以下问题:Python register_config函数的具体用法?Python register_config怎么用?Python register_config使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了register_config函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, server_timeout=None):
super(NeutronRestProxyV2, self).__init__()
LOG.info(_('NeutronRestProxy: Starting plugin. Version=%s'),
version_string_with_vcs())
pl_config.register_config()
self.evpool = eventlet.GreenPool(cfg.CONF.RESTPROXY.thread_pool_size)
# Include the BigSwitch Extensions path in the api_extensions
neutron_extensions.append_api_extensions_path(extensions.__path__)
self.add_meta_server_route = cfg.CONF.RESTPROXY.add_meta_server_route
# init network ctrl connections
self.servers = servermanager.ServerPool(server_timeout)
self.servers.get_topo_function = self._get_all_data
self.servers.get_topo_function_args = {'get_ports': True,
'get_floating_ips': True,
'get_routers': True}
self.network_scheduler = importutils.import_object(
cfg.CONF.network_scheduler_driver
)
# setup rpc for security and DHCP agents
self._setup_rpc()
if cfg.CONF.RESTPROXY.sync_data:
self._send_all_data()
LOG.debug(_("NeutronRestProxyV2: initialization done"))
开发者ID:dobriak,项目名称:neutron,代码行数:30,代码来源:plugin.py
示例2: __init__
def __init__(self, server_timeout=None):
super(NeutronRestProxyV2, self).__init__()
LOG.info(_('NeutronRestProxy: Starting plugin. Version=%s'),
version_string_with_vcs())
pl_config.register_config()
# Include the BigSwitch Extensions path in the api_extensions
neutron_extensions.append_api_extensions_path(extensions.__path__)
self.add_meta_server_route = cfg.CONF.RESTPROXY.add_meta_server_route
# init network ctrl connections
self.servers = servermanager.ServerPool(server_timeout)
# init dhcp support
self.topic = topics.PLUGIN
self.network_scheduler = importutils.import_object(
cfg.CONF.network_scheduler_driver
)
self._dhcp_agent_notifier = dhcp_rpc_agent_api.DhcpAgentNotifyAPI()
self.agent_notifiers[const.AGENT_TYPE_DHCP] = (
self._dhcp_agent_notifier
)
self.conn = rpc.create_connection(new=True)
self.callbacks = RpcProxy()
self.dispatcher = self.callbacks.create_rpc_dispatcher()
self.conn.create_consumer(self.topic, self.dispatcher,
fanout=False)
# Consume from all consumers in a thread
self.conn.consume_in_thread()
if cfg.CONF.RESTPROXY.sync_data:
self._send_all_data()
LOG.debug(_("NeutronRestProxyV2: initialization done"))
开发者ID:yuhui7red,项目名称:neutron,代码行数:34,代码来源:plugin.py
示例3: setup_config_files
def setup_config_files(self):
etc_path = os.path.join(os.path.dirname(__file__), "etc")
test_lib.test_config["config_files"] = [os.path.join(etc_path, "restproxy.ini.test")]
self.addCleanup(cfg.CONF.reset)
config.register_config()
# Only try SSL on SSL tests
cfg.CONF.set_override("server_ssl", False, "RESTPROXY")
cfg.CONF.set_override("ssl_cert_directory", os.path.join(etc_path, "ssl"), "RESTPROXY")
# The mock interferes with HTTP(S) connection caching
cfg.CONF.set_override("cache_connections", False, "RESTPROXY")
开发者ID:B-Rich,项目名称:neutron,代码行数:10,代码来源:test_base.py
示例4: setup_config_files
def setup_config_files(self):
etc_path = os.path.join(os.path.dirname(__file__), 'etc')
test_lib.test_config['config_files'] = [os.path.join(etc_path,
'restproxy.ini.test')]
self.addCleanup(cfg.CONF.reset)
config.register_config()
# Only try SSL on SSL tests
cfg.CONF.set_override('server_ssl', False, 'RESTPROXY')
cfg.CONF.set_override('ssl_cert_directory',
os.path.join(etc_path, 'ssl'), 'RESTPROXY')
# The mock interferes with HTTP(S) connection caching
cfg.CONF.set_override('cache_connections', False, 'RESTPROXY')
开发者ID:brucezy,项目名称:neutron,代码行数:12,代码来源:test_base.py
示例5: main
def main():
config.init(sys.argv[1:])
config.setup_logging(cfg.CONF)
pl_config.register_config()
integ_br = cfg.CONF.RESTPROXYAGENT.integration_bridge
polling_interval = cfg.CONF.RESTPROXYAGENT.polling_interval
root_helper = cfg.CONF.AGENT.root_helper
bsnagent = RestProxyAgent(integ_br, polling_interval, root_helper,
cfg.CONF.RESTPROXYAGENT.virtual_switch_type)
bsnagent.daemon_loop()
sys.exit(0)
开发者ID:brucezy,项目名称:neutron,代码行数:12,代码来源:restproxy_agent.py
示例6: initialize
def initialize(self, server_timeout=None):
LOG.debug(_('Initializing driver'))
# register plugin config opts
pl_config.register_config()
# backend doesn't support bulk operations yet
self.native_bulk_support = False
# init network ctrl connections
self.servers = ServerPool(server_timeout)
self.segmentation_types = ', '.join(cfg.CONF.ml2.type_drivers)
LOG.debug(_("Initialization done"))
开发者ID:mshabdiz,项目名称:neutron,代码行数:12,代码来源:driver.py
示例7: main
def main():
eventlet.monkey_patch()
cfg.CONF(project='neutron')
config.setup_logging(cfg.CONF)
pl_config.register_config()
integ_br = cfg.CONF.RESTPROXYAGENT.integration_bridge
polling_interval = cfg.CONF.RESTPROXYAGENT.polling_interval
root_helper = cfg.CONF.AGENT.root_helper
bsnagent = RestProxyAgent(integ_br, polling_interval, root_helper,
cfg.CONF.RESTPROXYAGENT.virtual_switch_type)
bsnagent.daemon_loop()
sys.exit(0)
开发者ID:50infivedays,项目名称:neutron,代码行数:13,代码来源:restproxy_agent.py
示例8: initialize
def initialize(self):
LOG.debug(_("Initializing driver"))
# register plugin config opts
pl_config.register_config()
self.evpool = eventlet.GreenPool(cfg.CONF.RESTPROXY.thread_pool_size)
# backend doesn't support bulk operations yet
self.native_bulk_support = False
# init network ctrl connections
self.servers = servermanager.ServerPool()
self.servers.get_topo_function = self._get_all_data
self.servers.get_topo_function_args = {"get_ports": True, "get_floating_ips": False, "get_routers": False}
self.segmentation_types = ", ".join(cfg.CONF.ml2.type_drivers)
LOG.debug(_("Initialization done"))
开发者ID:kbijon,项目名称:OpenStack-CVRM,代码行数:15,代码来源:driver.py
示例9: initialize
def initialize(self):
LOG.debug('Initializing driver')
# register plugin config opts
pl_config.register_config()
self.evpool = eventlet.GreenPool(cfg.CONF.RESTPROXY.thread_pool_size)
# init network ctrl connections
self.servers = servermanager.ServerPool()
self.servers.get_topo_function = self._get_all_data
self.servers.get_topo_function_args = {'get_ports': True,
'get_floating_ips': False,
'get_routers': False}
self.segmentation_types = ', '.join(cfg.CONF.ml2.type_drivers)
# Track hosts running IVS to avoid excessive calls to the backend
self.ivs_host_cache = {}
LOG.debug("Initialization done")
开发者ID:afori,项目名称:neutron,代码行数:18,代码来源:driver.py
示例10: init_config
def init_config():
"""Initialize configuration for this script"""
logging.setup("sync_network")
cfgfile = get_config_files()
cfg.CONF(
args=[j for i in zip(["--config-file"]*len(cfgfile), cfgfile)
for j in i],
project="neutron",
)
cfg.CONF.set_override('control_exchange', '')
cfg.CONF.set_override('rpc_backend', 'neutron.openstack.common.rpc.impl_fake')
cfg.CONF.set_override('verbose', True)
cfg.CONF.set_override('debug', True)
config.register_config()
cfg.CONF.set_override('consistency_interval', 0, 'RESTPROXY')
cfg.CONF.set_override('sync_data', False, 'RESTPROXY')
# override to suppress annoying mysql mode warning
session.LOG.warning = lambda *args, **kwargs: True
# replace watchdog so it doesn't try to start
servermanager.ServerPool._consistency_watchdog = lambda x, y: True
开发者ID:Sovietaced,项目名称:deployment-support,代码行数:20,代码来源:sync_network.py
示例11: setup_config_files
def setup_config_files(self):
etc_path = os.path.join(os.path.dirname(__file__), 'etc')
test_lib.test_config['config_files'] = [os.path.join(etc_path,
'restproxy.ini.test')]
self.addCleanup(cfg.CONF.reset)
config.register_config()
开发者ID:yuhui7red,项目名称:neutron,代码行数:6,代码来源:test_base.py
注:本文中的neutron.plugins.bigswitch.config.register_config函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论