tests: replace deprecated ospf json keys

Replace many deprecated json keys in topotests after removing
those keys from ospfd.

Signed-off-by: Mark Stapp <mjs@labn.net>
This commit is contained in:
Mark Stapp 2023-03-29 16:00:20 -04:00
parent f5419bf927
commit c42ac5f64b
35 changed files with 250 additions and 245 deletions

View File

@ -2,13 +2,13 @@
"neighbors":{ "neighbors":{
"192.168.0.2":[ "192.168.0.2":[
{ {
"priority":5, "nbrPriority":5,
"converged":"Full" "converged":"Full"
} }
], ],
"192.168.0.3":[ "192.168.0.3":[
{ {
"priority":5, "nbrPriority":5,
"converged":"Full" "converged":"Full"
} }
] ]

View File

@ -2,13 +2,13 @@
"neighbors":{ "neighbors":{
"192.168.0.1":[ "192.168.0.1":[
{ {
"priority":10, "nbrPriority":10,
"converged":"Full" "converged":"Full"
} }
], ],
"192.168.0.3":[ "192.168.0.3":[
{ {
"priority":5, "nbrPriority":5,
"converged":"Full" "converged":"Full"
} }
] ]

View File

@ -2,13 +2,13 @@
"neighbors":{ "neighbors":{
"192.168.0.1":[ "192.168.0.1":[
{ {
"priority":10, "nbrPriority":10,
"converged":"Full" "converged":"Full"
} }
], ],
"192.168.0.2":[ "192.168.0.2":[
{ {
"priority":10, "nbrPriority":10,
"converged":"Full" "converged":"Full"
} }
] ]

View File

@ -2,9 +2,9 @@
"neighbors":{ "neighbors":{
"2.2.2.2":[ "2.2.2.2":[
{ {
"priority":2, "nbrPriority":2,
"converged":"Full", "converged":"Full",
"address":"10.0.1.2", "ifaceAddress":"10.0.1.2",
"ifaceName":"r1-eth0:10.0.1.1" "ifaceName":"r1-eth0:10.0.1.1"
} }
] ]

View File

@ -2,25 +2,25 @@
"neighbors":{ "neighbors":{
"1.1.1.1":[ "1.1.1.1":[
{ {
"priority":1, "nbrPriority":1,
"converged":"Full", "converged":"Full",
"address":"10.0.1.1", "ifaceAddress":"10.0.1.1",
"ifaceName":"r2-eth0:10.0.1.2" "ifaceName":"r2-eth0:10.0.1.2"
} }
], ],
"3.3.3.3":[ "3.3.3.3":[
{ {
"priority":2, "nbrPriority":2,
"converged":"Full", "converged":"Full",
"address":"10.0.2.3", "ifaceAddress":"10.0.2.3",
"ifaceName":"r2-eth1:10.0.2.2" "ifaceName":"r2-eth1:10.0.2.2"
} }
], ],
"4.4.4.4":[ "4.4.4.4":[
{ {
"priority":3, "nbrPriority":3,
"converged":"Full", "converged":"Full",
"address":"10.0.2.4", "ifaceAddress":"10.0.2.4",
"ifaceName":"r2-eth1:10.0.2.2" "ifaceName":"r2-eth1:10.0.2.2"
} }
] ]

View File

@ -2,17 +2,17 @@
"neighbors":{ "neighbors":{
"2.2.2.2":[ "2.2.2.2":[
{ {
"priority":1, "nbrPriority":1,
"converged":"Full", "converged":"Full",
"address":"10.0.2.2", "ifaceAddress":"10.0.2.2",
"ifaceName":"r3-eth0:10.0.2.3" "ifaceName":"r3-eth0:10.0.2.3"
} }
], ],
"4.4.4.4":[ "4.4.4.4":[
{ {
"priority":3, "nbrPriority":3,
"converged":"Full", "converged":"Full",
"address":"10.0.2.4", "ifaceAddress":"10.0.2.4",
"ifaceName":"r3-eth0:10.0.2.3" "ifaceName":"r3-eth0:10.0.2.3"
} }
] ]

View File

@ -3,17 +3,17 @@
"neighbors":{ "neighbors":{
"2.2.2.2":[ "2.2.2.2":[
{ {
"priority":1, "nbrPriority":1,
"converged":"Full", "converged":"Full",
"address":"10.0.2.2", "ifaceAddress":"10.0.2.2",
"ifaceName":"r4-eth0:10.0.2.4" "ifaceName":"r4-eth0:10.0.2.4"
} }
], ],
"3.3.3.3":[ "3.3.3.3":[
{ {
"priority":2, "nbrPriority":2,
"converged":"Full", "converged":"Full",
"address":"10.0.2.3", "ifaceAddress":"10.0.2.3",
"ifaceName":"r4-eth0:10.0.2.4" "ifaceName":"r4-eth0:10.0.2.4"
} }
] ]

View File

@ -2,9 +2,9 @@
"neighbors":{ "neighbors":{
"2.2.2.2":[ "2.2.2.2":[
{ {
"priority":2, "nbrPriority":2,
"converged":"Full", "converged":"Full",
"address":"10.0.1.2", "ifaceAddress":"10.0.1.2",
"ifaceName":"r1-eth0:10.0.1.1" "ifaceName":"r1-eth0:10.0.1.1"
} }
] ]

View File

@ -2,25 +2,25 @@
"neighbors":{ "neighbors":{
"1.1.1.1":[ "1.1.1.1":[
{ {
"priority":1, "nbrPriority":1,
"converged":"Full", "converged":"Full",
"address":"10.0.1.1", "ifaceAddress":"10.0.1.1",
"ifaceName":"r2-eth0:10.0.1.2" "ifaceName":"r2-eth0:10.0.1.2"
} }
], ],
"3.3.3.3":[ "3.3.3.3":[
{ {
"priority":2, "nbrPriority":2,
"converged":"Full", "converged":"Full",
"address":"10.0.2.3", "ifaceAddress":"10.0.2.3",
"ifaceName":"r2-eth1:10.0.2.2" "ifaceName":"r2-eth1:10.0.2.2"
} }
], ],
"4.4.4.4":[ "4.4.4.4":[
{ {
"priority":3, "nbrPriority":3,
"converged":"Full", "converged":"Full",
"address":"10.0.2.4", "ifaceAddress":"10.0.2.4",
"ifaceName":"r2-eth1:10.0.2.2" "ifaceName":"r2-eth1:10.0.2.2"
} }
] ]

View File

@ -2,17 +2,17 @@
"neighbors":{ "neighbors":{
"2.2.2.2":[ "2.2.2.2":[
{ {
"priority":1, "nbrPriority":1,
"converged":"Full", "converged":"Full",
"address":"10.0.2.2", "ifaceAddress":"10.0.2.2",
"ifaceName":"r3-eth0:10.0.2.3" "ifaceName":"r3-eth0:10.0.2.3"
} }
], ],
"4.4.4.4":[ "4.4.4.4":[
{ {
"priority":3, "nbrPriority":3,
"converged":"Full", "converged":"Full",
"address":"10.0.2.4", "ifaceAddress":"10.0.2.4",
"ifaceName":"r3-eth0:10.0.2.3" "ifaceName":"r3-eth0:10.0.2.3"
} }
] ]

View File

@ -3,17 +3,17 @@
"neighbors":{ "neighbors":{
"2.2.2.2":[ "2.2.2.2":[
{ {
"priority":1, "nbrPriority":1,
"converged":"Full", "converged":"Full",
"address":"10.0.2.2", "ifaceAddress":"10.0.2.2",
"ifaceName":"r4-eth0:10.0.2.4" "ifaceName":"r4-eth0:10.0.2.4"
} }
], ],
"3.3.3.3":[ "3.3.3.3":[
{ {
"priority":2, "nbrPriority":2,
"converged":"Full", "converged":"Full",
"address":"10.0.2.3", "ifaceAddress":"10.0.2.3",
"ifaceName":"r4-eth0:10.0.2.4" "ifaceName":"r4-eth0:10.0.2.4"
} }
] ]

View File

@ -2,24 +2,24 @@
"neighbors": { "neighbors": {
"2.2.2.2": [ "2.2.2.2": [
{ {
"dbSummaryCounter": 0, "databaseSummaryListCounter": 0,
"retransmitCounter": 0, "linkStateRetransmissionListCounter": 0,
"priority": 1, "nbrPriority": 1,
"converged": "Full", "converged": "Full",
"address": "10.0.1.2", "ifaceAddress": "10.0.1.2",
"ifaceName": "r1-eth1:10.0.1.1", "ifaceName": "r1-eth1:10.0.1.1",
"requestCounter": 0 "linkStateRequestListCounter": 0
} }
], ],
"3.3.3.3": [ "3.3.3.3": [
{ {
"dbSummaryCounter": 0, "databaseSummaryListCounter": 0,
"retransmitCounter": 0, "linkStateRetransmissionListCounter": 0,
"priority": 1, "nbrPriority": 1,
"converged": "Full", "converged": "Full",
"address": "10.0.2.3", "ifaceAddress": "10.0.2.3",
"ifaceName": "r1-eth2:10.0.2.1", "ifaceName": "r1-eth2:10.0.2.1",
"requestCounter": 0 "linkStateRequestListCounter": 0
} }
] ]
} }

View File

@ -2,24 +2,24 @@
"neighbors": { "neighbors": {
"1.1.1.1": [ "1.1.1.1": [
{ {
"priority":1, "nbrPriority":1,
"converged":"Full", "converged":"Full",
"address":"10.0.1.1", "ifaceAddress":"10.0.1.1",
"ifaceName":"r2-eth1:10.0.1.2", "ifaceName":"r2-eth1:10.0.1.2",
"retransmitCounter":0, "linkStateRetransmissionListCounter":0,
"requestCounter":0, "linkStateRequestListCounter":0,
"dbSummaryCounter":0 "databaseSummaryListCounter":0
} }
], ],
"3.3.3.3": [ "3.3.3.3": [
{ {
"priority":1, "nbrPriority":1,
"converged":"Full", "converged":"Full",
"address":"10.0.3.3", "ifaceAddress":"10.0.3.3",
"ifaceName":"r2-eth2:10.0.3.2", "ifaceName":"r2-eth2:10.0.3.2",
"retransmitCounter":0, "linkStateRetransmissionListCounter":0,
"requestCounter":0, "linkStateRequestListCounter":0,
"dbSummaryCounter":0 "databaseSummaryListCounter":0
} }
] ]
} }

View File

@ -2,24 +2,24 @@
"neighbors": { "neighbors": {
"1.1.1.1": [ "1.1.1.1": [
{ {
"priority":1, "nbrPriority":1,
"converged":"Full", "converged":"Full",
"address":"10.0.2.1", "ifaceAddress":"10.0.2.1",
"ifaceName":"r3-eth1:10.0.2.3", "ifaceName":"r3-eth1:10.0.2.3",
"retransmitCounter":0, "linkStateRetransmissionListCounter":0,
"requestCounter":0, "linkStateRequestListCounter":0,
"dbSummaryCounter":0 "databaseSummaryListCounter":0
} }
], ],
"2.2.2.2": [ "2.2.2.2": [
{ {
"priority":1, "nbrPriority":1,
"converged":"Full", "converged":"Full",
"address":"10.0.3.2", "ifaceAddress":"10.0.3.2",
"ifaceName":"r3-eth2:10.0.3.3", "ifaceName":"r3-eth2:10.0.3.3",
"retransmitCounter":0, "linkStateRetransmissionListCounter":0,
"requestCounter":0, "linkStateRequestListCounter":0,
"dbSummaryCounter":0 "databaseSummaryListCounter":0
} }
] ]
} }

View File

@ -2,12 +2,12 @@
"neighbors": { "neighbors": {
"2.2.2.2": [ "2.2.2.2": [
{ {
"dbSummaryCounter": 0, "databaseSummaryListCounter": 0,
"retransmitCounter": 0, "linkStateRetransmissionListCounter": 0,
"priority": 1, "nbrPriority": 1,
"converged": "Full", "converged": "Full",
"address": "10.0.1.2", "ifaceAddress": "10.0.1.2",
"requestCounter": 0 "linkStateRequestListCounter": 0
} }
] ]
} }

View File

@ -2,40 +2,40 @@
"neighbors": { "neighbors": {
"1.1.1.1": [ "1.1.1.1": [
{ {
"dbSummaryCounter": 0, "databaseSummaryListCounter": 0,
"retransmitCounter": 0, "linkStateRetransmissionListCounter": 0,
"priority": 1, "nbrPriority": 1,
"converged": "Full", "converged": "Full",
"address": "10.0.1.1", "ifaceAddress": "10.0.1.1",
"requestCounter": 0 "linkStateRequestListCounter": 0
} }
], ],
"3.3.3.3": [ "3.3.3.3": [
{ {
"dbSummaryCounter": 0, "databaseSummaryListCounter": 0,
"retransmitCounter": 0, "linkStateRetransmissionListCounter": 0,
"priority": 1, "nbrPriority": 1,
"converged": "Full", "converged": "Full",
"address": "10.0.2.3", "ifaceAddress": "10.0.2.3",
"requestCounter": 0 "linkStateRequestListCounter": 0
}, },
{ {
"dbSummaryCounter": 0, "databaseSummaryListCounter": 0,
"retransmitCounter": 0, "linkStateRetransmissionListCounter": 0,
"priority": 1, "nbrPriority": 1,
"converged": "Full", "converged": "Full",
"address": "10.0.3.3", "ifaceAddress": "10.0.3.3",
"requestCounter": 0 "linkStateRequestListCounter": 0
} }
], ],
"4.4.4.4": [ "4.4.4.4": [
{ {
"dbSummaryCounter": 0, "databaseSummaryListCounter": 0,
"retransmitCounter": 0, "linkStateRetransmissionListCounter": 0,
"priority": 1, "nbrPriority": 1,
"converged": "Full", "converged": "Full",
"address": "10.0.2.4", "ifaceAddress": "10.0.2.4",
"requestCounter": 0 "linkStateRequestListCounter": 0
} }
] ]
} }

View File

@ -2,30 +2,30 @@
"neighbors": { "neighbors": {
"2.2.2.2": [ "2.2.2.2": [
{ {
"dbSummaryCounter": 0, "databaseSummaryListCounter": 0,
"retransmitCounter": 0, "linkStateRetransmissionListCounter": 0,
"priority": 1, "nbrPriority": 1,
"converged": "Full", "converged": "Full",
"address": "10.0.2.2", "ifaceAddress": "10.0.2.2",
"requestCounter": 0 "linkStateRequestListCounter": 0
}, },
{ {
"dbSummaryCounter": 0, "databaseSummaryListCounter": 0,
"retransmitCounter": 0, "linkStateRetransmissionListCounter": 0,
"priority": 1, "nbrPriority": 1,
"converged": "Full", "converged": "Full",
"address": "10.0.3.2", "ifaceAddress": "10.0.3.2",
"requestCounter": 0 "linkStateRequestListCounter": 0
} }
], ],
"4.4.4.4": [ "4.4.4.4": [
{ {
"dbSummaryCounter": 0, "databaseSummaryListCounter": 0,
"retransmitCounter": 0, "linkStateRetransmissionListCounter": 0,
"priority": 1, "nbrPriority": 1,
"converged": "Full", "converged": "Full",
"address": "10.0.2.4", "ifaceAddress": "10.0.2.4",
"requestCounter": 0 "linkStateRequestListCounter": 0
} }
] ]
} }

View File

@ -2,22 +2,22 @@
"neighbors": { "neighbors": {
"2.2.2.2": [ "2.2.2.2": [
{ {
"dbSummaryCounter": 0, "databaseSummaryListCounter": 0,
"retransmitCounter": 0, "linkStateRetransmissionListCounter": 0,
"priority": 1, "nbrPriority": 1,
"converged": "Full", "converged": "Full",
"address": "10.0.2.2", "ifaceAddress": "10.0.2.2",
"requestCounter": 0 "linkStateRequestListCounter": 0
} }
], ],
"3.3.3.3": [ "3.3.3.3": [
{ {
"dbSummaryCounter": 0, "databaseSummaryListCounter": 0,
"retransmitCounter": 0, "linkStateRetransmissionListCounter": 0,
"priority": 1, "nbrPriority": 1,
"converged": "Full", "converged": "Full",
"address": "10.0.2.3", "ifaceAddress": "10.0.2.3",
"requestCounter": 0 "linkStateRequestListCounter": 0
} }
] ]
} }

View File

@ -2,24 +2,24 @@
"neighbors": { "neighbors": {
"2.2.2.2": [ "2.2.2.2": [
{ {
"dbSummaryCounter": 0, "databaseSummaryListCounter": 0,
"retransmitCounter": 0, "linkStateRetransmissionListCounter": 0,
"priority": 2, "nbrPriority": 2,
"converged": "Full", "converged": "Full",
"address": "10.0.1.2", "ifaceAddress": "10.0.1.2",
"ifaceName": "r1-eth1:10.0.1.1", "ifaceName": "r1-eth1:10.0.1.1",
"requestCounter": 0 "linkStateRequestListCounter": 0
} }
], ],
"3.3.3.3": [ "3.3.3.3": [
{ {
"dbSummaryCounter": 0, "databaseSummaryListCounter": 0,
"retransmitCounter": 0, "linkStateRetransmissionListCounter": 0,
"priority": 2, "nbrPriority": 2,
"converged": "Full", "converged": "Full",
"address": "10.0.2.3", "ifaceAddress": "10.0.2.3",
"ifaceName": "r1-eth2:10.0.2.1", "ifaceName": "r1-eth2:10.0.2.1",
"requestCounter": 0 "linkStateRequestListCounter": 0
} }
] ]
} }

View File

@ -2,24 +2,24 @@
"neighbors": { "neighbors": {
"1.1.1.1": [ "1.1.1.1": [
{ {
"priority":1, "nbrPriority":1,
"converged":"Full", "converged":"Full",
"address":"10.0.1.1", "ifaceAddress":"10.0.1.1",
"ifaceName":"r2-eth1:10.0.1.2", "ifaceName":"r2-eth1:10.0.1.2",
"retransmitCounter":0, "linkStateRetransmissionListCounter":0,
"requestCounter":0, "linkStateRequestListCounter":0,
"dbSummaryCounter":0 "databaseSummaryListCounter":0
} }
], ],
"3.3.3.3": [ "3.3.3.3": [
{ {
"priority":2, "nbrPriority":2,
"converged":"Full", "converged":"Full",
"address":"10.0.3.3", "ifaceAddress":"10.0.3.3",
"ifaceName":"r2-eth2:10.0.3.2", "ifaceName":"r2-eth2:10.0.3.2",
"retransmitCounter":0, "linkStateRetransmissionListCounter":0,
"requestCounter":0, "linkStateRequestListCounter":0,
"dbSummaryCounter":0 "databaseSummaryListCounter":0
} }
] ]
} }

View File

@ -2,24 +2,24 @@
"neighbors": { "neighbors": {
"1.1.1.1": [ "1.1.1.1": [
{ {
"priority":1, "nbrPriority":1,
"converged":"Full", "converged":"Full",
"address":"10.0.2.1", "ifaceAddress":"10.0.2.1",
"ifaceName":"r3-eth1:10.0.2.3", "ifaceName":"r3-eth1:10.0.2.3",
"retransmitCounter":0, "linkStateRetransmissionListCounter":0,
"requestCounter":0, "linkStateRequestListCounter":0,
"dbSummaryCounter":0 "databaseSummaryListCounter":0
} }
], ],
"2.2.2.2": [ "2.2.2.2": [
{ {
"priority":1, "nbrPriority":1,
"converged":"Full", "converged":"Full",
"address":"10.0.3.2", "ifaceAddress":"10.0.3.2",
"ifaceName":"r3-eth2:10.0.3.3", "ifaceName":"r3-eth2:10.0.3.3",
"retransmitCounter":0, "linkStateRetransmissionListCounter":0,
"requestCounter":0, "linkStateRequestListCounter":0,
"dbSummaryCounter":0 "databaseSummaryListCounter":0
} }
] ]
} }

View File

@ -577,15 +577,15 @@ def verify_ospf_neighbor(
"ospf": { "ospf": {
"neighbors": { "neighbors": {
"r1": { "r1": {
"state": "Full", "nbrState": "Full",
"role": "DR" "role": "DR"
}, },
"r2": { "r2": {
"state": "Full", "nbrState": "Full",
"role": "DROther" "role": "DROther"
}, },
"r3": { "r3": {
"state": "Full", "nbrState": "Full",
"role": "DROther" "role": "DROther"
} }
} }
@ -642,13 +642,13 @@ def verify_ospf_neighbor(
neighbor_ip = neighbor_ip.lower() neighbor_ip = neighbor_ip.lower()
nbr_rid = data_rid nbr_rid = data_rid
try: try:
nh_state = show_ospf_json[nbr_rid][0]["state"].split("/")[0] nh_state = show_ospf_json[nbr_rid][0]["nbrState"].split("/")[0]
intf_state = show_ospf_json[nbr_rid][0]["state"].split("/")[1] intf_state = show_ospf_json[nbr_rid][0]["nbrState"].split("/")[1]
except KeyError: except KeyError:
errormsg = "[DUT: {}] OSPF peer {} missing".format(router, nbr_rid) errormsg = "[DUT: {}] OSPF peer {} missing".format(router, nbr_rid)
return errormsg return errormsg
nbr_state = nbr_data.setdefault("state", None) nbr_state = nbr_data.setdefault("nbrState", None)
nbr_role = nbr_data.setdefault("role", None) nbr_role = nbr_data.setdefault("role", None)
if nbr_state: if nbr_state:
@ -724,8 +724,9 @@ def verify_ospf_neighbor(
nh_state = None nh_state = None
neighbor_ip = neighbor_ip.lower() neighbor_ip = neighbor_ip.lower()
nbr_rid = data_rid nbr_rid = data_rid
try: try:
nh_state = show_ospf_json[nbr_rid][0]["state"].split("/")[0] nh_state = show_ospf_json[nbr_rid][0]["nbrState"].split("/")[0]
except KeyError: except KeyError:
errormsg = "[DUT: {}] OSPF peer {} missing,from " "{} ".format( errormsg = "[DUT: {}] OSPF peer {} missing,from " "{} ".format(
router, nbr_rid, ospf_nbr router, nbr_rid, ospf_nbr

View File

@ -165,9 +165,9 @@ def test_ospf_lan_tc1_p0(request):
"r0": { "r0": {
"ospf": { "ospf": {
"neighbors": { "neighbors": {
"r1": {"state": "Full", "role": "DR"}, "r1": {"nbrState": "Full", "role": "DR"},
"r2": {"state": "Full", "role": "DROther"}, "r2": {"nbrState": "Full", "role": "DROther"},
"r3": {"state": "Full", "role": "DROther"}, "r3": {"nbrState": "Full", "role": "DROther"},
} }
} }
} }
@ -185,9 +185,9 @@ def test_ospf_lan_tc1_p0(request):
"r1": { "r1": {
"ospf": { "ospf": {
"neighbors": { "neighbors": {
"r0": {"state": "Full", "role": "Backup"}, "r0": {"nbrState": "Full", "role": "Backup"},
"r2": {"state": "Full", "role": "DROther"}, "r2": {"nbrState": "Full", "role": "DROther"},
"r3": {"state": "Full", "role": "DROther"}, "r3": {"nbrState": "Full", "role": "DROther"},
} }
} }
} }
@ -196,7 +196,8 @@ def test_ospf_lan_tc1_p0(request):
result = verify_ospf_neighbor(tgen, topo, dut, input_dict, lan=True) result = verify_ospf_neighbor(tgen, topo, dut, input_dict, lan=True)
assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result) assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
step("Configure DR pririty 100 on R0 and clear ospf neighbors on all the routers.") step("Configure DR priority 100 on R0 and clear ospf neighbors "
"on all the routers.")
input_dict = { input_dict = {
"r0": { "r0": {
@ -221,9 +222,9 @@ def test_ospf_lan_tc1_p0(request):
"r0": { "r0": {
"ospf": { "ospf": {
"neighbors": { "neighbors": {
"r1": {"state": "Full", "role": "Backup"}, "r1": {"nbrState": "Full", "role": "Backup"},
"r2": {"state": "Full", "role": "DROther"}, "r2": {"nbrState": "Full", "role": "DROther"},
"r3": {"state": "Full", "role": "DROther"}, "r3": {"nbrState": "Full", "role": "DROther"},
} }
} }
} }
@ -232,7 +233,8 @@ def test_ospf_lan_tc1_p0(request):
result = verify_ospf_neighbor(tgen, topo, dut, input_dict, lan=True) result = verify_ospf_neighbor(tgen, topo, dut, input_dict, lan=True)
assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result) assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
step("Configure DR pririty 150 on R0 and clear ospf neighbors on all the routers.") step("Configure DR priority 150 on R0 and clear ospf neighbors "
"on all the routers.")
input_dict = { input_dict = {
"r0": { "r0": {
@ -257,9 +259,9 @@ def test_ospf_lan_tc1_p0(request):
"r0": { "r0": {
"ospf": { "ospf": {
"neighbors": { "neighbors": {
"r1": {"state": "Full", "role": "Backup"}, "r1": {"nbrState": "Full", "role": "Backup"},
"r2": {"state": "Full", "role": "DROther"}, "r2": {"nbrState": "Full", "role": "DROther"},
"r3": {"state": "Full", "role": "DROther"}, "r3": {"nbrState": "Full", "role": "DROther"},
} }
} }
} }
@ -293,9 +295,9 @@ def test_ospf_lan_tc1_p0(request):
"r0": { "r0": {
"ospf": { "ospf": {
"neighbors": { "neighbors": {
"r1": {"state": "Full", "role": "DR"}, "r1": {"nbrState": "Full", "role": "DR"},
"r2": {"state": "2-Way", "role": "DROther"}, "r2": {"nbrState": "2-Way", "role": "DROther"},
"r3": {"state": "2-Way", "role": "DROther"}, "r3": {"nbrState": "2-Way", "role": "DROther"},
} }
} }
} }
@ -332,9 +334,9 @@ def test_ospf_lan_tc1_p0(request):
"r0": { "r0": {
"ospf": { "ospf": {
"neighbors": { "neighbors": {
"r1": {"state": "Full", "role": "Backup"}, "r1": {"nbrState": "Full", "role": "Backup"},
"r2": {"state": "Full", "role": "DROther"}, "r2": {"nbrState": "Full", "role": "DROther"},
"r3": {"state": "Full", "role": "DROther"}, "r3": {"nbrState": "Full", "role": "DROther"},
} }
} }
} }
@ -364,9 +366,9 @@ def test_ospf_lan_tc1_p0(request):
"r0": { "r0": {
"ospf": { "ospf": {
"neighbors": { "neighbors": {
"r1": {"state": "Full", "role": "DR"}, "r1": {"nbrState": "Full", "role": "DR"},
"r2": {"state": "Full", "role": "DROther"}, "r2": {"nbrState": "Full", "role": "DROther"},
"r3": {"state": "Full", "role": "DROther"}, "r3": {"nbrState": "Full", "role": "DROther"},
} }
} }
} }
@ -419,9 +421,9 @@ def test_ospf_lan_tc1_p0(request):
"r1": { "r1": {
"ospf": { "ospf": {
"neighbors": { "neighbors": {
"r0": {"state": "Full", "role": "Backup"}, "r0": {"nbrState": "Full", "role": "Backup"},
"r2": {"state": "Full", "role": "DROther"}, "r2": {"nbrState": "Full", "role": "DROther"},
"r3": {"state": "Full", "role": "DROther"}, "r3": {"nbrState": "Full", "role": "DROther"},
} }
} }
} }
@ -445,9 +447,9 @@ def test_ospf_lan_tc1_p0(request):
"r1": { "r1": {
"ospf": { "ospf": {
"neighbors": { "neighbors": {
"r0": {"state": "Full", "role": "Backup"}, "r0": {"nbrState": "Full", "role": "Backup"},
"r2": {"state": "Full", "role": "DROther"}, "r2": {"nbrState": "Full", "role": "DROther"},
"r3": {"state": "Full", "role": "DROther"}, "r3": {"nbrState": "Full", "role": "DROther"},
} }
} }
} }

View File

@ -411,17 +411,17 @@ def test_ospf_nbrs(tgen):
"neighbors": { "neighbors": {
"100.1.1.1": [ "100.1.1.1": [
{ {
"state": "Full/DROther", "nbrState": "Full/DROther",
} }
], ],
"100.1.1.2": [ "100.1.1.2": [
{ {
"state": "Full/DROther", "nbrState": "Full/DROther",
} }
], ],
"100.1.1.3": [ "100.1.1.3": [
{ {
"state": "Full/DROther", "nbrState": "Full/DROther",
} }
], ],
} }
@ -434,17 +434,17 @@ def test_ospf_nbrs(tgen):
"neighbors": { "neighbors": {
"100.1.1.0": [ "100.1.1.0": [
{ {
"state": "Full/DROther", "nbrState": "Full/DROther",
} }
], ],
"100.1.1.2": [ "100.1.1.2": [
{ {
"state": "Full/DROther", "nbrState": "Full/DROther",
} }
], ],
"100.1.1.3": [ "100.1.1.3": [
{ {
"state": "Full/DROther", "nbrState": "Full/DROther",
} }
], ],
} }
@ -457,17 +457,17 @@ def test_ospf_nbrs(tgen):
"neighbors": { "neighbors": {
"100.1.1.0": [ "100.1.1.0": [
{ {
"state": "Full/DROther", "nbrState": "Full/DROther",
} }
], ],
"100.1.1.1": [ "100.1.1.1": [
{ {
"state": "Full/DROther", "nbrState": "Full/DROther",
} }
], ],
"100.1.1.3": [ "100.1.1.3": [
{ {
"state": "Full/DROther", "nbrState": "Full/DROther",
} }
], ],
} }
@ -480,17 +480,17 @@ def test_ospf_nbrs(tgen):
"neighbors": { "neighbors": {
"100.1.1.0": [ "100.1.1.0": [
{ {
"state": "Full/DROther", "nbrState": "Full/DROther",
} }
], ],
"100.1.1.1": [ "100.1.1.1": [
{ {
"state": "Full/DROther", "nbrState": "Full/DROther",
} }
], ],
"100.1.1.2": [ "100.1.1.2": [
{ {
"state": "Full/DROther", "nbrState": "Full/DROther",
} }
], ],
} }

View File

@ -189,7 +189,9 @@ def test_ospf_gr_helper_tc3_p1(request):
assert ( assert (
ospf_covergence is True ospf_covergence is True
), "OSPF is not after reset config \n Error: {}".format(ospf_covergence) ), "OSPF is not after reset config \n Error: {}".format(ospf_covergence)
step("Configure DR pririty 100 on R0 and clear ospf neighbors on all the routers.")
step("Configure DR priority 100 on R0 and clear ospf neighbors "
"on all the routers.")
input_dict = { input_dict = {
"r0": { "r0": {
@ -214,9 +216,9 @@ def test_ospf_gr_helper_tc3_p1(request):
"r0": { "r0": {
"ospf": { "ospf": {
"neighbors": { "neighbors": {
"r1": {"state": "Full", "role": "Backup"}, "r1": {"nbrState": "Full", "role": "Backup"},
"r2": {"state": "Full", "role": "DROther"}, "r2": {"nbrState": "Full", "role": "DROther"},
"r3": {"state": "Full", "role": "DROther"}, "r3": {"nbrState": "Full", "role": "DROther"},
} }
} }
} }
@ -281,7 +283,7 @@ def test_ospf_gr_helper_tc4_p1(request):
assert ( assert (
ospf_covergence is True ospf_covergence is True
), "OSPF is not after reset config \n Error: {}".format(ospf_covergence) ), "OSPF is not after reset config \n Error: {}".format(ospf_covergence)
step("Configure DR pririty 100 on R0 and clear ospf neighbors on all the routers.") step("Configure DR priority 0 on R0 and clear ospf neighbors on all the routers.")
input_dict = { input_dict = {
"r0": { "r0": {
@ -306,9 +308,9 @@ def test_ospf_gr_helper_tc4_p1(request):
"r0": { "r0": {
"ospf": { "ospf": {
"neighbors": { "neighbors": {
"r1": {"state": "Full", "role": "DR"}, "r1": {"nbrState": "Full", "role": "DR"},
"r2": {"state": "2-Way", "role": "DROther"}, "r2": {"nbrState": "2-Way", "role": "DROther"},
"r3": {"state": "2-Way", "role": "DROther"}, "r3": {"nbrState": "2-Way", "role": "DROther"},
} }
} }
} }

View File

@ -3,7 +3,7 @@
"2.2.2.2":[ "2.2.2.2":[
{ {
"converged":"Full", "converged":"Full",
"address":"10.0.1.2", "ifaceAddress":"10.0.1.2",
"ifaceName":"eth-rt2:10.0.1.1" "ifaceName":"eth-rt2:10.0.1.1"
} }
] ]

View File

@ -3,14 +3,14 @@
"1.1.1.1":[ "1.1.1.1":[
{ {
"converged":"Full", "converged":"Full",
"address":"10.0.1.1", "ifaceAddress":"10.0.1.1",
"ifaceName":"eth-rt1:10.0.1.2" "ifaceName":"eth-rt1:10.0.1.2"
} }
], ],
"3.3.3.3":[ "3.3.3.3":[
{ {
"converged":"Full", "converged":"Full",
"address":"10.0.2.3", "ifaceAddress":"10.0.2.3",
"ifaceName":"eth-rt3:10.0.2.2" "ifaceName":"eth-rt3:10.0.2.2"
} }
] ]

View File

@ -3,21 +3,21 @@
"2.2.2.2":[ "2.2.2.2":[
{ {
"converged":"Full", "converged":"Full",
"address":"10.0.2.2", "ifaceAddress":"10.0.2.2",
"ifaceName":"eth-rt2:10.0.2.3" "ifaceName":"eth-rt2:10.0.2.3"
} }
], ],
"4.4.4.4":[ "4.4.4.4":[
{ {
"converged":"Full", "converged":"Full",
"address":"10.0.3.4", "ifaceAddress":"10.0.3.4",
"ifaceName":"eth-rt4:10.0.3.3" "ifaceName":"eth-rt4:10.0.3.3"
} }
], ],
"6.6.6.6":[ "6.6.6.6":[
{ {
"converged":"Full", "converged":"Full",
"address":"10.0.4.6", "ifaceAddress":"10.0.4.6",
"ifaceName":"eth-rt6:10.0.4.3" "ifaceName":"eth-rt6:10.0.4.3"
} }
] ]

View File

@ -3,14 +3,14 @@
"3.3.3.3":[ "3.3.3.3":[
{ {
"converged":"Full", "converged":"Full",
"address":"10.0.3.3", "ifaceAddress":"10.0.3.3",
"ifaceName":"eth-rt3:10.0.3.4" "ifaceName":"eth-rt3:10.0.3.4"
} }
], ],
"5.5.5.5":[ "5.5.5.5":[
{ {
"converged":"Full", "converged":"Full",
"address":"10.0.5.5", "ifaceAddress":"10.0.5.5",
"ifaceName":"eth-rt5:10.0.5.4" "ifaceName":"eth-rt5:10.0.5.4"
} }
] ]

View File

@ -3,7 +3,7 @@
"4.4.4.4":[ "4.4.4.4":[
{ {
"converged":"Full", "converged":"Full",
"address":"10.0.5.4", "ifaceAddress":"10.0.5.4",
"ifaceName":"eth-rt4:10.0.5.5" "ifaceName":"eth-rt4:10.0.5.5"
} }
] ]

View File

@ -3,14 +3,14 @@
"3.3.3.3":[ "3.3.3.3":[
{ {
"converged":"Full", "converged":"Full",
"address":"10.0.4.3", "ifaceAddress":"10.0.4.3",
"ifaceName":"eth-rt3:10.0.4.6" "ifaceName":"eth-rt3:10.0.4.6"
} }
], ],
"7.7.7.7":[ "7.7.7.7":[
{ {
"converged":"Full", "converged":"Full",
"address":"10.0.6.7", "ifaceAddress":"10.0.6.7",
"ifaceName":"eth-rt7:10.0.6.6" "ifaceName":"eth-rt7:10.0.6.6"
} }
] ]

View File

@ -3,7 +3,7 @@
"6.6.6.6":[ "6.6.6.6":[
{ {
"converged":"Full", "converged":"Full",
"address":"10.0.6.6", "ifaceAddress":"10.0.6.6",
"ifaceName":"eth-rt6:10.0.6.7" "ifaceName":"eth-rt6:10.0.6.7"
} }
] ]

View File

@ -2,57 +2,57 @@
"neighbors":{ "neighbors":{
"192.168.0.11":[ "192.168.0.11":[
{ {
"priority":10, "nbrPriority":10,
"converged":"Full", "converged":"Full",
"address":"192.168.101.11", "ifaceAddress":"192.168.101.11",
"ifaceName":"r1-eth1:192.168.101.1", "ifaceName":"r1-eth1:192.168.101.1",
"retransmitCounter":0, "linkStateRetransmissionListCounter":0,
"requestCounter":0, "linkStateRequestListCounter":0,
"dbSummaryCounter":0 "databaseSummaryListCounter":0
} }
], ],
"192.168.0.12":[ "192.168.0.12":[
{ {
"priority":0, "nbrPriority":0,
"converged":"Full", "converged":"Full",
"address":"192.168.101.12", "ifaceAddress":"192.168.101.12",
"ifaceName":"r1-eth1:192.168.101.1", "ifaceName":"r1-eth1:192.168.101.1",
"retransmitCounter":0, "linkStateRetransmissionListCounter":0,
"requestCounter":0, "linkStateRequestListCounter":0,
"dbSummaryCounter":0 "databaseSummaryListCounter":0
} }
], ],
"192.168.0.13":[ "192.168.0.13":[
{ {
"priority":0, "nbrPriority":0,
"converged":"Full", "converged":"Full",
"address":"192.168.101.13", "ifaceAddress":"192.168.101.13",
"ifaceName":"r1-eth1:192.168.101.1", "ifaceName":"r1-eth1:192.168.101.1",
"retransmitCounter":0, "linkStateRetransmissionListCounter":0,
"requestCounter":0, "linkStateRequestListCounter":0,
"dbSummaryCounter":0 "databaseSummaryListCounter":0
} }
], ],
"192.168.0.14":[ "192.168.0.14":[
{ {
"priority":0, "nbrPriority":0,
"converged":"Full", "converged":"Full",
"address":"192.168.101.14", "ifaceAddress":"192.168.101.14",
"ifaceName":"r1-eth1:192.168.101.1", "ifaceName":"r1-eth1:192.168.101.1",
"retransmitCounter":0, "linkStateRetransmissionListCounter":0,
"requestCounter":0, "linkStateRequestListCounter":0,
"dbSummaryCounter":0 "databaseSummaryListCounter":0
} }
], ],
"192.168.0.15":[ "192.168.0.15":[
{ {
"priority":0, "nbrPriority":0,
"converged":"Full", "converged":"Full",
"address":"192.168.101.15", "ifaceAddress":"192.168.101.15",
"ifaceName":"r1-eth1:192.168.101.1", "ifaceName":"r1-eth1:192.168.101.1",
"retransmitCounter":0, "linkStateRetransmissionListCounter":0,
"requestCounter":0, "linkStateRequestListCounter":0,
"dbSummaryCounter":0 "databaseSummaryListCounter":0
} }
] ]
} }

View File

@ -4,9 +4,9 @@
"neighbors":{ "neighbors":{
"192.168.0.11":[ "192.168.0.11":[
{ {
"priority":10, "nbrPriority":10,
"converged":"Full", "converged":"Full",
"address":"192.168.101.11", "ifaceAddress":"192.168.101.11",
"ifaceName":"r1-eth1:192.168.101.1" "ifaceName":"r1-eth1:192.168.101.1"
} }
] ]

View File

@ -4,9 +4,9 @@
"neighbors":{ "neighbors":{
"192.168.0.12":[ "192.168.0.12":[
{ {
"priority":10, "nbrPriority":10,
"converged":"Full", "converged":"Full",
"address":"192.168.101.12", "ifaceAddress":"192.168.101.12",
"ifaceName":"r1-eth3:192.168.101.1" "ifaceName":"r1-eth3:192.168.101.1"
} }
] ]