Merge "infra: infra-daily-jobs: Use of the infra-{smoketest,deploy} scripts"
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 13 Sep 2016 07:56:24 +0000 (07:56 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Tue, 13 Sep 2016 07:56:24 +0000 (07:56 +0000)
utils/lab-reconfiguration/reconfigUcsNet.py
utils/test/reporting/functest/reporting-status.py
utils/test/reporting/yardstick/reporting-status.py

index 45a72a3..4c08f3d 100755 (executable)
@@ -157,7 +157,7 @@ def read_yaml_file(yamlFile):
     """
     # TODO: add check if vnic templates specified in file exist on UCS
     with open(yamlFile, 'r') as stream:
-        return yaml.load(stream)
+        return yaml.safe_load(stream)
 
 
 def set_network(handle=None, yamlFile=None):
index e9e167d..0b80fe4 100755 (executable)
@@ -34,7 +34,7 @@ tempest = tc.TestCase("tempest_smoke_serial", "functest", -1)
 cf = conf.TEST_CONF
 response = requests.get(cf)
 
-functest_yaml_config = yaml.load(response.text)
+functest_yaml_config = yaml.safe_load(response.text)
 
 logger.info("*******************************************")
 logger.info("*   Generating reporting scenario status  *")
index 546bf08..d7a4e29 100644 (file)
@@ -32,6 +32,12 @@ for version in conf.versions:
     for installer in conf.installers:
         # get scenarios results data
         scenario_results = utils.getScenarioStatus(installer, version)
+        if 'colorado' == version:
+            stable_result = utils.getScenarioStatus(installer, 'stable/colorado')
+            for k,v in stable_result.items():
+                if not scenario_results.has_key(k):
+                    scenario_results[k] = []
+                scenario_results[k] += stable_result[k]
         scenario_result_criteria = {}
 
         # From each scenarios get results list
@@ -44,10 +50,10 @@ for version in conf.versions:
             scenario_score = 0
 
             for v in s_result:
-                if v['details'] == 'SUCCESS':
+                if v['criteria'] == 'SUCCESS':
                     scenario_score += 1
 
-            if scenario_score == scenario_criteria:
+            if scenario_score == scenario_criteria and scenario_criteria == 4:
                 s_status = 'OK'
                 logger.info(">>>>> scenario OK, save the information")
             else: