diff --git a/vmware_nsx/dhcp_meta/modes.py b/vmware_nsx/dhcp_meta/modes.py index 698a7cf05d..a1b7546f37 100644 --- a/vmware_nsx/dhcp_meta/modes.py +++ b/vmware_nsx/dhcp_meta/modes.py @@ -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()] diff --git a/vmware_nsx/plugins/nsx_v/plugin.py b/vmware_nsx/plugins/nsx_v/plugin.py index fe29a9ba12..03c841652e 100644 --- a/vmware_nsx/plugins/nsx_v/plugin.py +++ b/vmware_nsx/plugins/nsx_v/plugin.py @@ -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 diff --git a/vmware_nsx/plugins/nsx_v3/plugin.py b/vmware_nsx/plugins/nsx_v3/plugin.py index d226258e64..c8ff55da5c 100644 --- a/vmware_nsx/plugins/nsx_v3/plugin.py +++ b/vmware_nsx/plugins/nsx_v3/plugin.py @@ -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()], diff --git a/vmware_nsx/tests/unit/nsx_mh/test_opts.py b/vmware_nsx/tests/unit/nsx_mh/test_opts.py index 595be8c6b3..184efa9632 100644 --- a/vmware_nsx/tests/unit/nsx_mh/test_opts.py +++ b/vmware_nsx/tests/unit/nsx_mh/test_opts.py @@ -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 diff --git a/vmware_nsx/tests/unit/nsx_mh/test_sync.py b/vmware_nsx/tests/unit/nsx_mh/test_sync.py index 8ca33a29c1..c445afeef0 100644 --- a/vmware_nsx/tests/unit/nsx_mh/test_sync.py +++ b/vmware_nsx/tests/unit/nsx_mh/test_sync.py @@ -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(