{
- "2.2.2.2":{
- "priority":1,
- "state":"Full/DR",
- "address":"10.0.1.2",
- "ifaceName":"r1-eth1:10.0.1.1"
- },
- "3.3.3.3":{
- "priority":1,
- "state":"Full/DR",
- "address":"10.0.2.3",
- "ifaceName":"r1-eth2:10.0.2.1"
- }
+ "2.2.2.2":[
+ {
+ "priority":1,
+ "state":"Full/DR",
+ "address":"10.0.1.2",
+ "ifaceName":"r1-eth1:10.0.1.1"
+ }
+ ],
+ "3.3.3.3":[
+ {
+ "priority":1,
+ "state":"Full/DR",
+ "address":"10.0.2.3",
+ "ifaceName":"r1-eth2:10.0.2.1"
+ }
+ ]
}
{
- "1.1.1.1":{
- "priority":1,
- "state":"Full/Backup",
- "address":"10.0.1.1",
- "ifaceName":"r2-eth1:10.0.1.2"
- },
- "3.3.3.3":{
- "priority":1,
- "state":"Full/DR",
- "address":"10.0.3.3",
- "ifaceName":"r2-eth2:10.0.3.2"
- }
+ "1.1.1.1":[
+ {
+ "priority":1,
+ "state":"Full/Backup",
+ "address":"10.0.1.1",
+ "ifaceName":"r2-eth1:10.0.1.2"
+ }
+ ],
+ "3.3.3.3":[
+ {
+ "priority":1,
+ "state":"Full/DR",
+ "address":"10.0.3.3",
+ "ifaceName":"r2-eth2:10.0.3.2"
+ }
+ ]
}
{
- "1.1.1.1":{
- "priority":1,
- "state":"Full/Backup",
- "address":"10.0.2.1",
- "ifaceName":"r3-eth1:10.0.2.3"
- },
- "2.2.2.2":{
- "priority":1,
- "state":"Full/Backup",
- "address":"10.0.3.2",
- "ifaceName":"r3-eth2:10.0.3.3"
- }
+ "1.1.1.1":[
+ {
+ "priority":1,
+ "state":"Full/Backup",
+ "address":"10.0.2.1",
+ "ifaceName":"r3-eth1:10.0.2.3"
+ }
+ ],
+ "2.2.2.2":[
+ {
+ "priority":1,
+ "state":"Full/Backup",
+ "address":"10.0.3.2",
+ "ifaceName":"r3-eth2:10.0.3.3"
+ }
+ ]
}
if tgen.routers_have_failure():
pytest.skip(tgen.errors)
+ # Old output (before FRR PR1383) didn't show a list of neighbors.
+ # Check for dict object and compare to old output if this is the case
+ tgen = get_topogen()
+ router = tgen.gears['r1']
+ output = router.vtysh_cmd("show ip ospf neighbor json", isjson=True)
+
+ if isinstance(output["2.2.2.2"], dict):
+ reffile = "show_ip_ospf_neighbor.ref-old-nolist"
+ else:
+ reffile = "show_ip_ospf_neighbor.ref"
+
for rname in ['r1', 'r2', 'r3']:
- router_compare_json_output(rname, "show ip ospf neighbor json", "show_ip_ospf_neighbor.ref")
+ router_compare_json_output(rname, "show ip ospf neighbor json", reffile)
def test_rib():
logger.info("Test: verify RIB")