Update hacking version

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

Change-Id: I3a44612452f6253287641625b148ae7223eaaf1d
This commit is contained in:
zhulingjie 2019-01-05 01:08:34 +08:00 committed by caoyuan
parent e144f17bf7
commit 4b10bef471
9 changed files with 19 additions and 18 deletions

View File

@ -30,8 +30,8 @@ class TestGlanceV2Driver(manager_congress.ScenarioPolicyBase):
@classmethod
def skip_checks(cls):
super(TestGlanceV2Driver, cls).skip_checks()
if not (CONF.network.project_networks_reachable
or CONF.network.public_network_id):
if not (CONF.network.project_networks_reachable or
CONF.network.public_network_id):
msg = ('Either project_networks_reachable must be "true", or '
'public_network_id must be defined.')
cls.enabled = False

View File

@ -36,8 +36,8 @@ class TestMuranoDriver(manager_congress.ScenarioPolicyBase):
cls.__class__.__name__)
raise cls.skipException(msg)
if not (CONF.network.project_networks_reachable
or CONF.network.public_network_id):
if not (CONF.network.project_networks_reachable or
CONF.network.public_network_id):
msg = ('Either project_networks_reachable must be "true", or '
'public_network_id must be defined.')
cls.enabled = False

View File

@ -34,8 +34,8 @@ class TestNeutronV2Driver(manager_congress.ScenarioPolicyBase):
@classmethod
def skip_checks(cls):
super(TestNeutronV2Driver, cls).skip_checks()
if not (CONF.network.project_networks_reachable
or CONF.network.public_network_id):
if not (CONF.network.project_networks_reachable or
CONF.network.public_network_id):
msg = ('Either project_networks_reachable must be "true", or '
'public_network_id must be defined.')
cls.enabled = False

View File

@ -37,8 +37,8 @@ class TestNeutronV2QosDriver(manager_congress.ScenarioPolicyBase):
def skip_checks(cls):
super(TestNeutronV2QosDriver, cls).skip_checks()
# TODO(qos): check whether QoS extension is enabled
if not (CONF.network.project_networks_reachable
or CONF.network.public_network_id):
if not (CONF.network.project_networks_reachable or
CONF.network.public_network_id):
msg = ('Either project_networks_reachable must be "true", or '
'public_network_id must be defined.')
cls.enabled = False

View File

@ -34,8 +34,8 @@ class TestNovaDriver(manager_congress.ScenarioPolicyBase):
skip_msg = ("%s skipped as nova is not available" % cls.__name__)
raise cls.skipException(skip_msg)
if not (CONF.network.project_networks_reachable
or CONF.network.public_network_id):
if not (CONF.network.project_networks_reachable or
CONF.network.public_network_id):
msg = ('Either project_networks_reachable must be "true", or '
'public_network_id must be defined.')
cls.enabled = False

View File

@ -589,8 +589,8 @@ class NetworkScenarioTest(ScenarioTest):
port_map = [(p["id"], fxip["ip_address"])
for p in ports
for fxip in p["fixed_ips"]
if netutils.is_valid_ipv4(fxip["ip_address"])
and p['status'] in p_status]
if netutils.is_valid_ipv4(fxip["ip_address"]) and
p['status'] in p_status]
inactive = [p for p in ports if p['status'] != 'ACTIVE']
if inactive:
LOG.warning("Instance has ports that are not ACTIVE: %s", inactive)

View File

@ -35,8 +35,8 @@ class TestPolicyBasicOps(manager_congress.ScenarioPolicyBase):
@classmethod
def skip_checks(cls):
super(TestPolicyBasicOps, cls).skip_checks()
if not (CONF.network.project_networks_reachable
or CONF.network.public_network_id):
if not (CONF.network.project_networks_reachable or
CONF.network.public_network_id):
msg = ('Either project_networks_reachable must be "true", or '
'public_network_id must be defined.')
cls.enabled = False
@ -246,8 +246,8 @@ class TestCongressDataSources(manager_congress.ScenarioPolicyBase):
@classmethod
def skip_checks(cls):
super(TestCongressDataSources, cls).skip_checks()
if not (CONF.network.project_networks_reachable
or CONF.network.public_network_id):
if not (CONF.network.project_networks_reachable or
CONF.network.public_network_id):
msg = ('Either project_networks_reachable must be "true", or '
'public_network_id must be defined.')
cls.enabled = False

View File

@ -2,7 +2,7 @@
# 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
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD

View File

@ -49,8 +49,9 @@ commands = oslo_debug_helper {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
# E731 skipped as assign a lambda expression
show-source = True
ignore = E123,E125
ignore = E123,E125,E731
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build