Separate valid docker tags for functest and yardstick 67/53167/3
authorGeorg Kunz <georg.kunz@ericsson.com>
Tue, 6 Mar 2018 15:19:59 +0000 (16:19 +0100)
committerGeorg Kunz <georg.kunz@ericsson.com>
Tue, 6 Mar 2018 16:38:26 +0000 (16:38 +0000)
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>
docs/testing/user/userguide/cli_reference.rst
dovetail/run.py
etc/conf/cmd_config.yml
etc/conf/dovetail_config.yml

index 35915bc..39e72c9 100644 (file)
@@ -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                                                             |
 |                                                                        |                                                                                                   |
 +------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+
 
index b2ba91d..a615173 100755 (executable)
@@ -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 {}, "
index 91a44b0..4dbfbbc 100644 (file)
@@ -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'
index 47b4650..464d046 100644 (file)
@@ -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