summaryrefslogtreecommitdiffstats
path: root/modules/retiolum/scripts
diff options
context:
space:
mode:
authorFelix Richter <Felix.Richter@syntax-fehler.de>2011-05-29 12:25:46 +0200
committerFelix Richter <Felix.Richter@syntax-fehler.de>2011-05-29 12:25:46 +0200
commitb7e9b977884f8d4d6149b06e3567f288b920daa6 (patch)
tree688ef29217b0fe5f230e0bda8ab8b42240b5737a /modules/retiolum/scripts
parentfd7da3898006ab8119d4b13b383cfa16c9403b18 (diff)
updated graphgen script
parse.py: parser now stores all internal addresses for nodes which have v4 and v6 addresses
Diffstat (limited to 'modules/retiolum/scripts')
-rwxr-xr-xmodules/retiolum/scripts/adv_graphgen/parse.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/retiolum/scripts/adv_graphgen/parse.py b/modules/retiolum/scripts/adv_graphgen/parse.py
index 16d3043b..639c5316 100755
--- a/modules/retiolum/scripts/adv_graphgen/parse.py
+++ b/modules/retiolum/scripts/adv_graphgen/parse.py
@@ -51,8 +51,9 @@ def write_node(k,v):
node += "external:"+v['external-ip']+":"+v['external-port']+"\\l"
if v.has_key('num_conns'):
node += "Num Connects:"+str(v['num_conns'])+"\\l"
-
- node += "internal:"+v.get('internal-ip','¯\\\\(°_o)/¯')+"\\l\""
+ for addr in v.get('internal-ip',['¯\\\\(°_o)/¯']):
+ node += "internal:"+addr+"\\l"
+ node +="\""
if v['external-ip'] == "MYSELF":
node += ",fillcolor=steelblue1"
node += "]"
@@ -81,7 +82,9 @@ def parse_input():
if line == 'End of subnet list.\n':
break
l = line.replace('\n','').split()
- nodes[l[2]]['internal-ip'] = l[0].split('#')[0]
+ if not nodes[l[2]].get('internal-ip',False):
+ nodes[l[2]]['internal-ip'] = []
+ nodes[l[2]]['internal-ip'].append(l[0].split('#')[0])
if line == 'Edges:':
edges = {}
for line in sys.stdin: