aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/vnf/ims/clearwater_ims_base.py
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2017-07-05 11:03:23 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-07-05 11:03:23 +0000
commitec195ca9677022725b28d7e363ae47bebc512680 (patch)
treea61cb983fec57bf98eaafe6b70d29804c1569343 /functest/opnfv_tests/vnf/ims/clearwater_ims_base.py
parent4ec87bd88fe9b176a61ff13b5e50b8ede4f3498f (diff)
parent642987dcca77cdf1ae551d824ab44272f3406f70 (diff)
Merge "[cloudify_ims] Support Cloudify 4.0"
Diffstat (limited to 'functest/opnfv_tests/vnf/ims/clearwater_ims_base.py')
-rw-r--r--functest/opnfv_tests/vnf/ims/clearwater_ims_base.py13
1 files changed, 12 insertions, 1 deletions
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: