summaryrefslogtreecommitdiff
path: root/tests/topotests/lib/topotest.py
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2018-08-25 18:46:46 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-11-27 20:22:14 -0500
commit41077aa1915fb12627a875b7e1839e24c87bca77 (patch)
tree7b4f925d61af4b626a6ad79af2ea5de8469f1926 /tests/topotests/lib/topotest.py
parenta93eb16a516ad20097fecc318fb621233ffbf5cb (diff)
lib/ospf-topo1-vrf: don't compare headers of show ip route
Signed-off-by: Christian Franke <nobody@nowhere.ws>
Diffstat (limited to 'tests/topotests/lib/topotest.py')
-rw-r--r--tests/topotests/lib/topotest.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py
index 5cc222e149..d1985b008e 100644
--- a/tests/topotests/lib/topotest.py
+++ b/tests/topotests/lib/topotest.py
@@ -425,7 +425,15 @@ def ip4_route_zebra(node, vrf_name=None):
else:
tmp = node.vtysh_cmd('show ip route vrf {0}'.format(vrf_name))
output = re.sub(r" [0-2][0-9]:[0-5][0-9]:[0-5][0-9]", " XX:XX:XX", tmp)
- return output
+
+ lines = output.splitlines()
+ header_found = False
+ while lines and (not strip(lines[0])
+ or not header_found):
+ if '> - selected route' in lines[0]:
+ header_found = True
+ lines = lines[1:]
+ return '\n'.join(lines)
def ip4_route(node):
"""