Added multiple Archetype tags support
parent
99a9785c9b
commit
1f4c9b7ed5
|
|
@ -61,7 +61,7 @@ def GatherReportingInfo(DTAPIToken, DTENV,friendlyName):
|
||||||
msidtagval = next((tag for tag in entity["tags"] if tag["stringRepresentation"].startswith('[Kubernetes]ms-id')), None)
|
msidtagval = next((tag for tag in entity["tags"] if tag["stringRepresentation"].startswith('[Kubernetes]ms-id')), None)
|
||||||
row={'AppId':appidtagval["value"],'AppName':appnametagval["value"],'CompassId':compassidtagval["value"],'MsId':msidtagval["value"],'ServiceName':entity['displayName'],'ServiceId':entity['entityId']}
|
row={'AppId':appidtagval["value"],'AppName':appnametagval["value"],'CompassId':compassidtagval["value"],'MsId':msidtagval["value"],'ServiceName':entity['displayName'],'ServiceId':entity['entityId']}
|
||||||
for kubetag in entity["tags"]:
|
for kubetag in entity["tags"]:
|
||||||
if(kubetag["key"].startsWith("app.bmwgroup.com/")):
|
if(kubetag["key"].startswith("app.bmwgroup.com/")):
|
||||||
row.update({kubetag["key"]:kubetag["value"]})
|
row.update({kubetag["key"]:kubetag["value"]})
|
||||||
mgmt = mgmt.append(row,ignore_index=True)
|
mgmt = mgmt.append(row,ignore_index=True)
|
||||||
mgmt.to_csv(friendlyName + '_TaggedEntities_' + strnow +'.csv',encoding='utf-8')
|
mgmt.to_csv(friendlyName + '_TaggedEntities_' + strnow +'.csv',encoding='utf-8')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue