Fixed report path

master
Patryk Gudalewicz 2022-07-11 11:57:04 +02:00
parent 3aa602d7fc
commit cd1f11b5d3
1 changed files with 1 additions and 2 deletions

View File

@ -40,7 +40,6 @@ def GatherReportingInfo(DTAPIToken, DTENV,friendlyName):
#r = requests.get(DTAPIURL,headers=headers)
r = make_request(DTAPIURL,headers,verify)
df = pd.DataFrame()
mgmt = pd.DataFrame()
entityResponse = r.json()
entityList = entityResponse["entities"]
@ -60,7 +59,7 @@ def GatherReportingInfo(DTAPIToken, DTENV,friendlyName):
tagval = next((tag for tag in entity["tags"] if tag["stringRepresentation"].startswith('[Kubernetes]app.bmwgroup.com/')), None)
row={'Tag':tagval["stringRepresentation"],'ServiceName':entity['displayName'],'ServiceId':entity['entityId']}
mgmt = mgmt.append(row,ignore_index=True)
mgmt.to_csv("C:/Users/patry/OneDrive/Dokumenty/NTT/" + friendlyName + '_TaggedEntities_' + strnow +'.csv')
mgmt.to_csv(friendlyName + '_TaggedEntities_' + strnow +'.csv',encoding='utf-8')
with open('./environment.yaml') as file:
doc = yaml.safe_load(file)