summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Pisarski <s.pisarski@cablelabs.com>2018-04-12 16:59:54 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-04-12 16:59:54 +0000
commitd9d0ae71f0ccdfe9bf67e90a3242e23a8adbbd88 (patch)
tree538da5222d590ebad95b4e75c66f7a76f78841a0
parent20b1d60dc05690cd410ec763efb336f349f649f9 (diff)
parenta68cbbae1509d2e4c33cff8b6226cf6e83c58251 (diff)
Merge "Fixing security group in CreateInstanceTwoNetTests"
-rw-r--r--snaps/openstack/tests/create_instance_tests.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/snaps/openstack/tests/create_instance_tests.py b/snaps/openstack/tests/create_instance_tests.py
index c0e3195..ce58a01 100644
--- a/snaps/openstack/tests/create_instance_tests.py
+++ b/snaps/openstack/tests/create_instance_tests.py
@@ -2902,14 +2902,17 @@ class CreateInstanceTwoNetTests(OSIntegrationTestCase):
metadata=self.flavor_metadata))
self.flavor_creator.create()
- sec_grp_name = self.guid + '-sec-grp'
+ self.sec_grp_name = self.guid + '-sec-grp'
rule1 = SecurityGroupRuleConfig(
- sec_grp_name=sec_grp_name, direction=Direction.ingress,
+ sec_grp_name=self.sec_grp_name, direction=Direction.ingress,
+ protocol=Protocol.icmp)
+ rule2 = SecurityGroupRuleConfig(
+ sec_grp_name=self.sec_grp_name, direction=Direction.egress,
protocol=Protocol.icmp)
self.sec_grp_creator = OpenStackSecurityGroup(
self.os_creds,
SecurityGroupConfig(
- name=sec_grp_name, rule_settings=[rule1]))
+ name=self.sec_grp_name, rule_settings=[rule1, rule2]))
self.sec_grp_creator.create()
except:
self.tearDown()
@@ -2989,6 +2992,7 @@ class CreateInstanceTwoNetTests(OSIntegrationTestCase):
name=self.vm_inst1_name,
flavor=self.flavor_creator.flavor_settings.name,
userdata=_get_ping_userdata(self.ip2),
+ security_group_names=self.sec_grp_name,
port_settings=[PortConfig(
name=self.port_1_name,
ip_addrs=[{
@@ -3001,6 +3005,7 @@ class CreateInstanceTwoNetTests(OSIntegrationTestCase):
name=self.vm_inst2_name,
flavor=self.flavor_creator.flavor_settings.name,
userdata=_get_ping_userdata(self.ip1),
+ security_group_names=self.sec_grp_name,
port_settings=[PortConfig(
name=self.port_2_name,
ip_addrs=[{