Skip to content

Commit

Permalink
Merge "test_security_groups: Randomize SG names" into stable/pike
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Jun 19, 2018
2 parents c9e641c + 0dfc7ef commit 618b8b6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions neutron/tests/tempest/scenario/test_security_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from neutron_lib import constants

from tempest.common import waiters
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators

from neutron.tests.tempest.common import ssh
Expand Down Expand Up @@ -111,18 +112,20 @@ def test_protocol_number_rule(self):
@decorators.idempotent_id('3d73ec1a-2ec6-45a9-b0f8-04a283d9d964')
def test_two_sec_groups(self):
# add 2 sec groups to VM and test rules of both are working
ssh_secgrp_name = data_utils.rand_name('ssh_secgrp')
icmp_secgrp_name = data_utils.rand_name('icmp_secgrp')
ssh_secgrp = self.os_primary.network_client.create_security_group(
name='ssh_secgrp')
name=ssh_secgrp_name)
self.create_loginable_secgroup_rule(
secgroup_id=ssh_secgrp['security_group']['id'])
icmp_secgrp = self.os_primary.network_client.create_security_group(
name='icmp_secgrp')
name=icmp_secgrp_name)
self.create_pingable_secgroup_rule(
secgroup_id=icmp_secgrp['security_group']['id'])
for sec_grp in (ssh_secgrp, icmp_secgrp):
self.security_groups.append(sec_grp['security_group'])
security_groups_list = [{'name': 'ssh_secgrp'},
{'name': 'icmp_secgrp'}]
security_groups_list = [{'name': ssh_secgrp_name},
{'name': icmp_secgrp_name}]
server_ssh_clients, fips, servers = self.create_vm_testing_sec_grp(
num_servers=1, security_groups=security_groups_list)
# make sure ssh connectivity works
Expand Down

0 comments on commit 618b8b6

Please sign in to comment.