summaryrefslogtreecommitdiffstats
path: root/dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'dashboard')
-rw-r--r--dashboard/pushtoDB.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/dashboard/pushtoDB.py b/dashboard/pushtoDB.py
index d056c18b..44602628 100644
--- a/dashboard/pushtoDB.py
+++ b/dashboard/pushtoDB.py
@@ -19,7 +19,9 @@ def push_results_to_db(db_url, case_name, payload,logger=None, pod_name="dell-us
"version": "test" , "details": payload}
headers = {'Content-Type': 'application/json'}
- print json.dumps(params)
+ print pod_name
+ print installer
+ print creation_date
try:
r = requests.post(url, data=json.dumps(params), headers=headers)
@@ -41,10 +43,15 @@ def main():
global payload_list
populate_payload(suite_list)
- for suite,case in payload_list.items():
- with open('results/'+suite,'r') as result_file:
- j=json.load(result_file)
- push_results_to_db(TEST_DB, case , j)
+ if payload_list:
+ print payload_list
+ for suite,case in payload_list.items():
+ with open('results/'+suite,'r') as result_file:
+ j=json.load(result_file)
+ push_results_to_db(TEST_DB, case , j)
+ elif not payload_list:
+ print 'Results not found'
+
if __name__ == "__main__":
main()