mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 10:49:24 +00:00
bgp-ecmp-topo: add support for FRR 2.0
The FRR 2.0 json output is different from newer version, so add the appropriate treatment.
This commit is contained in:
parent
35a00f240f
commit
9a950d76bd
110
tests/topotests/bgp-ecmp-topo1/r1/summary20.txt
Normal file
110
tests/topotests/bgp-ecmp-topo1/r1/summary20.txt
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
{
|
||||||
|
"routerId":"10.0.255.1",
|
||||||
|
"as":100,
|
||||||
|
"vrfId":0,
|
||||||
|
"vrfName":"Default",
|
||||||
|
"peerCount":20,
|
||||||
|
"peers":{
|
||||||
|
"10.0.1.101":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.1.102":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.1.103":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.1.104":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.1.105":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.2.106":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.2.107":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.2.108":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.2.109":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.2.110":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.3.111":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.3.112":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.3.113":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.3.114":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.3.115":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.4.116":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.4.117":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.4.118":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.4.119":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
},
|
||||||
|
"10.0.4.120":{
|
||||||
|
"outq":0,
|
||||||
|
"inq":0,
|
||||||
|
"state":"Established"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"totalPeers":20
|
||||||
|
}
|
@ -126,11 +126,15 @@ def test_bgp_convergence():
|
|||||||
topotest.sleep(20, 'waiting for bgp convergence')
|
topotest.sleep(20, 'waiting for bgp convergence')
|
||||||
|
|
||||||
# Expected result
|
# Expected result
|
||||||
reffile = os.path.join(CWD, 'r1/summary.txt')
|
router = tgen.gears['r1']
|
||||||
|
if router.has_version('<', '3'):
|
||||||
|
reffile = os.path.join(CWD, 'r1/summary20.txt')
|
||||||
|
else:
|
||||||
|
reffile = os.path.join(CWD, 'r1/summary.txt')
|
||||||
|
|
||||||
expected = json.loads(open(reffile).read())
|
expected = json.loads(open(reffile).read())
|
||||||
|
|
||||||
# Define test function and call it
|
# Define test function and call it
|
||||||
router = tgen.gears['r1']
|
|
||||||
def _convergence_test():
|
def _convergence_test():
|
||||||
output = router.vtysh_cmd('show ip bgp summary json', isjson=True)
|
output = router.vtysh_cmd('show ip bgp summary json', isjson=True)
|
||||||
return topotest.json_cmp(output, expected)
|
return topotest.json_cmp(output, expected)
|
||||||
|
Loading…
Reference in New Issue
Block a user