Update hacking version

Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: Ia5454a92a46fc4fab981fd0b7730244f692504d6
This commit is contained in:
zhulingjie 2019-01-05 01:48:17 +08:00
parent 9f78072ccc
commit 45a36b8ba8
7 changed files with 12 additions and 7 deletions

View File

@ -102,6 +102,7 @@ def convert_to_string(value):
return str(value)
return None
firewall.RESOURCE_ATTRIBUTE_MAP[api_const.FIREWALL_RULES][
'source_port']['convert_to'] = convert_to_string
firewall.RESOURCE_ATTRIBUTE_MAP[api_const.FIREWALL_RULES][

View File

@ -93,6 +93,7 @@ def convert_to_string(value):
return str(value)
return None
firewall_v2.RESOURCE_ATTRIBUTE_MAP[api_const.FIREWALL_RULES][
'source_port']['convert_to'] = convert_to_string
firewall_v2.RESOURCE_ATTRIBUTE_MAP[api_const.FIREWALL_RULES][

View File

@ -473,7 +473,7 @@ class IptablesFwaasDriver(fwaas_base_v2.FwaasDriverBase):
# or destination port number is specified
if (rule.get('source_port') is not None or
rule.get('destination_port') is not None):
args += self._match_arg(rule.get('protocol'))
args += self._match_arg(rule.get('protocol'))
args += self._port_arg('sport',
rule.get('protocol'),

View File

@ -297,8 +297,8 @@ class FWaaSL3AgentExtension(l3_extension.L3AgentExtension):
self.services_sync_needed = True
def update_router(self, context, updated_router):
"""Handles agent restart and router update. Fetches firewall groups from
plugin and updates driver.
"""Handles agent restart and router update. Fetches firewall groups
from plugin and updates driver.
"""
if not self.fwaas_enabled:
return

View File

@ -239,8 +239,8 @@ class FWLoggingTestBase(framework.L3AgentTestFramework):
with mock.patch.object(self.resource_rpc,
'get_sg_log_info_for_port',
return_value=log_info):
self.log_driver.start_logging(self.context,
router_info=router_info)
self.log_driver.start_logging(self.context,
router_info=router_info)
elif log_resources:
with mock.patch.object(self.resource_rpc,
'get_sg_log_info_for_log_resources',

View File

@ -1,7 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
hacking>=1.1.0,<1.2.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
flake8-import-order==0.12 # LGPLv3

View File

@ -154,7 +154,10 @@ ignore-path = .venv,.git,.tox,.tmp,*neutron_fwaas/locale*,*lib/python*,neutron_f
# H205: Use assert(Greater|Less)(Equal) for comparison
# H904: Delay string interpolations at logging calls
# N521: jsonutils.loads must be used instead of json.loads
ignore = E125,E126,E128,E129,E265,H404,H405,N530,N521
# W504 line break after binary operator
# (W503 and W504 are incompatible and we need to choose one of them.
# Existing codes follows W503, so we disable W504.)
ignore = E125,E126,E128,E129,E265,H404,H405,N530,N521,W504
enable-extensions=H106,H203,H204,H205,H904
show-source = true
exclude = .venv,.git,.tox,dist,doc,*lib/python*,.tmp,*egg,build,tools,.ropeproject,rally-scenarios