Add username in resource_setup
There is a condition when rhel is used as default image
in tempest, so default_image_is_advanced set as true
and validation.image_ssh_user is set but
advanced_image_ssh_user is not set.
test_fragmented_traffic_is_accepted was failing
because advanced_image_ssh_user was empty.
Change-Id: I7fa5b167ba27cc78e017765eca927a1dfb24825e
diff --git a/neutron_tempest_plugin/scenario/test_security_groups.py b/neutron_tempest_plugin/scenario/test_security_groups.py
index e2d25ee..3d075b4 100644
--- a/neutron_tempest_plugin/scenario/test_security_groups.py
+++ b/neutron_tempest_plugin/scenario/test_security_groups.py
@@ -1116,12 +1116,16 @@
def test_fragmented_traffic_is_accepted(self):
ssh_clients, fips, servers, security_groups = (
self._create_client_and_server_vms(use_advanced_image=True))
+ if CONF.neutron_plugin_options.default_image_is_advanced:
+ username = CONF.validation.image_ssh_user
+ else:
+ username = CONF.neutron_plugin_options.advanced_image_ssh_user
# make sure tcp connectivity to vms works fine
for fip in fips.values():
self.check_connectivity(
fip['floating_ip_address'],
- CONF.neutron_plugin_options.advanced_image_ssh_user,
+ username,
self.keypair['private_key'])
# Check that ICMP packets bigger than MTU aren't working without