aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils
diff options
context:
space:
mode:
Diffstat (limited to 'functest/utils')
-rw-r--r--functest/utils/env.py2
-rwxr-xr-xfunctest/utils/functest_logger.py2
-rw-r--r--functest/utils/functest_utils.py7
-rw-r--r--functest/utils/openstack_tacker.py5
4 files changed, 14 insertions, 2 deletions
diff --git a/functest/utils/env.py b/functest/utils/env.py
index fa5245fb..7e4df2ea 100644
--- a/functest/utils/env.py
+++ b/functest/utils/env.py
@@ -3,7 +3,7 @@ import re
default_envs = {
'NODE_NAME': 'unknown_pod',
- 'CI_DEBUG': 'true',
+ 'CI_DEBUG': 'false',
'DEPLOY_SCENARIO': 'os-nosdn-nofeature-noha',
'DEPLOY_TYPE': 'virt',
'INSTALLER_TYPE': None,
diff --git a/functest/utils/functest_logger.py b/functest/utils/functest_logger.py
index 6dc46ef2..022211cb 100755
--- a/functest/utils/functest_logger.py
+++ b/functest/utils/functest_logger.py
@@ -29,7 +29,7 @@ import json
from functest.utils.constants import CONST
-class Logger:
+class Logger(object):
def __init__(self, logger_name):
self.setup_logging()
diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py
index 17e988b7..dbed811a 100644
--- a/functest/utils/functest_utils.py
+++ b/functest/utils/functest_utils.py
@@ -291,6 +291,13 @@ def get_ci_envvars():
return ci_env_var
+def execute_command_raise(cmd, info=False, error_msg="",
+ verbose=True, output_file=None):
+ ret = execute_command(cmd, info, error_msg, verbose, output_file)
+ if ret != 0:
+ raise Exception(error_msg)
+
+
def execute_command(cmd, info=False, error_msg="",
verbose=True, output_file=None):
if not error_msg:
diff --git a/functest/utils/openstack_tacker.py b/functest/utils/openstack_tacker.py
index 07acc8b3..8327fdbe 100644
--- a/functest/utils/openstack_tacker.py
+++ b/functest/utils/openstack_tacker.py
@@ -176,6 +176,11 @@ def wait_for_vnf(tacker_client, vnf_id=None, vnf_name=None, timeout=60):
elif vnf['status'] == 'PENDING_CREATE':
time.sleep(3)
timeout -= 3
+ vnf = get_vnf(tacker_client, vnf_id, vnf_name)
+
+ if (timeout < 0):
+ raise Exception('Timeout when booting vnf %s' % vnf['id'])
+
return vnf['id']
except Exception, e:
logger.error("error [wait_for_vnf(tacker_client, '%s', '%s')]: %s"