Index: tools/make_network_kml.py
===================================================================
--- tools/make_network_kml.py	(revision 10378)
+++ tools/make_network_kml.py	(revision 10379)
@@ -23,4 +23,23 @@
 <kml xmlns="http://www.opengis.net/kml/2.2">
 <Document>
+  <Style id="linkDown">
+    <LineStyle>
+      <color>990000ff</color>
+      <width>2</width>
+    </LineStyle>
+  </Style>
+  <Style id="linkUp">
+    <LineStyle>
+      <color>9900ff00</color>
+      <width>3</width>
+    </LineStyle>
+  </Style>
+  <Style id="linkPlanned">
+    <LineStyle>
+      <color>99ff0000</color>
+      <width>1</width>
+    </LineStyle>
+  </Style>
+
 '''
 
@@ -37,4 +56,5 @@
 LINE = '''
    <Placemark>
+      <styleUrl>#%(styleId)s</styleUrl>
       <LineString>
         <coordinates>
@@ -50,8 +70,10 @@
 </kml>
 '''
+
 def make_graph(debug=False):
   poel = {}
   link_type = {}
   link_data = {}
+  link_status = {}
   hosts = {}
 
@@ -63,6 +85,5 @@
       hosts[nodename] = datadump
 
-      iface_keys = [elem for elem in datadump.keys() if (elem.startswith('iface_') and not "lo0" in elem)]
-      for iface_key in iface_keys:
+      for iface_key in datadump['autogen_iface_keys']:
         l = datadump[iface_key]['ip']
         addr, mask = l.split('/')
@@ -77,4 +98,11 @@
         if poel.has_key(addr):
           poel[addr] += [nodename]
+          if link_status[addr] == 'linkUp':
+            if datadump['status'] == 'planned':
+              link_status[addr] = 'linkPlanned'
+            elif datadump[iface_key]['status'] == 'planned':
+              link_status[addr] = 'linkPlanned'
+            elif datadump[iface_key]['status'] == 'down':
+              link_status[addr] = 'linkDown'
         else:
           poel[addr] = [nodename]
@@ -84,4 +112,13 @@
           else:
             link_type[addr] = datadump[iface_key]['type']
+
+          if datadump['status'] == 'planned':
+            link_status[addr] = 'linkPlanned'
+          elif datadump[iface_key]['status'] == 'planned':
+            link_status[addr] = 'linkPlanned'
+          elif datadump[iface_key]['status'] == 'down':
+            link_status[addr] = 'linkDown'
+          else:
+            link_status[addr] = 'linkUp'
 
           link_data[addr] = 1
@@ -125,4 +162,5 @@
       for buur in leden[index + 1:]:
         keys = {}
+        keys['styleId'] = link_status[addr]
         for key, value in hosts[buur].iteritems():
            keys[key + 'A'] = value
