]> git.proxmox.com Git - mirror_frr.git/commitdiff
tests: log the router id in ospf tests, improve log in a couple of places
authorJafar Al-Gharaibeh <jafar@atcorp.com>
Wed, 10 May 2023 20:40:00 +0000 (15:40 -0500)
committerJafar Al-Gharaibeh <jafar@atcorp.com>
Thu, 11 May 2023 04:47:03 +0000 (23:47 -0500)
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
tests/topotests/lib/ospf.py
tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_topo1.py

index dad87440bc65b6a192e31d93f0043547cd5791d9..af1618bf62e4732b5daa0e482bb5ef5dcfb68325 100644 (file)
@@ -710,6 +710,7 @@ def verify_ospf_neighbor(
                 else:
                     data_ip = topo["routers"][ospf_nbr]["links"]
                     data_rid = topo["routers"][ospf_nbr]["ospf"]["router_id"]
+                logger.info("ospf neighbor %s:   router-id: %s", router, data_rid)
                 if ospf_nbr in data_ip:
                     nbr_details = nbr_data[ospf_nbr]
                 elif lan:
@@ -728,8 +729,8 @@ def verify_ospf_neighbor(
                 try:
                     nh_state = show_ospf_json[nbr_rid][0]["nbrState"].split("/")[0]
                 except KeyError:
-                    errormsg = "[DUT: {}] OSPF peer {} missing,from " "{} ".format(
-                        router, nbr_rid, ospf_nbr
+                    errormsg = "[DUT: {}] missing OSPF neighbor {} with router-id {}".format(
+                        router, ospf_nbr, nbr_rid
                     )
                     return errormsg
 
@@ -945,7 +946,7 @@ def verify_ospf6_neighbor(tgen, topo=None, dut=None, input_dict=None, lan=False)
                     data_ip = data_rid = topo["routers"][nbr_data["nbr"]]["ospf6"][
                         "router_id"
                     ]
-
+                logger.info("ospf neighbor %s:   router-id: %s", ospf_nbr, data_rid)
                 if ospf_nbr in data_ip:
                     nbr_details = nbr_data[ospf_nbr]
                 elif lan:
@@ -968,8 +969,8 @@ def verify_ospf6_neighbor(tgen, topo=None, dut=None, input_dict=None, lan=False)
                     nh_state = get_index_val.get(neighbor_ip)["state"]
                     intf_state = get_index_val.get(neighbor_ip)["ifState"]
                 except TypeError:
-                    errormsg = "[DUT: {}] OSPF peer {} missing,from " "{} ".format(
-                        router, nbr_rid, ospf_nbr
+                    errormsg = "[DUT: {}] missing OSPF neighbor {} with router-id {}".format(
+                        router, ospf_nbr, nbr_rid
                     )
                     return errormsg
 
index 9d7a15833c16b3eb487f19dad13f8d0c86c61970..ba1d49f4272dacd7dabf8cc1b2ea38e04260e493 100644 (file)
@@ -84,8 +84,8 @@ SUMMARY = {"ipv4": ["11.0.0.0/8", "12.0.0.0/8", "11.0.0.0/24"]}
 """
 TOPOOLOGY =
       Please view in a fixed-width font such as Courier.
-      +---+  A0       +---+
-      +R1 +------------+R2 |
+      +---+  A0        +---+
+      |R1 +------------+R2 |
       +-+-+-           +--++
         |  --        --  |
         |    -- A0 --    |
@@ -94,8 +94,8 @@ TOPOOLOGY =
         |    --    --    |
         |  --        --  |
       +-+-+-            +-+-+
-      +R0 +-------------+R3 |
-      +---+     A0     +---+
+      |R0 +-------------+R3 |
+      +---+     A0      +---+
 
 TESTCASES =
 1. OSPF summarisation functionality.
@@ -1519,7 +1519,7 @@ def test_ospf_type5_summary_tc45_p0(request):
     step("Repeat steps 1 to 10 of summarisation in non Back bone area.")
     reset_config_on_routers(tgen)
 
-    step("Change the area id on the interface on R0")
+    step("Change the area id on the interface on R0 to R1 from 0.0.0.0 to 0.0.0.1")
     input_dict = {
         "r0": {
             "links": {
@@ -1549,7 +1549,7 @@ def test_ospf_type5_summary_tc45_p0(request):
     result = create_interfaces_cfg(tgen, input_dict)
     assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
 
-    step("Change the area id on the interface  ")
+    step("Change the area id on the interface on R1 to R0 from 0.0.0.0 to 0.0.0.1")
     input_dict = {
         "r1": {
             "links": {