Adjusting env calls
parent
cd050a201f
commit
8194efced9
|
|
@ -106,21 +106,14 @@ def main(slo_path):
|
|||
print("Gather data, hold on a minute")
|
||||
DTTOKEN = config(token.get('env-token-name'))
|
||||
DTURL = url.get('env-url')
|
||||
existingdashboards = get_all_dashboards_withname(DTTOKEN, DTURL,FULL_DASHBOARD_NAME)
|
||||
if not args.environment:
|
||||
if args.environment == item:
|
||||
existingdashboards = get_all_dashboards_withname(DTTOKEN, DTURL,FULL_DASHBOARD_NAME)
|
||||
if not args.remove:
|
||||
print("Uploading dashboard to Dynatrace...")
|
||||
print("Uploading dashboard to Dynatrace ("+item+")...")
|
||||
create_or_update_dashboard(DTTOKEN, DTURL, existingdashboards, "kubernetes_tiles_template.json", FULL_DASHBOARD_NAME)
|
||||
break
|
||||
else:
|
||||
remove_dashboards(DTTOKEN, DTURL, existingdashboards)
|
||||
else:
|
||||
if args.environment == item:
|
||||
if not args.remove:
|
||||
print("Uploading dashboard to Dynatrace ("+item+")...")
|
||||
create_or_update_dashboard(DTTOKEN, DTURL, existingdashboards, "kubernetes_tiles_template.json", FULL_DASHBOARD_NAME)
|
||||
break
|
||||
else:
|
||||
remove_dashboards(DTTOKEN, DTURL, existingdashboards)
|
||||
else:
|
||||
print("ERROR: No cluster specified")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue