From: Jenkins Date: Thu, 23 Apr 2015 17:47:39 +0000 (+0000) Subject: Merge "Log RPC initialization in L3 service plugin and ML2" X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=78b32aad9031bfbf0dd478a7522b6075e610d98e;p=openstack-build%2Fneutron-build.git Merge "Log RPC initialization in L3 service plugin and ML2" --- 78b32aad9031bfbf0dd478a7522b6075e610d98e diff --cc neutron/plugins/ml2/plugin.py index e5a4d3728,240f3b03c..c668454ac --- a/neutron/plugins/ml2/plugin.py +++ b/neutron/plugins/ml2/plugin.py @@@ -150,27 -156,19 +151,28 @@@ class Ml2Plugin(db_base_plugin_v2.Neutr self.agent_notifiers[const.AGENT_TYPE_DHCP] = ( dhcp_rpc_agent_api.DhcpAgentNotifyAPI() ) + self.endpoints = [ + rpc.RpcCallbacks(self.notifier, self.type_manager), + securitygroups_rpc.SecurityGroupServerRpcCallback(), + dvr_rpc.DVRServerRpcCallback(), + dhcp_rpc.DhcpRpcCallback(), + agents_db.AgentExtRpcCallback(), + metadata_rpc.MetadataRpcCallback() + ] + + def _setup_dhcp(self): + """Initialize components to support DHCP.""" + self.network_scheduler = importutils.import_object( + cfg.CONF.network_scheduler_driver + ) + self.start_periodic_dhcp_agent_status_check() + @neutron_log.log def start_rpc_listeners(self): - self.endpoints = [rpc.RpcCallbacks(self.notifier, self.type_manager), - securitygroups_rpc.SecurityGroupServerRpcCallback(), - dvr_rpc.DVRServerRpcCallback(), - dhcp_rpc.DhcpRpcCallback(), - agents_db.AgentExtRpcCallback(), - metadata_rpc.MetadataRpcCallback()] + """Start the RPC loop to let the plugin communicate with agents.""" self.topic = topics.PLUGIN self.conn = n_rpc.create_connection(new=True) - self.conn.create_consumer(self.topic, self.endpoints, - fanout=False) + self.conn.create_consumer(self.topic, self.endpoints, fanout=False) return self.conn.consume_in_threads() def _filter_nets_provider(self, context, networks, filters):