Bump hacking
hacking 4.0.x is quite old. Bump it to the version currently used by neutron and neutron-lib. Change-Id: Iba06a77570f594911f1a150b707c15eb361ef9ca
This commit is contained in:
parent
7fda4c742b
commit
6372f73e4c
@ -29,8 +29,8 @@ repos:
|
||||
- id: flake8
|
||||
name: flake8
|
||||
additional_dependencies:
|
||||
- hacking>=4.0.0,<4.1
|
||||
- flake8-import-order==0.18.1
|
||||
- hacking>=6.1.0,<6.2.0
|
||||
- flake8-import-order>=0.18.0,<0.19.0
|
||||
- isort==4.3.21
|
||||
language: python
|
||||
entry: flake8
|
||||
|
@ -151,11 +151,11 @@ OPENSWAN_CONNECTION_DETAILS = '''# rightsubnet=networkA/netmaskA, networkB/netma
|
||||
# [lifetime_value]
|
||||
lifetime=%(life_time)ss
|
||||
# lifebytes=100000 if lifetime_units=kilobytes (IKEv2 only)
|
||||
'''
|
||||
''' # noqa: E501
|
||||
|
||||
IPV4_NEXT_HOP = '''# NOTE: a default route is required for %defaultroute to work...
|
||||
leftnexthop=%defaultroute
|
||||
rightnexthop=%defaultroute'''
|
||||
rightnexthop=%defaultroute''' # noqa: E501
|
||||
|
||||
IPV6_NEXT_HOP = '''# To recognize the given IP addresses in this config
|
||||
# as IPv6 addresses by pluto whack. Default is ipv4
|
||||
@ -310,7 +310,7 @@ PLUTO_MULTIPLE_SUBNETS_ESTABLISHED_STATUS = """000 "%(conn_id1)s/1x1": erouted;\
|
||||
newest IPSEC;\n
|
||||
000 "%(conn_id2)s/2x1": erouted;\n
|
||||
000 #4: "%(conn_id2)s/2x1":500 STATE_QUICK_R2 (IPsec SA established); \
|
||||
newest IPSEC;\n""" % {
|
||||
newest IPSEC;\n""" % { # noqa: E501
|
||||
'conn_id1': FAKE_IPSEC_SITE_CONNECTION1_ID,
|
||||
'conn_id2': FAKE_IPSEC_SITE_CONNECTION2_ID}
|
||||
PLUTO_ACTIVE_NO_IPSEC_SA_STATUS = """000 "%(conn_id)s/0x1": erouted;\n
|
||||
|
@ -102,7 +102,7 @@ class VpnBase(rally_base.OpenStackScenario):
|
||||
router["router"]["external_gateway_info"]
|
||||
["external_fixed_ips"][0]["ip_address"])
|
||||
|
||||
if(kwargs["DVR_flag"]):
|
||||
if kwargs["DVR_flag"]:
|
||||
ns, controller = vpn_utils.wait_for_namespace_creation(
|
||||
"snat-", router["router"]['id'],
|
||||
kwargs['controller_creds'],
|
||||
@ -137,7 +137,7 @@ class VpnBase(rally_base.OpenStackScenario):
|
||||
self.keypairs.append(keypair)
|
||||
self.server_private_ips.append(vpn_utils.get_server_ip(
|
||||
self.nova_client, server.id, self.suffixes[x]))
|
||||
if(kwargs["DVR_flag"]):
|
||||
if kwargs["DVR_flag"]:
|
||||
qrouter, compute = vpn_utils.wait_for_namespace_creation(
|
||||
"qrouter-", self.router_ids[x],
|
||||
kwargs['compute_creds'],
|
||||
@ -163,8 +163,8 @@ class VpnBase(rally_base.OpenStackScenario):
|
||||
LOG.debug("VERIFY ROUTE EXISTS BETWEEN THE ROUTER GATEWAYS")
|
||||
for tuple in self.ns_controller_tuples:
|
||||
for ip in self.rally_router_gw_ips:
|
||||
assert(vpn_utils.ping_router_gateway(
|
||||
tuple, ip, self.private_key_file)), (
|
||||
assert vpn_utils.ping_router_gateway(
|
||||
tuple, ip, self.private_key_file), (
|
||||
"PING TO IP " + ip + " FAILED")
|
||||
|
||||
@atomic.action_timer("_create_ike_policy")
|
||||
@ -410,7 +410,7 @@ class VpnBase(rally_base.OpenStackScenario):
|
||||
tcpdump_future = e.submit(vpn_utils.start_tcpdump,
|
||||
self.ns_controller_tuples[peer_index],
|
||||
qg_interface, self.private_key_file)
|
||||
if(kwargs["DVR_flag"]):
|
||||
if kwargs["DVR_flag"]:
|
||||
ssh_future = e.submit(
|
||||
vpn_utils.ssh_and_ping_server,
|
||||
self.server_private_ips[local_index],
|
||||
@ -426,7 +426,7 @@ class VpnBase(rally_base.OpenStackScenario):
|
||||
self.local_key_files[local_index],
|
||||
self.private_key_file)
|
||||
|
||||
assert(ssh_future.result()), "SSH/Ping failed"
|
||||
assert ssh_future.result(), "SSH/Ping failed"
|
||||
for line in tcpdump_future.result():
|
||||
if 'ESP' in line:
|
||||
return True
|
||||
@ -437,11 +437,11 @@ class VpnBase(rally_base.OpenStackScenario):
|
||||
|
||||
LOG.debug("VERIFY THE VPN CONNECTIVITY")
|
||||
with LOCK:
|
||||
assert(self._verify_vpn_connectivity(
|
||||
0, 1, **kwargs)), "VPN CONNECTION FAILED"
|
||||
assert self._verify_vpn_connectivity(
|
||||
0, 1, **kwargs), "VPN CONNECTION FAILED"
|
||||
with LOCK:
|
||||
assert(self._verify_vpn_connectivity(
|
||||
1, 0, **kwargs)), "VPN CONNECTION FAILED"
|
||||
assert self._verify_vpn_connectivity(
|
||||
1, 0, **kwargs), "VPN CONNECTION FAILED"
|
||||
|
||||
def update_router(self, router_id, admin_state_up=False):
|
||||
"""Update router's admin_state_up field
|
||||
|
@ -306,7 +306,7 @@ def assert_server_status(server, **kwargs):
|
||||
timeout=kwargs["nova_server_boot_timeout"],
|
||||
check_interval=5)
|
||||
LOG.debug("SERVER STATUS: %s", server.status)
|
||||
assert('ACTIVE' == server.status), ("THE INSTANCE IS NOT IN ACTIVE STATE")
|
||||
assert ('ACTIVE' == server.status), ("THE INSTANCE IS NOT IN ACTIVE STATE")
|
||||
|
||||
|
||||
def get_server_ip(nova_client, server_id, network_suffix):
|
||||
|
@ -1,7 +1,6 @@
|
||||
# Requirements lower bounds listed here are our best effort to keep them up to
|
||||
# date but we do not test them so no guarantee of having them all correct. If
|
||||
# you find any incorrect lower bounds, let us know or propose a fix.
|
||||
|
||||
pbr>=4.0.0 # Apache-2.0
|
||||
|
||||
Jinja2>=2.10 # BSD License (3 clause)
|
||||
|
4
tox.ini
4
tox.ini
@ -72,8 +72,8 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
|
||||
[testenv:pep8]
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
hacking>=4.0.0,<4.1 # Apache-2.0
|
||||
flake8-import-order==0.18.1 # LGPLv3
|
||||
hacking>=6.1.0,<6.2.0 # Apache-2.0
|
||||
flake8-import-order>=0.18.0,<0.19.0 # LGPLv3
|
||||
pylint==3.2.0 # GPLv2
|
||||
isort==4.3.21 # MIT
|
||||
commands =
|
||||
|
Loading…
Reference in New Issue
Block a user