aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-02-19 23:07:44 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-02-21 16:05:12 +0100
commitd7256df47ecbfb1cb0771a65f003a397a464d390 (patch)
tree64d294486b1a35de70eb8cd3c6fd7532012cc584
parentb37d3c78b2b7f1822dc6784c2ee5860d6bea6a5e (diff)
Unify security group operations
It updates juju_epc to conform with cloudify_ims and cloudify_vrouter regarding security group operations. Change-Id: I2bc4a16ec17f2836564df82d3ceddd3bc73ece7a Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--functest/opnfv_tests/vnf/epc/juju_epc.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.py b/functest/opnfv_tests/vnf/epc/juju_epc.py
index 7d7194cd..68979186 100644
--- a/functest/opnfv_tests/vnf/epc/juju_epc.py
+++ b/functest/opnfv_tests/vnf/epc/juju_epc.py
@@ -186,17 +186,17 @@ class JujuEpc(vnf.VnfOnBoarding):
def _add_custom_rule(self, sec_grp_name):
""" To add custom rule for SCTP Traffic """
sec_grp_rules = list()
- security_group_init = OpenStackSecurityGroup(
+ sec_grp_rules.append(
+ SecurityGroupRuleConfig(
+ sec_grp_name=sec_grp_name, direction=Direction.ingress,
+ protocol=Protocol.sctp))
+ security_group = OpenStackSecurityGroup(
self.snaps_creds,
SecurityGroupConfig(
name=sec_grp_name,
rule_settings=sec_grp_rules))
- security_group_init.initialize()
- sctp_rule = SecurityGroupRuleConfig(
- sec_grp_name=sec_grp_name, direction=Direction.ingress,
- protocol=Protocol.sctp)
- security_group_init.add_rule(sctp_rule)
- self.created_object.append(security_group_init)
+ security_group.create()
+ self.created_object.append(security_group)
def prepare(self):
"""Prepare testcase (Additional pre-configuration steps)."""