(Boeing r1768)
basic fixes to ospfmanetmdrtest.py script to work with current LxcNode class
This commit is contained in:
parent
f96bbf7a29
commit
ece697df70
1 changed files with 13 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
# Copyright (c)2011-2012 the Boeing Company.
|
# Copyright (c)2011-2013 the Boeing Company.
|
||||||
# See the LICENSE file included in this distribution.
|
# See the LICENSE file included in this distribution.
|
||||||
|
|
||||||
# create a random topology running OSPFv3 MDR, wait and then check
|
# create a random topology running OSPFv3 MDR, wait and then check
|
||||||
|
@ -55,6 +55,8 @@ router ospf6
|
||||||
ip forwarding
|
ip forwarding
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
confdir = "/usr/local/etc/quagga"
|
||||||
|
|
||||||
def __init__(self, core, ipaddr, routerid = None,
|
def __init__(self, core, ipaddr, routerid = None,
|
||||||
objid = None, name = None, nodedir = None):
|
objid = None, name = None, nodedir = None):
|
||||||
if routerid is None:
|
if routerid is None:
|
||||||
|
@ -74,7 +76,13 @@ ip forwarding
|
||||||
f = self.opennodefile(filename, "w")
|
f = self.opennodefile(filename, "w")
|
||||||
f.write(self.qconf())
|
f.write(self.qconf())
|
||||||
f.close()
|
f.close()
|
||||||
pycore.nodes.LxcNode.config(self)
|
tmp = self.bootscript()
|
||||||
|
if tmp:
|
||||||
|
self.nodefile(self.bootsh, tmp, mode = 0755)
|
||||||
|
|
||||||
|
def boot(self):
|
||||||
|
self.config()
|
||||||
|
self.session.services.bootnodeservices(self)
|
||||||
|
|
||||||
def bootscript(self):
|
def bootscript(self):
|
||||||
return """\
|
return """\
|
||||||
|
@ -454,8 +462,10 @@ class ZebraRoutes(VtyshCmd):
|
||||||
prefix = None
|
prefix = None
|
||||||
for line in self.out:
|
for line in self.out:
|
||||||
field = line.split()
|
field = line.split()
|
||||||
|
if len(field) < 1:
|
||||||
|
continue
|
||||||
# only use OSPFv3 selected FIB routes
|
# only use OSPFv3 selected FIB routes
|
||||||
if field[0][:2] == "o>":
|
elif field[0][:2] == "o>":
|
||||||
prefix = field[1]
|
prefix = field[1]
|
||||||
metric = field[2].split("/")[1][:-1]
|
metric = field[2].split("/")[1][:-1]
|
||||||
if field[0][2:] != "*":
|
if field[0][2:] != "*":
|
||||||
|
|
Loading…
Reference in a new issue