mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 11:48:50 +00:00
tests: check show route vrf all json output
Check that "show ip route vrf XXX json" and the JSON at key "XXX" of "show ip route vrf all json" gives the same output. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
This commit is contained in:
parent
85eb60ffd6
commit
2d6dcc0c57
@ -338,6 +338,21 @@ interface EVA
|
||||
result, diff = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
|
||||
assert result, "BGP VRF DONNA check failed:\n{}".format(diff)
|
||||
|
||||
"""
|
||||
Check that "show ip route vrf DONNA json" and the JSON at key "DONNA" of
|
||||
"show ip route vrf all json" gives the same result.
|
||||
"""
|
||||
|
||||
def check_vrf_table(router, vrf, expect):
|
||||
output = router.vtysh_cmd("show ip route vrf all json", isjson=True)
|
||||
vrf_table = output.get(vrf, {})
|
||||
|
||||
return topotest.json_cmp(vrf_table, expect)
|
||||
|
||||
test_func = partial(check_vrf_table, r1, "DONNA", expect)
|
||||
result, diff = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
|
||||
assert result, "BGP VRF DONNA check failed:\n{}".format(diff)
|
||||
|
||||
|
||||
def test_vrf_route_leak_donna_after_eva_up():
|
||||
logger.info("Ensure that route states change after EVA interface goes up")
|
||||
|
Loading…
Reference in New Issue
Block a user