aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2018-02-22 07:48:49 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-02-22 07:48:49 +0000
commit01b28068c727b54c34d5b20e3baad4c4e31d7761 (patch)
tree7306577e15a02c22f51e45d59849d5eb66f66c5d /functest/opnfv_tests
parent47c008e07f16b9a2d281707c50514f2f1237ce19 (diff)
parentd7256df47ecbfb1cb0771a65f003a397a464d390 (diff)
Merge "Unify security group operations"
Diffstat (limited to 'functest/opnfv_tests')
-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)."""