aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2018-09-19 19:24:11 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-09-19 19:24:11 +0000
commit985508f0d0612414be46165e9d1af42ad33a1143 (patch)
treee1ec44277e71e2908e2a0918ff1325f861966803
parent488d974effc817840fd8a4a332c6e9679f6b3639 (diff)
parent7488f119f9d9c61c61ef55d53f87de0e671fed23 (diff)
Merge "Modify creation of SecGroup Rule for SSH"
-rw-r--r--functest/opnfv_tests/vnf/ims/cloudify_ims.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/functest/opnfv_tests/vnf/ims/cloudify_ims.py b/functest/opnfv_tests/vnf/ims/cloudify_ims.py
index f7931b7b7..08699e4bb 100644
--- a/functest/opnfv_tests/vnf/ims/cloudify_ims.py
+++ b/functest/opnfv_tests/vnf/ims/cloudify_ims.py
@@ -169,8 +169,18 @@ class CloudifyIms(cloudify.Cloudify):
"""Deploy Clearwater IMS."""
start_time = time.time()
+ secgroups = self.cloud.list_security_groups(
+ filters={'name': 'default',
+ 'project_id': self.project.project.id})
+ if secgroups:
+ secgroup = secgroups[0]
+ else:
+ self.__logger.error("No 'default' security group in project %s",
+ self.project.project.name)
+ return False
+
self.cloud.create_security_group_rule(
- 'default', port_range_min=22, port_range_max=22,
+ secgroup.id, port_range_min=22, port_range_max=22,
protocol='tcp', direction='ingress')
self.__logger.info("Upload VNFD")