Merge "use rpc Connection rather than create_connection"

This commit is contained in:
Zuul 2018-04-12 08:22:35 +00:00 committed by Gerrit Code Review
commit 9da1930583
5 changed files with 6 additions and 6 deletions

View File

@ -84,7 +84,7 @@ class DhcpMetadataAccess(object):
def _setup_rpc_dhcp_metadata(self, notifier=None):
self.topic = topics.PLUGIN
self.conn = n_rpc.create_connection()
self.conn = n_rpc.Connection()
self.endpoints = [SynchronizedDhcpRpcCallback(),
agents_db.AgentExtRpcCallback(),
metadata_rpc.MetadataRpcCallback()]

View File

@ -423,7 +423,7 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
self.endpoints = [agents_db.AgentExtRpcCallback()]
self.topic = topics.PLUGIN
self.conn = n_rpc.create_connection()
self.conn = n_rpc.Connection()
self.conn.create_consumer(self.topic, self.endpoints, fanout=False)
self.start_rpc_listeners_called = True

View File

@ -794,7 +794,7 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
self._setup_rpc()
self.topic = topics.PLUGIN
self.conn = n_rpc.create_connection()
self.conn = n_rpc.Connection()
self.conn.create_consumer(self.topic, self.endpoints, fanout=False)
self.conn.create_consumer(topics.REPORTS,
[agents_db.AgentExtRpcCallback()],

View File

@ -92,7 +92,7 @@ class ConfigurationTest(base.BaseTestCase):
self.assertEqual('whatever', cluster.nsx_default_interface_name)
def _get_mh_plugin(self):
with mock.patch("neutron.common.rpc.create_connection"):
with mock.patch("neutron.common.rpc.Connection"):
plugin = mh_plugin.NsxPlugin()
return plugin
@ -249,7 +249,7 @@ class OldNVPConfigurationTest(base.BaseTestCase):
self.config_parse(args=['--config-file', BASE_CONF_PATH,
'--config-file', NVP_INI_DEPR_PATH])
cfg.CONF.set_override('core_plugin', vmware.PLUGIN_NAME)
with mock.patch("neutron.common.rpc.create_connection"):
with mock.patch("neutron.common.rpc.Connection"):
plugin = mh_plugin.NsxPlugin()
cluster = plugin.cluster
# Verify old nvp_* params have been fully parsed

View File

@ -295,7 +295,7 @@ class SyncTestCase(testlib_api.SqlTestCase):
self.config_parse(args=args)
cfg.CONF.set_override('allow_overlapping_ips', True)
with mock.patch("neutron.common.rpc.create_connection"):
with mock.patch("neutron.common.rpc.Connection"):
self._plugin = plugin.NsxPlugin()
mock_nm_get_plugin = mock.patch(