summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Kunz <georg.kunz@ericsson.com>2018-03-06 16:19:59 +0100
committerGeorg Kunz <georg.kunz@ericsson.com>2018-03-06 16:38:26 +0000
commit189f27b7a90b6ddc74f1c3ede806e87d7548c539 (patch)
treed668342cc902f184b11e367271a56164761da91f
parented4e729d8e61b8bbfad51f294dd170c6c680dc43 (diff)
Separate valid docker tags for functest and yardstick
Specifying separate valid docker tags for functest and yardstick for input validation. DOVETAIL-592 Change-Id: I3365cdbd9ab521bf1368750c3f34b6863b3f7ec8 Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
-rw-r--r--docs/testing/user/userguide/cli_reference.rst6
-rwxr-xr-xdovetail/run.py22
-rw-r--r--etc/conf/cmd_config.yml6
-rw-r--r--etc/conf/dovetail_config.yml7
4 files changed, 22 insertions, 19 deletions
diff --git a/docs/testing/user/userguide/cli_reference.rst b/docs/testing/user/userguide/cli_reference.rst
index 35915bcc..39e72c93 100644
--- a/docs/testing/user/userguide/cli_reference.rst
+++ b/docs/testing/user/userguide/cli_reference.rst
@@ -71,13 +71,13 @@ Commands List
| dovetail run --report | -r <db_url> | Push results to local or official DB |
| | |
+------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+
-| dovetail run --yard_tag | -y <yardstick_docker_image_tag> | Specify yardstick's docker image tag, default is danube.3.2 |
+| dovetail run --yardstick_tag | -y <yardstick_docker_image_tag> | Specify yardstick's docker image tag |
| | |
+------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+
-| dovetail run --func_tag | -f <functest_docker_image_tag> | Specify functest's docker image tag, default is cvp.0.5.0 |
+| dovetail run --functest_tag | -f <functest_docker_image_tag> | Specify functest's docker image tag |
| | |
+------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+
-| dovetail run --bott_tag | -b <bottlenecks_docker_image_tag> | Specify bottlenecks' docker image tag, default is cvp.0.4.0 |
+| dovetail run --bottlenecks_tag | -b <bottlenecks_docker_image_tag> | Specify bottlenecks' docker image tag |
| | |
+------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+
diff --git a/dovetail/run.py b/dovetail/run.py
index b2ba91d8..a615173b 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -112,18 +112,20 @@ def check_tc_result(testcase, logger):
def validate_input(input_dict, check_dict, logger):
- # for 'func_tag' and 'yard_tag' options
- func_tag = input_dict['func_tag']
- yard_tag = input_dict['yard_tag']
+ func_tag = input_dict['functest_tag']
+ yard_tag = input_dict['yardstick_tag']
# bott_tag = input_dict['bott_tag']
- valid_tag = check_dict['valid_docker_tag']
- if func_tag is not None and func_tag not in valid_tag:
- logger.error("The input option 'func_tag' can't be {}, "
- "valid values are {}.".format(func_tag, valid_tag))
+ valid_functest_tags = check_dict['valid_functest_tags']
+ valid_yardstick_tags = check_dict['valid_yardstick_tags']
+ if func_tag is not None and func_tag not in valid_functest_tags:
+ logger.error("The input option 'functest_tag' can't be '{}', "
+ "valid values are {}.".format(func_tag,
+ valid_functest_tags))
raise SystemExit(1)
- if yard_tag is not None and yard_tag not in valid_tag:
- logger.error("The input option 'yard_tag' can't be {}, "
- "valid values are {}.".format(yard_tag, valid_tag))
+ if yard_tag is not None and yard_tag not in valid_yardstick_tags:
+ logger.error("The input option 'yardstick_tag' can't be '{}', "
+ "valid values are {}.".format(yard_tag,
+ valid_yardstick_tags))
raise SystemExit(1)
# if bott_tag is not None and bott_tag not in valid_tag:
# logger.error("The input option 'bott_tag' can't be {}, "
diff --git a/etc/conf/cmd_config.yml b/etc/conf/cmd_config.yml
index 91a44b0b..4dbfbbc8 100644
--- a/etc/conf/cmd_config.yml
+++ b/etc/conf/cmd_config.yml
@@ -17,21 +17,21 @@ cli:
config:
yard_tag:
flags:
- - '--yard_tag'
+ - '--yardstick_tag'
- '-y'
path:
- 'yardstick/docker_tag'
help: 'Overwrite tag for yardstick docker container (e.g. opnfv-5.1.0)'
func_tag:
flags:
- - '--func_tag'
+ - '--functest_tag'
- '-f'
path:
- 'functest/docker_tag'
help: 'Overwrite tag for functest docker container (e.g. euphrates)'
bott_tag:
flags:
- - '--bott_tag'
+ - '--bottlenecks_tag'
- '-b'
path:
- 'bottlenecks/docker_tag'
diff --git a/etc/conf/dovetail_config.yml b/etc/conf/dovetail_config.yml
index 47b46503..464d046c 100644
--- a/etc/conf/dovetail_config.yml
+++ b/etc/conf/dovetail_config.yml
@@ -93,11 +93,12 @@ test_project:
- 'bottlenecks'
validate_input:
- valid_docker_tag:
- - 'stable'
+ valid_functest_tags:
- 'latest'
- - 'danube.3.2'
- 'euphrates'
+ valid_yardstick_tags:
+ - 'latest'
+ - 'opnfv-5.1.0'
mandatory:
- osinterop