Updated for comments
@@ -105,7 +105,6 @@ import fit_path # NOQA: unused import
from nose.plugins.attrib import attr
import fit_common
import flogging
-import time
import sys
log = flogging.get_loggers()
@@ -116,7 +115,7 @@ NODECATALOG = fit_common.node_select()
NODE_STATUS = {}
# global timer
-START_TIME = time.time()
+START_TIME = fit_common.time.time()
# collect repo information from config files
OSLIST = fit_common.fitcfg()["install-config"]["os-install"]
@@ -133,14 +132,14 @@ rackhdhost = "http://" + str(rackhdconfig['apiServerAddress']) + ":" + str(rackh
# this routine polls a workflow task ID for completion
def wait_for_workflow_complete(taskid):
result = None
- while time.time() - START_TIME < 1800 or result is None: # limit test to 30 minutes
+ while fit_common.time.time() - START_TIME < 1800 or result is None: # limit test to 30 minutes
result = fit_common.rackhdapi("/api/2.0/workflows/" + taskid)
if result['status'] != 200:
log.error(" HTTP error: " + result['text'])
return False
if result['json']['status'] == 'running' or result['json']['status'] == 'pending':
log.info_5("{} workflow status: {}".format(result['json']['injectableName'], result['json']['status']))
- time.sleep(30)
+ fit_common.time.sleep(30)
elif result['json']['status'] == 'succeeded':
log.info_5("{} workflow status: {}".format(result['json']['injectableName'], result['json']['status']))
return True
@@ -172,7 +171,7 @@ for item in OSLIST:
# ------------------------ Tests -------------------------------------
-@attr(all=True)
+@attr(all=False)
class api20_bootstrap_base(fit_common.unittest.TestCase):
@classmethod
def setUpClass(cls):
@@ -232,7 +231,8 @@ class api20_bootstrap_base(fit_common.unittest.TestCase):
"version": item['version'],
"kvm": item['kvm'],
'id': "failed"}
- log.error(" TaskID: " + result['text'])
+ log.error(" OS install " + item['workflow'] + " on node " + NODECATALOG[nodeindex] + " failed! ")
+ log.error(" Error text: " + result['text'])
log.error(" Payload: " + fit_common.json.dumps(payload_data))
# increment node index to run next bootstrap
nodeindex += 1
