From d7256df47ecbfb1cb0771a65f003a397a464d390 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Ollivier?= Date: Mon, 19 Feb 2018 23:07:44 +0100 Subject: [PATCH] Unify security group operations MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- functest/opnfv_tests/vnf/epc/juju_epc.py | 14 +++++++------- 1 file 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 7d7194cdb..689791862 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).""" -- 2.16.6