From 642987dcca77cdf1ae551d824ab44272f3406f70 Mon Sep 17 00:00:00 2001 From: boucherv Date: Wed, 21 Jun 2017 16:37:56 +0200 Subject: [cloudify_ims] Support Cloudify 4.0 - Delete all shell commands to use cloudify python lib - Cloudify Manager installation with a packaged image - SNAPS integration - Adapt test_vnf unit tests - Initiate test cloudify_ims unit tests (to be completed) JIRA: FUNCTEST-838 Change-Id: Ia4b499d4155e6af5d37d6d5cf4310a5a9693c7ce Signed-off-by: boucherv Signed-off-by: Morgan Richomme --- functest/opnfv_tests/vnf/ims/clearwater_ims_base.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'functest/opnfv_tests/vnf/ims/clearwater_ims_base.py') diff --git a/functest/opnfv_tests/vnf/ims/clearwater_ims_base.py b/functest/opnfv_tests/vnf/ims/clearwater_ims_base.py index c1a35be3..25ddca21 100644 --- a/functest/opnfv_tests/vnf/ims/clearwater_ims_base.py +++ b/functest/opnfv_tests/vnf/ims/clearwater_ims_base.py @@ -11,6 +11,7 @@ import logging import os import pkg_resources import shutil +import time import requests @@ -71,7 +72,17 @@ class ClearwaterOnBoardingBase(vnf.VnfOnBoarding): ellis_ip, params['email']) self.logger.info('Create 1st calling number on Ellis') - number_res = self.create_ellis_number(number_url, cookies) + i = 24 + while rq.status_code != 200 and i > 0: + try: + number_res = self.create_ellis_number(number_url, cookies) + break + except: + if i == 1: + raise Exception("Unable to create a number") + self.logger.warn("Unable to create a number. Retry ..") + time.sleep(25) + i = i - 1 output_dict['number'] = number_res if two_numbers: -- cgit 1.2.3-korg