git://git.onelab.eu
/
nodemanager-topo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix case where topo_rspec is null
[nodemanager-topo.git]
/
topo.py
diff --git
a/topo.py
b/topo.py
index
a86ea81
..
b2cabb8
100755
(executable)
--- a/
topo.py
+++ b/
topo.py
@@
-53,7
+53,7
@@
Create a "virtual link" for slice between here and nodeid.
The key is used to create the EGRE tunnel.
"""
def setup_virtual_link(slice, key, rate, myid, nodeid, ipaddr, virtip, vnet):
The key is used to create the EGRE tunnel.
"""
def setup_virtual_link(slice, key, rate, myid, nodeid, ipaddr, virtip, vnet):
- logger.log("%s: Set up virtual link to node %
d
" % (slice, nodeid))
+ logger.log("%s: Set up virtual link to node %
s
" % (slice, nodeid))
run(setup_link_cmd + " %s %s %s %s %s %s %s" % (slice, nodeid, ipaddr,
key, rate, virtip, vnet))
return
run(setup_link_cmd + " %s %s %s %s %s %s %s" % (slice, nodeid, ipaddr,
key, rate, virtip, vnet))
return
@@
-286,6
+286,7
@@
def write_ospf(filename, myname, ifaces):
f = open(filename, 'w')
password = "zebra"
write_header(f, myname, password)
f = open(filename, 'w')
password = "zebra"
write_header(f, myname, password)
+ name = None
for name in ifaces:
f.write ("""!
for name in ifaces:
f.write ("""!
@@
-296,7
+297,8
@@
def write_ospf(filename, myname, ifaces):
ip ospf network non-broadcast
""" % name)
ip ospf network non-broadcast
""" % name)
- f.write ("""!
+ if name:
+ f.write ("""!
router ospf
ospf router-id %s
""" % ifaces[name]['local-ip'])
router ospf
ospf router-id %s
""" % ifaces[name]['local-ip'])