Merge "use rpc Connection rather than create_connection"
This commit is contained in:
commit
9da1930583
@ -84,7 +84,7 @@ class DhcpMetadataAccess(object):
|
|||||||
|
|
||||||
def _setup_rpc_dhcp_metadata(self, notifier=None):
|
def _setup_rpc_dhcp_metadata(self, notifier=None):
|
||||||
self.topic = topics.PLUGIN
|
self.topic = topics.PLUGIN
|
||||||
self.conn = n_rpc.create_connection()
|
self.conn = n_rpc.Connection()
|
||||||
self.endpoints = [SynchronizedDhcpRpcCallback(),
|
self.endpoints = [SynchronizedDhcpRpcCallback(),
|
||||||
agents_db.AgentExtRpcCallback(),
|
agents_db.AgentExtRpcCallback(),
|
||||||
metadata_rpc.MetadataRpcCallback()]
|
metadata_rpc.MetadataRpcCallback()]
|
||||||
|
@ -423,7 +423,7 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||||||
self.endpoints = [agents_db.AgentExtRpcCallback()]
|
self.endpoints = [agents_db.AgentExtRpcCallback()]
|
||||||
self.topic = topics.PLUGIN
|
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(self.topic, self.endpoints, fanout=False)
|
||||||
|
|
||||||
self.start_rpc_listeners_called = True
|
self.start_rpc_listeners_called = True
|
||||||
|
@ -794,7 +794,7 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
|
|||||||
|
|
||||||
self._setup_rpc()
|
self._setup_rpc()
|
||||||
self.topic = topics.PLUGIN
|
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(self.topic, self.endpoints, fanout=False)
|
||||||
self.conn.create_consumer(topics.REPORTS,
|
self.conn.create_consumer(topics.REPORTS,
|
||||||
[agents_db.AgentExtRpcCallback()],
|
[agents_db.AgentExtRpcCallback()],
|
||||||
|
@ -92,7 +92,7 @@ class ConfigurationTest(base.BaseTestCase):
|
|||||||
self.assertEqual('whatever', cluster.nsx_default_interface_name)
|
self.assertEqual('whatever', cluster.nsx_default_interface_name)
|
||||||
|
|
||||||
def _get_mh_plugin(self):
|
def _get_mh_plugin(self):
|
||||||
with mock.patch("neutron.common.rpc.create_connection"):
|
with mock.patch("neutron.common.rpc.Connection"):
|
||||||
plugin = mh_plugin.NsxPlugin()
|
plugin = mh_plugin.NsxPlugin()
|
||||||
return plugin
|
return plugin
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ class OldNVPConfigurationTest(base.BaseTestCase):
|
|||||||
self.config_parse(args=['--config-file', BASE_CONF_PATH,
|
self.config_parse(args=['--config-file', BASE_CONF_PATH,
|
||||||
'--config-file', NVP_INI_DEPR_PATH])
|
'--config-file', NVP_INI_DEPR_PATH])
|
||||||
cfg.CONF.set_override('core_plugin', vmware.PLUGIN_NAME)
|
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()
|
plugin = mh_plugin.NsxPlugin()
|
||||||
cluster = plugin.cluster
|
cluster = plugin.cluster
|
||||||
# Verify old nvp_* params have been fully parsed
|
# Verify old nvp_* params have been fully parsed
|
||||||
|
@ -295,7 +295,7 @@ class SyncTestCase(testlib_api.SqlTestCase):
|
|||||||
self.config_parse(args=args)
|
self.config_parse(args=args)
|
||||||
cfg.CONF.set_override('allow_overlapping_ips', True)
|
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()
|
self._plugin = plugin.NsxPlugin()
|
||||||
|
|
||||||
mock_nm_get_plugin = mock.patch(
|
mock_nm_get_plugin = mock.patch(
|
||||||
|
Loading…
Reference in New Issue
Block a user