- Timestamp:
- Apr 7, 2012, 11:31:53 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/make-network-kml.py
r10037 r10375 15 15 OUTFILE = os.path.join(os.getcwd(),'network.kml') 16 16 17 store = yaml.load(open('store.yaml','r')) 17 try: 18 store = yaml.load(open('store.yaml','r')) 19 except IOError: 20 store = None 18 21 19 22 … … 28 31 <description>%(nodename)s</description> 29 32 <Point> 30 <coordinates>%(l atitude)s,%(longitude)s,0</coordinates>33 <coordinates>%(longitude)s,%(latitude)s,0</coordinates> 31 34 </Point> 32 35 </Placemark> … … 37 40 <LineString> 38 41 <coordinates> 39 %(l atitudeA)s,%(longitudeA)s,040 %(l atitudeB)s,%(longitudeB)s,042 %(longitudeA)s,%(latitudeA)s,0 43 %(longitudeB)s,%(latitudeB)s,0 41 44 </coordinates> 42 45 </LineString> … … 86 89 nodename = datadump['nodename'] 87 90 INTERVAL = 60 * 10 88 if store ['uptime'].has_key(nodename) and store['snmp'].has_key(nodename) and store['traffic'].has_key(nodename):89 if store ['traffic'][nodename].has_key(iface):91 if store and store['uptime'].has_key(nodename) and store['snmp'].has_key(nodename) and store['traffic'].has_key(nodename): 92 if store and store['traffic'][nodename].has_key(iface): 90 93 (b_in, b_out) = store['traffic'][nodename][iface] 91 94 uptime = store['uptime'][nodename]
Note:
See TracChangeset
for help on using the changeset viewer.