Skip to content

Instantly share code, notes, and snippets.

@cluther
Created December 18, 2009 21:36
Show Gist options
  • Save cluther/debd922bf02514575354 to your computer and use it in GitHub Desktop.
Save cluther/debd922bf02514575354 to your computer and use it in GitHub Desktop.
# Paste this into zendmd to see which networks connect which locations.
for n in dmd.Networks.getSubNetworks():
if not n.zDrawMapLinks: continue
locations = set()
for ip in n.ipaddresses():
device = ip.device()
if not device: continue
location = device.getLocationName()
if location: locations.add(location)
if len(locations) > 1:
print "%s connects locations:" % n.getNetworkName()
for location in locations:
print " %s" % location
print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment