From ff966a7bbe9b2679c4022c3ff25bde3920d1d3a5 Mon Sep 17 00:00:00 2001 From: rforstner Date: Thu, 20 Jan 2022 20:14:06 +0100 Subject: [PATCH] adding new script --- Jenkinsfile | 2 +- createReport.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b372c6d..3e3af5c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -70,7 +70,7 @@ sh ''' sudo python3 -m ensurepip pip install --user --upgrade pip - pip3 install --user -r requirements.txt + pip install --user -r requirements.txt ''' print env.JENKINS_URL } diff --git a/createReport.py b/createReport.py index 2896c5c..32a3115 100644 --- a/createReport.py +++ b/createReport.py @@ -60,7 +60,11 @@ def getSLO(DTAPIToken, DTENV, fromDate, toDate): r = make_request(DTAPIURL,headers=headers,parameters=parameters,verify=verify) try: cont = r.json() - df = pd.json_normalize(cont['slo']) + #python3 + #df = pd.json_normalize(cont['slo']) + + #python2 + df = pd.read_json(cont['slo']) except Exception as e: print(e) print("No SLO json returned")