X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fcommon%2Fconstants.py;h=153bd4bf4f5bf7d8084eb2bb0c3cf2b5916fff00;hb=700e7a8d92b373b42e0f406b9c58c6961c7f9e6f;hp=32ed746dfaa149ccf774570eb59466cec293566a;hpb=eb5b2735fe9907d38fa8f64df1efbe979158d7ec;p=yardstick.git diff --git a/yardstick/common/constants.py b/yardstick/common/constants.py index 32ed746df..153bd4bf4 100644 --- a/yardstick/common/constants.py +++ b/yardstick/common/constants.py @@ -7,9 +7,9 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## from __future__ import absolute_import -import os -import errno +import errno +import os from functools import reduce import pkg_resources @@ -40,10 +40,8 @@ def get_param(key, default=''): try: with open(conf_file) as f: value = yaml_load(f) - except IOError: - pass - except OSError as e: - if e.errno != errno.EEXIST: + except (IOError, OSError) as e: + if e.errno != errno.ENOENT: raise else: CONF.update(value) @@ -85,6 +83,7 @@ YARDSTICK_ROOT_PATH = dirname( TASK_LOG_DIR = get_param('dir.tasklog', '/var/log/yardstick/') CONF_SAMPLE_DIR = join(REPOS_DIR, 'etc/yardstick/') ANSIBLE_DIR = join(REPOS_DIR, 'ansible') +ANSIBLE_ROLES_PATH = join(REPOS_DIR, 'ansible/roles/') SAMPLE_CASE_DIR = join(REPOS_DIR, 'samples') TESTCASE_DIR = join(YARDSTICK_ROOT_PATH, 'tests/opnfv/test_cases/') TESTSUITE_DIR = join(YARDSTICK_ROOT_PATH, 'tests/opnfv/test_suites/') @@ -146,6 +145,10 @@ BASE_URL = 'http://localhost:5000' ENV_ACTION_API = BASE_URL + '/yardstick/env/action' ASYNC_TASK_API = BASE_URL + '/yardstick/asynctask' +# flags +IS_EXISTING = 'is_existing' +IS_PUBLIC = 'is_public' + # general TESTCASE_PRE = 'opnfv_yardstick_' TESTSUITE_PRE = 'opnfv_'