Skip to content

Commit

Permalink
Status into DK geojson
Browse files Browse the repository at this point in the history
  • Loading branch information
russss committed May 31, 2024
1 parent c485995 commit c9fde92
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dk_geojson/generate_dk_geojson.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ def get_monitoring_data():
return result


# monitoring_data = get_monitoring_data()
monitoring_data = {}
monitoring_data = get_monitoring_data()
print(monitoring_data)

# monitoring_data = {}


def device_info(device):
Expand All @@ -47,11 +49,10 @@ def device_info(device):
"type": device.device_type.display,
"url": f"{NETBOX_URL}dcim/devices/{device.id}",
"status": device.status.label,
"alive": False,
}

# if device.name in monitoring_data:
# info["alive"] = monitoring_data[device.name]
if device.name in monitoring_data:
info["alive"] = monitoring_data[device.name]

return info

Expand Down

0 comments on commit c9fde92

Please sign in to comment.