Fix gate issues on master

We recently removed nenutron.common.rpc [1] as the rpc module lives in
neutron-lib now. This project was missed because I didn't find
neutron.common.rpc as an import. This patch switches rpc uses over to
neutron-lib.

This also addresses an issue where toxenv fails when it encounters a
non-empty __pycache__ directory. This adjusts the options passed to
find so that it is tolerant of this scenario and allows tox runs to
proceed.

[1] https://review.openstack.org/#/c/634790/

Change-Id: Ice83f7574f146436e3db045693b530f0cfeda049
This commit is contained in:
Boden R 2019-02-11 07:46:27 -07:00 committed by Ryan Tidwell
parent 571e2e3f0e
commit 19aed83ff1
No known key found for this signature in database
GPG Key ID: A1C63854C1CDF372
3 changed files with 4 additions and 4 deletions

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.Connection')
rpc_conn_p = mock.patch('neutron_lib.rpc.Connection')
rpc_conn_p.start()
self.plugin = bgp_plugin.BgpPlugin()
self.scheduler = bgp_dras.ChanceScheduler()
@ -299,7 +299,7 @@ class TestRescheduleBgpSpeaker(TestBgpDrAgentSchedulerBaseTestCase,
'agentnotifiers.bgp_dr_rpc_agent_api.'
'BgpDrAgentNotifyApi')
bgp_notify_p.start()
rpc_conn_p = mock.patch('neutron.common.rpc.Connection')
rpc_conn_p = mock.patch('neutron_lib.rpc.Connection')
rpc_conn_p.start()
self.plugin = bgp_plugin.BgpPlugin()
self.scheduler = bgp_dras.ChanceScheduler()

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.Connection')
rpc_conn_p = mock.patch('neutron_lib.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

@ -19,7 +19,7 @@ whitelist_externals =
sh
commands =
find . -type f -name "*.py[c|o]" -delete
find . -type d -name "__pycache__" -delete
find . -depth -path "*/__pycache__*" -delete
stestr run {posargs}
# there is also secret magic in stestr which lets you run in a fail only
# mode. To do this define the TRACE_FAILONLY environmental variable.