Stop using _create_or_update_agent
There is a public method, use it instead! Closes-bug: #1624496 (cherry picked from commitb4c840d97b
) Change-Id: Ie076a2860a54c5e2958c16593c3f39f86353cd34 pep8: switched to neutron-lib hacking checks A recent hacking check landed in neutron broke the pep8 target for the repo. Using hacking checks from neutron is error prone. This patch switches the repo to checks from neutron-lib. It also skips N530 check because the repo still imports from neutron.* (cherry picked from commitfa11d9a0a5
) Change-Id: I70ce6698a3f25af39917ec7bdf1a31a1d4cabf89
This commit is contained in:
parent
26a252e3d7
commit
ceac1a94a8
|
@ -895,11 +895,11 @@ class BgpTests(test_plugin.Ml2PluginV2TestCase,
|
|||
portbindings.HOST_ID: 'test-host'}}
|
||||
fixed_port = self.plugin.create_port(self.context,
|
||||
fixed_port_data)
|
||||
self.plugin._create_or_update_agent(self.context,
|
||||
{'agent_type': 'L3 agent',
|
||||
'host': 'test-host',
|
||||
'binary': 'neutron-l3-agent',
|
||||
'topic': 'test'})
|
||||
self.plugin.create_or_update_agent(self.context,
|
||||
{'agent_type': 'L3 agent',
|
||||
'host': 'test-host',
|
||||
'binary': 'neutron-l3-agent',
|
||||
'topic': 'test'})
|
||||
fip_gw = self.l3plugin.create_fip_agent_gw_port_if_not_exists(
|
||||
self.context,
|
||||
gw_net_id,
|
||||
|
@ -960,11 +960,11 @@ class BgpTests(test_plugin.Ml2PluginV2TestCase,
|
|||
portbindings.HOST_ID: 'test-host'}}
|
||||
fixed_port = self.plugin.create_port(self.context,
|
||||
fixed_port_data)
|
||||
self.plugin._create_or_update_agent(self.context,
|
||||
{'agent_type': 'L3 agent',
|
||||
'host': 'test-host',
|
||||
'binary': 'neutron-l3-agent',
|
||||
'topic': 'test'})
|
||||
self.plugin.create_or_update_agent(self.context,
|
||||
{'agent_type': 'L3 agent',
|
||||
'host': 'test-host',
|
||||
'binary': 'neutron-l3-agent',
|
||||
'topic': 'test'})
|
||||
fip_gw = self.l3plugin.create_fip_agent_gw_port_if_not_exists(
|
||||
self.context,
|
||||
gw_net_id,
|
||||
|
@ -1016,11 +1016,11 @@ class BgpTests(test_plugin.Ml2PluginV2TestCase,
|
|||
portbindings.HOST_ID: 'test-host'}}
|
||||
fixed_port = self.plugin.create_port(self.context,
|
||||
fixed_port_data)
|
||||
self.plugin._create_or_update_agent(self.context,
|
||||
{'agent_type': 'L3 agent',
|
||||
'host': 'test-host',
|
||||
'binary': 'neutron-l3-agent',
|
||||
'topic': 'test'})
|
||||
self.plugin.create_or_update_agent(self.context,
|
||||
{'agent_type': 'L3 agent',
|
||||
'host': 'test-host',
|
||||
'binary': 'neutron-l3-agent',
|
||||
'topic': 'test'})
|
||||
fip_gw = self.l3plugin.create_fip_agent_gw_port_if_not_exists(
|
||||
self.context,
|
||||
gw_net_id,
|
||||
|
@ -1128,7 +1128,7 @@ class BgpTests(test_plugin.Ml2PluginV2TestCase,
|
|||
|
||||
def _create_scenario_test_l3_agents(self, agent_confs):
|
||||
for item in agent_confs:
|
||||
self.plugin._create_or_update_agent(
|
||||
self.plugin.create_or_update_agent(
|
||||
self.context,
|
||||
{'agent_type': 'L3 agent',
|
||||
'host': item['host'],
|
||||
|
|
5
tox.ini
5
tox.ini
|
@ -76,7 +76,8 @@ commands = python setup.py build_sphinx
|
|||
# E265 block comment should start with ‘# ‘
|
||||
# H405 multi line docstring summary not separated with an empty line
|
||||
# TODO(marun) H404 multi line docstring should start with a summary
|
||||
ignore = E125,E126,E128,E129,E265,H404,H405
|
||||
# N530 direct neutron imports not allowed
|
||||
ignore = E125,E126,E128,E129,E265,H404,H405,N530
|
||||
show-source = true
|
||||
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios
|
||||
|
||||
|
@ -89,7 +90,7 @@ commands =
|
|||
|
||||
[hacking]
|
||||
import_exceptions = neutron_dynamic_routing._i18n
|
||||
local-check-factory = neutron.hacking.checks.factory
|
||||
local-check-factory = neutron_lib.hacking.checks.factory
|
||||
|
||||
[testenv:genconfig]
|
||||
commands = {toxinidir}/tools/generate_config_file_samples.sh
|
||||
|
|
Loading…
Reference in New Issue