use rpc Connection rather than create_connection

The create_connection function in neutron.common.rpc is just an alias to
Connection. This patch switches to the later so we can remove the former
in: https://review.openstack.org/#/c/560130

Change-Id: Ie8eaca442fa2872fe061f997898d9cd7d9195c9d
This commit is contained in:
Boden R 2018-04-12 14:03:01 -06:00
parent 4692ac30ec
commit 78d68a18ba
3 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@ class BgpPlugin(service_base.ServicePluginBase,
def _setup_rpc(self):
self.topic = bgp_consts.BGP_PLUGIN
self.conn = n_rpc.create_connection()
self.conn = n_rpc.Connection()
self.agent_notifiers[bgp_consts.AGENT_TYPE_BGP_ROUTING] = (
bgp_dr_rpc_agent_api.BgpDrAgentNotifyApi()
)

View File

@ -88,7 +88,7 @@ class TestSchedulerCallback(TestBgpDrAgentSchedulerBaseTestCase):
'agentnotifiers.bgp_dr_rpc_agent_api.'
'BgpDrAgentNotifyApi')
bgp_notify_p.start()
rpc_conn_p = mock.patch('neutron.common.rpc.create_connection')
rpc_conn_p = mock.patch('neutron.common.rpc.Connection')
rpc_conn_p.start()
admin_ctx_p = mock.patch('neutron_lib.context.get_admin_context')
admin_ctx_p = mock.patch('neutron_lib.context.get_admin_context')
@ -303,7 +303,7 @@ class TestRescheduleBgpSpeaker(TestBgpDrAgentSchedulerBaseTestCase,
'agentnotifiers.bgp_dr_rpc_agent_api.'
'BgpDrAgentNotifyApi')
bgp_notify_p.start()
rpc_conn_p = mock.patch('neutron.common.rpc.create_connection')
rpc_conn_p = mock.patch('neutron.common.rpc.Connection')
rpc_conn_p.start()
admin_ctx_p = mock.patch('neutron_lib.context.get_admin_context')
self.admin_ctx_m = admin_ctx_p.start()

View File

@ -34,7 +34,7 @@ class TestBgpPlugin(base.BaseTestCase):
'agentnotifiers.bgp_dr_rpc_agent_api.'
'BgpDrAgentNotifyApi')
bgp_notify_p.start()
rpc_conn_p = mock.patch('neutron.common.rpc.create_connection')
rpc_conn_p = mock.patch('neutron.common.rpc.Connection')
rpc_conn_p.start()
admin_ctx_p = mock.patch('neutron_lib.context.get_admin_context')
self.admin_ctx_m = admin_ctx_p.start()