Merge "Remove transition logic for old tempest option renaming"
diff --git a/neutron_tempest_plugin/api/test_security_groups.py b/neutron_tempest_plugin/api/test_security_groups.py
index 6992399..37cd80b 100644
--- a/neutron_tempest_plugin/api/test_security_groups.py
+++ b/neutron_tempest_plugin/api/test_security_groups.py
@@ -386,7 +386,7 @@
self.admin_client.update_quotas(project_id,
**{'security_group_rule': val,
'force': True})
- LOG.info('Trying to update security group rule quota {} '.format(val))
+ LOG.info('Trying to update security group rule quota %r', val)
def _get_sg_rules_quota(self):
project_id = self.client.project_id
diff --git a/neutron_tempest_plugin/common/utils.py b/neutron_tempest_plugin/common/utils.py
index 6bc290b..62191bf 100644
--- a/neutron_tempest_plugin/common/utils.py
+++ b/neutron_tempest_plugin/common/utils.py
@@ -194,29 +194,29 @@
sleep=self.test_sleep)
try:
LOG.info("Checking connectivity between server and client -"
- " attempt {}".format(self.test_attempt))
+ " attempt %d", self.test_attempt)
self.server_ssh.exec_command(
'grep {} output.txt'.format(self.test_str))
self.client_ssh.exec_command(
'grep {} output.txt'.format(self.test_str))
if not self.should_pass:
- LOG.warning("attempt {} succeed while it should fail".format(
- self.test_attempt))
+ LOG.warning("attempt %d succeed while it should fail",
+ self.test_attempt)
return False
else:
if not self.connection_started:
self.connection_started = True
- LOG.info("attempt {} succeed as it expected".format(
- self.test_attempt))
+ LOG.info("attempt %d succeed as it expected",
+ self.test_attempt)
return True
except exceptions.SSHExecCommandFailed:
if self.should_pass:
- LOG.warning("attempt {} failed while it should pass".format(
- self.test_attempt))
+ LOG.warning("attempt %d failed while it should pass",
+ self.test_attempt)
return False
else:
- LOG.info("attempt {} failed as it expected".format(
- self.test_attempt))
+ LOG.info("attempt %d failed as it expected",
+ self.test_attempt)
return True
finally:
self.test_attempt += 1
diff --git a/neutron_tempest_plugin/fwaas/scenario/test_fwaas_v2.py b/neutron_tempest_plugin/fwaas/scenario/test_fwaas_v2.py
index 9896073..8468671 100644
--- a/neutron_tempest_plugin/fwaas/scenario/test_fwaas_v2.py
+++ b/neutron_tempest_plugin/fwaas/scenario/test_fwaas_v2.py
@@ -89,9 +89,9 @@
(ssh_source, remote_ip, should_connect),
msg)
except Exception:
- LOG.exception("Unable to access {dest} via ssh to "
- "floating-ip {src}".format(dest=remote_ip,
- src=floating_ip))
+ LOG.exception("Unable to access %s via ssh to "
+ "floating-ip %s",
+ remote_ip, floating_ip)
raise
def _check_remote_connectivity(self, source, dest, should_succeed=True,
diff --git a/neutron_tempest_plugin/neutron_dynamic_routing/api/test_bgp_speaker_extensions.py b/neutron_tempest_plugin/neutron_dynamic_routing/api/test_bgp_speaker_extensions.py
index 5cdd524..1d089f6 100644
--- a/neutron_tempest_plugin/neutron_dynamic_routing/api/test_bgp_speaker_extensions.py
+++ b/neutron_tempest_plugin/neutron_dynamic_routing/api/test_bgp_speaker_extensions.py
@@ -177,7 +177,7 @@
bgp_speaker = self.get_bgp_speaker(bgp_speaker_id)
bgp_peers_list = bgp_speaker['peers']
self.assertEqual(1, len(bgp_peers_list))
- self.assertTrue(bgp_peer_id in bgp_peers_list)
+ self.assertIn(bgp_peer_id, bgp_peers_list)
@decorators.idempotent_id('f9737708-1d79-440b-8350-779f97d882ee')
def test_remove_bgp_peer(self):
@@ -188,7 +188,7 @@
self.add_bgp_peer(bgp_speaker_id, bgp_peer_id)
bgp_speaker = self.get_bgp_speaker(bgp_speaker_id)
bgp_peers_list = bgp_speaker['peers']
- self.assertTrue(bgp_peer_id in bgp_peers_list)
+ self.assertIn(bgp_peer_id, bgp_peers_list)
bgp_speaker = self.remove_bgp_peer(bgp_speaker_id, bgp_peer_id)
bgp_speaker = self.get_bgp_speaker(bgp_speaker_id)
@@ -206,7 +206,7 @@
bgp_speaker = self.get_bgp_speaker(bgp_speaker_id)
network_list = bgp_speaker['networks']
self.assertEqual(1, len(network_list))
- self.assertTrue(self.ext_net_id in network_list)
+ self.assertIn(self.ext_net_id, network_list)
@decorators.idempotent_id('6cfc7137-0d99-4a3d-826c-9d1a3a1767b0')
def test_remove_gateway_network(self):
@@ -218,7 +218,7 @@
bgp_speaker = self.get_bgp_speaker(bgp_speaker_id)
networks = bgp_speaker['networks']
- self.assertTrue(self.ext_net_id in networks)
+ self.assertIn(self.ext_net_id, networks)
self.bgp_adm_client.remove_bgp_gateway_network(bgp_speaker_id,
self.ext_net_id)
bgp_speaker = self.get_bgp_speaker(bgp_speaker_id)
diff --git a/neutron_tempest_plugin/scenario/test_mtu.py b/neutron_tempest_plugin/scenario/test_mtu.py
index 99c5130..29ccb01 100644
--- a/neutron_tempest_plugin/scenario/test_mtu.py
+++ b/neutron_tempest_plugin/scenario/test_mtu.py
@@ -227,37 +227,37 @@
@decorators.idempotent_id('bc470200-d8f4-4f07-b294-1b4cbaaa35b9')
def test_connectivity_min_max_mtu(self):
server_ssh_client, _, _, fip2 = self._create_setup()
- log_msg = ("Ping with {mtu_size} MTU of 2 networks. Fragmentation is "
- "{fragmentation_state}. Expected result: ping "
- "{ping_status}")
+ log_msg = ("Ping with %(mtu_size)s MTU of 2 networks. "
+ "Fragmentation is %(fragmentation_state)s. "
+ "Expected result: ping %(ping_status)s")
# ping with min mtu of 2 networks succeeds even when
# fragmentation is disabled
- LOG.debug(log_msg.format(mtu_size='minimal',
- fragmentation_state='disabled', ping_status='succeeded'))
+ LOG.debug(log_msg, mtu_size='minimal',
+ fragmentation_state='disabled', ping_status='succeeded')
self.check_remote_connectivity(
server_ssh_client, fip2['fixed_ip_address'],
mtu=self.networks[0]['mtu'], fragmentation=False)
# ping with the size above min mtu of 2 networks
# fails when fragmentation is disabled
- LOG.debug(log_msg.format(mtu_size='size above minimal',
- fragmentation_state='disabled', ping_status='failed'))
+ LOG.debug(log_msg, mtu_size='size above minimal',
+ fragmentation_state='disabled', ping_status='failed')
self.check_remote_connectivity(
server_ssh_client, fip2['fixed_ip_address'], should_succeed=False,
mtu=self.networks[0]['mtu'] + 2, fragmentation=False)
# ping with max mtu of 2 networks succeeds when
# fragmentation is enabled
- LOG.debug(log_msg.format(mtu_size='maximal',
- fragmentation_state='enabled', ping_status='succeeded'))
+ LOG.debug(log_msg, mtu_size='maximal',
+ fragmentation_state='enabled', ping_status='succeeded')
self.check_remote_connectivity(
server_ssh_client, fip2['fixed_ip_address'],
mtu=self.networks[1]['mtu'])
# ping with max mtu of 2 networks fails when fragmentation is disabled
- LOG.debug(log_msg.format(mtu_size='maximal',
- fragmentation_state='disabled', ping_status='failed'))
+ LOG.debug(log_msg, mtu_size='maximal',
+ fragmentation_state='disabled', ping_status='failed')
self.check_remote_connectivity(
server_ssh_client, fip2['fixed_ip_address'], should_succeed=False,
mtu=self.networks[1]['mtu'], fragmentation=False)
diff --git a/neutron_tempest_plugin/scenario/test_ports.py b/neutron_tempest_plugin/scenario/test_ports.py
index c661d39..56cedde 100644
--- a/neutron_tempest_plugin/scenario/test_ports.py
+++ b/neutron_tempest_plugin/scenario/test_ports.py
@@ -107,8 +107,8 @@
if port is not None:
break
except Exception as e:
- LOG.warning('Failed to create Port, using Fixed_IP:{}, '
- 'the Error was:{}'.format(ip, e))
+ LOG.warning('Failed to create Port, using Fixed_IP:%s, '
+ 'the Error was:%s', ip, e)
fip, server = self._create_instance_with_port(port)
self.check_connectivity(fip[0]['floating_ip_address'],
CONF.validation.image_ssh_user,
diff --git a/neutron_tempest_plugin/tap_as_a_service/scenario/test_traffic_impact.py b/neutron_tempest_plugin/tap_as_a_service/scenario/test_traffic_impact.py
index e70eb03..904335d 100644
--- a/neutron_tempest_plugin/tap_as_a_service/scenario/test_traffic_impact.py
+++ b/neutron_tempest_plugin/tap_as_a_service/scenario/test_traffic_impact.py
@@ -14,16 +14,15 @@
# under the License.
from contextlib import contextmanager
-from oslo_log import log
-import testtools
+from oslo_log import log
from tempest.common import utils
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils.linux import remote_client
from tempest.lib.common.utils import test_utils
-
from tempest.lib import decorators
+import testtools
from neutron_tempest_plugin.tap_as_a_service.scenario import manager
@@ -151,7 +150,7 @@
# Ensure tcpdump is up and running
psax = self.monitor_client.exec_command("ps -ax")
- self.assertTrue("tcpdump" in psax)
+ self.assertIn("tcpdump", psax)
# Run traffic from left_vm to right_vm
LOG.debug('Check ICMP traffic: ping %s ', right_ip)
diff --git a/test-requirements.txt b/test-requirements.txt
index 0151f21..ebde755 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,7 +1,7 @@
-hacking>=3.2.0,<3.3.0 # Apache-2.0
+hacking>=6.1.0,<6.2.0 # Apache-2.0
coverage>=4.4.1 # Apache-2.0
-flake8-import-order==0.12 # LGPLv3
+flake8-import-order>=0.18.0,<0.19.0 # LGPLv3
python-subunit>=1.0.0 # Apache-2.0/BSD
oslotest>=3.2.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
diff --git a/tox.ini b/tox.ini
index 2f7da5c..c8add2c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -62,9 +62,10 @@
# E126 continuation line over-indented for hanging indent
# E128 continuation line under-indented for visual indent
# E129 visually indented line with same indent as next logical line
+# I202 Additional newline in a group of imports.
# N530 direct neutron imports not allowed
# W504 line break after binary operator
-ignore = E126,E128,E129,N530,W504
+ignore = E126,E128,E129,I202,N530,W504
# H106: Don't put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
# H204: Use assert(Not)Equal to check for equality
diff --git a/zuul.d/master_jobs.yaml b/zuul.d/master_jobs.yaml
index 01dada3..9f07d79 100644
--- a/zuul.d/master_jobs.yaml
+++ b/zuul.d/master_jobs.yaml
@@ -1086,6 +1086,7 @@
- ^neutron/scheduler/.*$
- ^neutron/services/.*$
- ^neutron_tempest_plugin/api/test_.*$
+ - ^neutron_tempest_plugin/api/admin/test_.*$
- ^neutron_tempest_plugin/(bgpvpn|fwaas|neutron_dynamic_routing|sfc|tap_as_a_service|vpnaas).*$
- ^neutron_tempest_plugin/services/bgp/.*$
- ^rally-jobs/.*$
@@ -1192,6 +1193,7 @@
- ^neutron/tests/fullstack/.*
- ^neutron/tests/functional/.*
- ^neutron_tempest_plugin/api/test_.*$
+ - ^neutron_tempest_plugin/api/admin/test_.*$
- ^neutron_tempest_plugin/scenario/admin/.*$
- ^neutron_tempest_plugin/scenario/test_.*$
- ^neutron_tempest_plugin/(bgpvpn|fwaas|neutron_dynamic_routing|tap_as_a_service|vpnaas).*$
@@ -1272,6 +1274,7 @@
- ^neutron/tests/fullstack/.*
- ^neutron/tests/functional/.*
- ^neutron_tempest_plugin/api/test_.*$
+ - ^neutron_tempest_plugin/api/admin/test_.*$
- ^neutron_tempest_plugin/scenario/admin/.*$
- ^neutron_tempest_plugin/scenario/test_.*$
- ^neutron_tempest_plugin/(fwaas|neutron_dynamic_routing|sfc|tap_as_a_service|vpnaas).*$
@@ -1339,6 +1342,7 @@
- ^neutron/tests/fullstack/.*
- ^neutron/tests/functional/.*
- ^neutron_tempest_plugin/api/test_.*$
+ - ^neutron_tempest_plugin/api/admin/test_.*$
- ^neutron_tempest_plugin/scenario/admin/.*$
- ^neutron_tempest_plugin/scenario/test_.*$
- ^neutron_tempest_plugin/(bgpvpn|fwaas|sfc|tap_as_a_service|vpnaas).*$
@@ -1414,6 +1418,7 @@
- ^neutron/tests/fullstack/.*
- ^neutron/tests/functional/.*
- ^neutron_tempest_plugin/api/test_.*$
+ - ^neutron_tempest_plugin/api/admin/test_.*$
- ^neutron_tempest_plugin/scenario/admin/.*$
- ^neutron_tempest_plugin/scenario/test_.*$
- ^neutron_tempest_plugin/(bgpvpn|neutron_dynamic_routing|sfc|tap_as_a_service|vpnaas).*$
@@ -1495,6 +1500,7 @@
- ^neutron/tests/fullstack/.*
- ^neutron/tests/functional/.*
- ^neutron_tempest_plugin/api/test_.*$
+ - ^neutron_tempest_plugin/api/admin/test_.*$
- ^neutron_tempest_plugin/scenario/admin/.*$
- ^neutron_tempest_plugin/scenario/test_.*$
- ^neutron_tempest_plugin/(bgpvpn|fwaas|neutron_dynamic_routing|sfc|tap_as_a_service).*$
@@ -1566,6 +1572,7 @@
- ^neutron/tests/fullstack/.*
- ^neutron/tests/functional/.*
- ^neutron_tempest_plugin/api/test_.*$
+ - ^neutron_tempest_plugin/api/admin/test_.*$
- ^neutron_tempest_plugin/scenario/admin/.*$
- ^neutron_tempest_plugin/scenario/test_.*$
- ^neutron_tempest_plugin/(bgpvpn|fwaas|neutron_dynamic_routing|sfc|tap_as_a_service).*$
@@ -1687,6 +1694,7 @@
- ^neutron/tests/fullstack/.*
- ^neutron/tests/functional/.*
- ^neutron_tempest_plugin/api/test_.*$
+ - ^neutron_tempest_plugin/api/admin/test_.*$
- ^neutron_tempest_plugin/scenario/admin/.*$
- ^neutron_tempest_plugin/scenario/test_.*$
- ^neutron_tempest_plugin/(bgpvpn|fwaas|neutron_dynamic_routing|sfc|vpnaas).*$