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