diff options
author | Cedric Ollivier <cedric.ollivier@orange.com> | 2018-02-22 07:48:49 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-02-22 07:48:49 +0000 |
commit | 01b28068c727b54c34d5b20e3baad4c4e31d7761 (patch) | |
tree | 7306577e15a02c22f51e45d59849d5eb66f66c5d | |
parent | 47c008e07f16b9a2d281707c50514f2f1237ce19 (diff) | |
parent | d7256df47ecbfb1cb0771a65f003a397a464d390 (diff) |
Merge "Unify security group operations"
-rw-r--r-- | functest/opnfv_tests/vnf/epc/juju_epc.py | 14 |
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).""" |