]> git.proxmox.com Git - mirror_frr.git/commitdiff
tests: Enchanced static routing testsuits
authornaveen <nguggarigoud@vmware.com>
Tue, 14 Apr 2020 06:34:36 +0000 (12:04 +0530)
committerVijay Kumar Gupta <vijayg@vmware.com>
Fri, 11 Dec 2020 00:44:48 +0000 (16:44 -0800)
1. BGP timers are modified to reduce the run time.
2. Static sleeps are removed from the scripts.

Signed-off-by: naveen <nguggarigoud@vmware.com>
16 files changed:
tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py
tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py
tests/topotests/static_routing_with_ebgp/static_routes_topo1_ebgp.json
tests/topotests/static_routing_with_ebgp/static_routes_topo2_ebgp.json
tests/topotests/static_routing_with_ebgp/static_routes_topo3_ebgp.json
tests/topotests/static_routing_with_ebgp/test_static_routes_topo1_ebgp.py
tests/topotests/static_routing_with_ebgp/test_static_routes_topo2_ebgp.py
tests/topotests/static_routing_with_ebgp/test_static_routes_topo3_ebgp.py
tests/topotests/static_routing_with_ebgp/test_static_routes_topo4_ebgp.py
tests/topotests/static_routing_with_ibgp/static_routes_topo1_ibgp.json
tests/topotests/static_routing_with_ibgp/static_routes_topo2_ibgp.json
tests/topotests/static_routing_with_ibgp/static_routes_topo3_ibgp.json
tests/topotests/static_routing_with_ibgp/test_static_routes_topo1_ibgp.py
tests/topotests/static_routing_with_ibgp/test_static_routes_topo2_ibgp.py
tests/topotests/static_routing_with_ibgp/test_static_routes_topo3_ibgp.py
tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py

index 54a3c699f3538fc069fd0db074bd3cfa99192e27..28a1b98eb31884f34aae1013ddcf7eca9d3337fa 100644 (file)
@@ -312,9 +312,9 @@ def test_modify_ecmp_max_paths(request, ecmp_num, test_type):
 
     write_test_footer(tc_name)
 
-
+@pytest.mark.parametrize("ecmp_num", ["8", "16", "32"])
 @pytest.mark.parametrize("test_type", ["redist_static", "advertise_nw"])
-def test_ecmp_after_clear_bgp(request, test_type):
+def test_ecmp_after_clear_bgp(request, ecmp_num, test_type):
     """ Verify BGP table and RIB in DUT after clear BGP routes and neighbors"""
 
     tc_name = request.node.name
@@ -337,7 +337,7 @@ def test_ecmp_after_clear_bgp(request, test_type):
             addr_type,
             dut,
             input_dict_1,
-            next_hop=NEXT_HOPS[addr_type],
+            next_hop=NEXT_HOPS[addr_type][:int(ecmp_num)],
             protocol=protocol,
         )
         assert result is True, "Testcase {} : Failed \n Error: {}".format(
@@ -360,7 +360,7 @@ def test_ecmp_after_clear_bgp(request, test_type):
             addr_type,
             dut,
             input_dict_1,
-            next_hop=NEXT_HOPS[addr_type],
+            next_hop=NEXT_HOPS[addr_type][:int(ecmp_num)],
             protocol=protocol,
         )
         assert result is True, "Testcase {} : Failed \n Error: {}".format(
index 73724ac069b96c2dadff760143fec7a7ef7ea895..4d8003c4bea72f9420be113dba01653a52147ee5 100644 (file)
@@ -313,9 +313,9 @@ def test_modify_ecmp_max_paths(request, ecmp_num, test_type):
 
     write_test_footer(tc_name)
 
-
+@pytest.mark.parametrize("ecmp_num", ["8", "16", "32"])
 @pytest.mark.parametrize("test_type", ["redist_static", "advertise_nw"])
-def test_ecmp_after_clear_bgp(request, test_type):
+def test_ecmp_after_clear_bgp(request, ecmp_num, test_type):
     """ Verify BGP table and RIB in DUT after clear BGP routes and neighbors"""
 
     tc_name = request.node.name
@@ -338,7 +338,7 @@ def test_ecmp_after_clear_bgp(request, test_type):
             addr_type,
             dut,
             input_dict_1,
-            next_hop=NEXT_HOPS[addr_type],
+            next_hop=NEXT_HOPS[addr_type][:int(ecmp_num)],
             protocol=protocol,
         )
         assert result is True, "Testcase {} : Failed \n Error: {}".format(
@@ -361,7 +361,7 @@ def test_ecmp_after_clear_bgp(request, test_type):
             addr_type,
             dut,
             input_dict_1,
-            next_hop=NEXT_HOPS[addr_type],
+            next_hop=NEXT_HOPS[addr_type][:int(ecmp_num)],
             protocol=protocol,
         )
         assert result is True, "Testcase {} : Failed \n Error: {}".format(
index 9d337f6cdfbc912aa0e8139def501264742fc920..7099043adc868434f530536e36ad2c770aedf6b0 100644 (file)
                             "neighbor": {
                                 "r3": {
                                     "dest_link": {
-                                        "r2": {}
+                                        "r2": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
                             "neighbor": {
                                 "r3": {
                                     "dest_link": {
-                                        "r2": {}
+                                        "r2": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
                             "neighbor": {
                                 "r2": {
                                     "dest_link": {
-                                        "r3": {}
+                                        "r3": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
                             "neighbor": {
                                 "r2": {
                                     "dest_link": {
-                                        "r3": {}
+                                        "r3": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
index fc849d807cc1dbe159d7888ed04ff265b61efb1e..91820b04917a81a6cad7c95c6da2b748e15da78e 100644 (file)
                             "neighbor": {
                                 "r3": {
                                     "dest_link": {
-                                        "r2-link0": {},
-                                        "r2-link1": {},
-                                        "r2-link2": {},
-                                        "r2-link3": {},
-                                        "r2-link4": {},
-                                        "r2-link5": {},
-                                        "r2-link6": {},
-                                        "r2-link7": {}
+                                        "r2-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link1": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link2": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link3": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link4": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link5": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link6": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link7": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             },
                             "neighbor": {
                                 "r3": {
                                     "dest_link": {
-                                        "r2-link0": {},
-                                        "r2-link1": {},
-                                        "r2-link2": {},
-                                        "r2-link3": {},
-                                        "r2-link4": {},
-                                        "r2-link5": {},
-                                        "r2-link6": {},
-                                        "r2-link7": {}
+                                        "r2-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link1": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link2": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link3": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link4": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link5": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link6": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link7": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             },
                             "neighbor": {
                                 "r2": {
                                     "dest_link": {
-                                        "r3-link0": {},
-                                        "r3-link1": {},
-                                        "r3-link2": {},
-                                        "r3-link3": {},
-                                        "r3-link4": {},
-                                        "r3-link5": {},
-                                        "r3-link6": {},
-                                        "r3-link7": {}
+                                        "r3-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link1": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link2": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link3": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link4": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link5": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link6": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link7": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
                             "neighbor": {
                                 "r2": {
                                     "dest_link": {
-                                        "r3-link0": {},
-                                        "r3-link1": {},
-                                        "r3-link2": {},
-                                        "r3-link3": {},
-                                        "r3-link4": {},
-                                        "r3-link5": {},
-                                        "r3-link6": {},
-                                        "r3-link7": {}
+                                        "r3-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link1": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link2": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link3": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link4": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link5": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link6": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link7": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
index 7c1d7f87939e1cbd41374bdf297a7b5335fe68a0..5246a311ea42fc0a6817ec87f1e202b5741fbd3a 100644 (file)
                             "neighbor": {
                                 "r3": {
                                     "dest_link": {
-                                        "r2-link0": {}
+                                        "r2-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
                             "neighbor": {
                                 "r3": {
                                     "dest_link": {
-                                        "r2-link0": {}
+                                        "r2-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
                             "neighbor": {
                                 "r2": {
                                     "dest_link": {
-                                        "r3-link0": {}
+                                        "r3-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
                             "neighbor": {
                                 "r2": {
                                     "dest_link": {
-                                        "r3-link0": {}
+                                        "r3-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
index 7a31ec53c8771dedac0e7f949e9cfa5e80586888..f9da188688fd84e9913d22cb6bf59aec43b35b75 100644 (file)
@@ -35,7 +35,6 @@ import time
 import os
 import pytest
 import ipaddr
-from time import sleep
 
 # Save the Current Working Directory to find configuration files.
 CWD = os.path.dirname(os.path.realpath(__file__))
@@ -533,7 +532,7 @@ def test_static_route_2nh_p0_tc_1_ebgp(request):
         step("Reload the FRR router")
         # stop/start -> restart FRR router and verify
         stop_router(tgen, "r2")
-        sleep(5)
+
         start_router(tgen, "r2")
 
         dut = "r2"
@@ -990,7 +989,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(request):
         step("Reload the FRR router")
         # stop/start -> restart FRR router and verify
         stop_router(tgen, "r2")
-        sleep(5)
+
         start_router(tgen, "r2")
 
         step(
index e9ca4d7ae317e52475272bad498099cfb4e2b3b0..698d581b17e8f59c1d444eccece304568cd1e573 100644 (file)
@@ -471,7 +471,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ebgp(request):
     intf = topo["routers"]["r2"]["links"]["r1-link{}".format(randnum)]["interface"]
     shutdown_bringup_interface(tgen, dut, intf, False)
 
-    sleep(5)
+
 
     step("Random no shut of the nexthop interfaces")
     # Bringup interface
@@ -564,7 +564,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ebgp(request):
     step("Reload the FRR router")
     # stop/start -> restart FRR router and verify
     stop_router(tgen, "r2")
-    sleep(5)
+
     start_router(tgen, "r2")
 
     step(
@@ -607,7 +607,8 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ebgp(request):
         intf = topo["routers"]["r2"]["links"]["r3-link{}".format(intfr)]["interface"]
         shutdown_bringup_interface(tgen, dut, intf, False)
 
-    sleep(200)
+    # sleep for twice the holddowntimer so that bgp deletes the neighbors.
+    sleep(8)
 
     step("verify bgp convergence as all interface are shut")
 
@@ -1046,7 +1047,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ebgp(request):
     step("Reload the FRR router")
     # stop/start -> restart FRR router and verify
     stop_router(tgen, "r2")
-    sleep(5)
+
     start_router(tgen, "r2")
 
     for addr_type in ADDR_TYPES:
@@ -1511,7 +1512,7 @@ def test_static_route_8nh_diff_AD_ebgp_ecmp_p1_tc8_ebgp(request):
     step("Reload the FRR router")
     # stop/start -> restart FRR router and verify
     stop_router(tgen, "r2")
-    sleep(5)
+
     start_router(tgen, "r2")
 
     for addr_type in ADDR_TYPES:
@@ -1950,7 +1951,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ebgp(request):
             step("Reload the FRR router")
             # stop/start -> restart FRR router and verify
             stop_router(tgen, "r2")
-            sleep(5)
+
             start_router(tgen, "r2")
 
             step("After reloading, verify that routes are still present in R2.")
@@ -1981,7 +1982,8 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ebgp(request):
                 "interface"
             ]
             shutdown_bringup_interface(tgen, dut, intf, False)
-        sleep(180)
+        # sleep for twice the holddowntimer so that bgp deletes the neighbors.
+        sleep(8)
         step("verify bgp convergence as all interface are shut")
 
         bgp_convergence = verify_bgp_convergence(tgen, topo)
@@ -2032,7 +2034,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ebgp(request):
             assert result is not True, "Testcase {} : Failed \nError: Routes "
             " are still present in RIB after BGP nbr is down".format(tc_name)
 
-        sleep(5)
+
         dut = "r2"
         for intfr in range(0, 8):
             intf = topo["routers"]["r2"]["links"]["r3-link{}".format(intfr)][
@@ -2040,7 +2042,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ebgp(request):
             ]
             shutdown_bringup_interface(tgen, dut, intf, True)
 
-        sleep(5)
+
         dut = "r3"
         for intfr in range(0, 8):
             intf = topo["routers"]["r3"]["links"]["r2-link{}".format(intfr)][
index e055a161c23416e35071313ecac4faa0aa43832c..3017b3c18a668251967b1aae1e00fa8345e4978f 100644 (file)
@@ -36,7 +36,6 @@ import time
 import os
 import pytest
 import ipaddr
-from time import sleep
 from copy import deepcopy
 import random
 from re import search as re_search
@@ -447,7 +446,6 @@ def test_staticroute_with_ecmp_p0_tc3_ebgp(request):
     step("Reload the FRR router")
     # stop/start -> restart FRR router and verify
     stop_router(tgen, "r2")
-    sleep(5)
     start_router(tgen, "r2")
 
     result = verify_rib(
@@ -801,7 +799,6 @@ def test_staticroute_with_ecmp_with_diff_AD_p0_tc4_ebgp(request):
     step("Reload the FRR router")
     # stop/start -> restart FRR router and verify
     stop_router(tgen, "r2")
-    sleep(5)
     start_router(tgen, "r2")
 
     step(
index a0894074c282058ae82db867908730604d16f5ab..14450cdab773e38af3e3bb56486130cdb0750225 100644 (file)
@@ -36,7 +36,6 @@ import os
 import pytest
 import ipaddr
 import ipaddress
-from time import sleep
 from copy import deepcopy
 
 # Save the Current Working Directory to find configuration files.
index 5f263072ab5c1fd7496c3f28dc5b8d3af78afc57..99b197366a9facbdd3215b04757207ce23e773bc 100644 (file)
                             "neighbor": {
                                 "r3": {
                                     "dest_link": {
-                                        "r2": {}
+                                        "r2": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
                             "neighbor": {
                                 "r3": {
                                     "dest_link": {
-                                        "r2": {}
+                                        "r2": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
                             "neighbor": {
                                 "r2": {
                                     "dest_link": {
-                                        "r3": {}
+                                        "r3": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
                             "neighbor": {
                                 "r2": {
                                     "dest_link": {
-                                        "r3": {}
+                                        "r3": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
index 7537e5cf98f0c488e9ca03caeed88a84ff6276cd..47596a0a1a9c0b25e763f874872659b6aa2b34bd 100644 (file)
                         "unicast": {
                             "neighbor": {
                                 "r3": {
+
+
                                     "dest_link": {
-                                        "r2-link0": {},
-                                        "r2-link1": {},
-                                        "r2-link2": {},
-                                        "r2-link3": {},
-                                        "r2-link4": {},
-                                        "r2-link5": {},
-                                        "r2-link6": {},
-                                        "r2-link7": {}
+                                        "r2-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link1": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link2": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link3": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link4": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link5": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link6": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link7": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             },
                         "unicast": {
                             "neighbor": {
                                 "r3": {
+
+
                                     "dest_link": {
-                                        "r2-link0": {},
-                                        "r2-link1": {},
-                                        "r2-link2": {},
-                                        "r2-link3": {},
-                                        "r2-link4": {},
-                                        "r2-link5": {},
-                                        "r2-link6": {},
-                                        "r2-link7": {}
+                                        "r2-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link1": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link2": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link3": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link4": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link5": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link6": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r2-link7": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             },
                         "unicast": {
                             "neighbor": {
                                 "r2": {
+
+
                                     "dest_link": {
-                                        "r3-link0": {},
-                                        "r3-link1": {},
-                                        "r3-link2": {},
-                                        "r3-link3": {},
-                                        "r3-link4": {},
-                                        "r3-link5": {},
-                                        "r3-link6": {},
-                                        "r3-link7": {}
+                                        "r3-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link1": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link2": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link3": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link4": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link5": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link6": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link7": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
                         "unicast": {
                             "neighbor": {
                                 "r2": {
+
+
                                     "dest_link": {
-                                        "r3-link0": {},
-                                        "r3-link1": {},
-                                        "r3-link2": {},
-                                        "r3-link3": {},
-                                        "r3-link4": {},
-                                        "r3-link5": {},
-                                        "r3-link6": {},
-                                        "r3-link7": {}
+                                        "r3-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link1": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link2": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link3": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link4": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link5": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link6": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        },
+                                        "r3-link7": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
index 3346609c58ba54ca684eac921f0eea4b957ed0fb..4e27229f348cfb4a106c6a9ddf9d0c208da05616 100644 (file)
                             "neighbor": {
                                 "r3": {
                                     "dest_link": {
-                                        "r2-link0": {}
+                                        "r2-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
                             "neighbor": {
                                 "r3": {
                                     "dest_link": {
-                                        "r2-link0": {}
+                                        "r2-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
                             "neighbor": {
                                 "r2": {
                                     "dest_link": {
-                                        "r3-link0": {}
+                                        "r3-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
                             "neighbor": {
                                 "r2": {
                                     "dest_link": {
-                                        "r3-link0": {}
+                                        "r3-link0": {
+                                            "keepalivetimer": 1,
+                                            "holddowntimer": 4
+                                        }
                                     }
                                 }
                             }
index dc68f16ac4ed6887bac40481b8642de2817e76b7..cf486812398e93433a44bcac47e144dc196d1ccf 100644 (file)
@@ -35,7 +35,6 @@ import time
 import os
 import pytest
 import ipaddr
-from time import sleep
 from copy import deepcopy
 
 # Save the Current Working Directory to find configuration files.
@@ -532,7 +531,7 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
         step("Reload the FRR router")
         # stop/start -> restart FRR router and verify
         stop_router(tgen, "r2")
-        sleep(5)
+
         start_router(tgen, "r2")
 
         dut = "r2"
@@ -989,7 +988,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
         step("Reload the FRR router")
         # stop/start -> restart FRR router and verify
         stop_router(tgen, "r2")
-        sleep(5)
+
         start_router(tgen, "r2")
 
         step(
@@ -1071,243 +1070,6 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
     write_test_footer(tc_name)
 
 
-"""
-def test_same_rte_from_bgp_static_P0_tc5(request):
-
-    #Verify RIB status when same route advertise via BGP and static
-    #route
-
-
-    tc_name = request.node.name
-    write_test_header(tc_name)
-    tgen = get_topogen()
-    # Don't run this test if we have any failure.
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    NEXT_HOP_IP = populate_nh()
-    step('Configure iBGP IPv4 peering between R2 and R3 router.')
-    reset_config_on_routers(tgen)
-    step(
-        'Configure IPv4 static route (10.1.1.1/24) in R2 with next hop'
-        'N1 (28.1.1.2 ) and N2 (29.1.1.2) , Static route next-hop present'
-        'on R1')
-
-    for addr_type in ADDR_TYPES:
-        input_dict_4 = {
-            "r2": {
-                "static_routes": [
-                    {
-                        "network": NETWORK[addr_type],
-                        "next_hop": NEXT_HOP_IP['nh1'][addr_type]
-                    },
-                    {
-                        "network": NETWORK[addr_type],
-                        "next_hop": NEXT_HOP_IP['nh2'][addr_type]
-                    }
-                ]
-            }
-        }
-        logger.info("Configure static routes")
-        result = create_static_routes(tgen, input_dict_4)
-        assert result is True, "Testcase {} : Failed \n Error: {}".format(
-            tc_name, result)
-
-    step('Configure redistribute static in BGP.')
-    for addr_type in ADDR_TYPES:
-        input_dict_2 = {
-            "r2": {
-                "bgp": {
-                    "address_family": {
-                        addr_type: {
-                            "unicast": {
-                                "redistribute": [{
-                                    "redist_type": "static"
-                                }]
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        result = create_router_bgp(tgen, topo, input_dict_2)
-        assert result is True, "Testcase {} : Failed \n Error: {}".format(
-            tc_name, result)
-        step("Verify on R3 , route receive on R3 BGP table ")
-        dut = 'r3'
-        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4)
-        assert result is True, "Testcase {} : Failed \nError: Route is"
-        " still present in RIB".format(tc_name)
-
-        step("Verify route installed in the RIB and FIB of R3")
-        protocol = 'bgp'
-        result = verify_rib(
-            tgen, addr_type, dut, input_dict_4, protocol=protocol)
-        assert result is True, "Testcase {} : Failed \nError: Route is"
-        " still present in RIB".format(tc_name)
-
-    step(
-        'Configure 2 links/interfaces between R1 and R3 , keep one'
-        'interface in shut (active) state and other interface in no shut'
-        '(inactive) state')
-    dut = 'r3'
-    intf = topo['routers']['r3']['links']['r1-link0']['interface']
-    shutdown_bringup_interface(tgen, dut, intf, False)
-
-    step(
-        'Configure same static route (10.1.1.1/24) in R3 with inactive'
-        'nexthop interface')
-
-    step(
-        'Configure same static route 10.1.1.1/24) again in R3 with'
-        'active nexthop interface')
-    for addr_type in ADDR_TYPES:
-        input_dict_4 = {
-            "r3": {
-                "static_routes": [
-                    {
-                        "network": NETWORK[addr_type],
-                        "next_hop": topo['routers']['r1']['links']['r3-link0'][
-                            addr_type]
-                    },
-                    {
-                        "network": NETWORK[addr_type],
-                        "next_hop": topo['routers']['r1']['links']['r3-link1'][
-                            addr_type]
-                    }
-                ]
-            }
-        }
-        logger.info("Configure static routes")
-        result = create_static_routes(tgen, input_dict_4)
-        assert result is True, "Testcase {} : Failed \n Error: {}".format(
-            tc_name, result)
-
-        step(
-            "Verify when static route configure with inactive nexthop , "
-            "verify BGP received route is active in the RIB and FIB")
-        dut = 'r3'
-        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4)
-        assert result is True, "Testcase {} : Failed \nError: Route is"
-        " missing in BGP RIB".format(tc_name)
-
-        protocol = 'bgp'
-        result = verify_rib(
-            tgen, addr_type, dut, input_dict_4, protocol=protocol, fib=True)
-        assert result is True, "Testcase {} : Failed \nError: Route is"
-        " missing in RIB".format(tc_name)
-
-    step('Remove the redistribute static knob from R2 router')
-    for addr_type in ADDR_TYPES:
-        input_dict_2 = {
-            "r2": {
-                "bgp": {
-                    "address_family": {
-                        addr_type: {
-                            "unicast": {
-                                "redistribute": [{
-                                    "redist_type": "static",
-                                    "delete": True
-                                }]
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        result = create_router_bgp(tgen, topo, input_dict_2)
-        assert result is True, "Testcase {} : Failed \n Error: {}".format(
-            tc_name, result)
-
-        step(
-            "After removing /adding the redistribute static knob , "
-            "BGP received route is deleted and added in RIB of R3 ")
-        dut = 'r3'
-        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4)
-        assert result is not True, "Testcase {} : Failed \nError: Route is"
-        " still present in RIB".format(tc_name)
-
-        protocol = 'bgp'
-        result = verify_rib(
-            tgen, addr_type, dut, input_dict_4, protocol=protocol, fib=True)
-        assert result is not True, "Testcase {} : Failed \nError: Route is"
-        " still present in RIB".format(tc_name)
-
-    step('Configure the redistribute static knob again on R2 router')
-    for addr_type in ADDR_TYPES:
-        input_dict_2 = {
-            "r2": {
-                "bgp": {
-                    "address_family": {
-                        addr_type: {
-                            "unicast": {
-                                "redistribute": [{
-                                    "redist_type": "static",
-                                }]
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        result = create_router_bgp(tgen, topo, input_dict_2)
-        assert result is True, "Testcase {} : Failed \n Error: {}".format(
-            tc_name, result)
-        dut = 'r3'
-        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4)
-        assert result is True, "Testcase {} : Failed \nError: Route is"
-        " missing in BGP RIB".format(tc_name)
-
-        protocol = 'bgp'
-        result = verify_rib(
-            tgen, addr_type, dut, input_dict_4, protocol=protocol, fib=True)
-        assert result is True, "Testcase {} : Failed \nError: Route is"
-        " missing in RIB".format(tc_name)
-
-    step(
-        'Remove the static route on R3 configured with active'
-        'interface')
-    for addr_type in ADDR_TYPES:
-        input_dict_4 = {
-            "r3": {
-                "static_routes": [
-                    {
-                        "network": NETWORK[addr_type],
-                        "next_hop": topo['routers']['r1']['links']['r3-link0'][
-                            addr_type],
-                        "delete": True
-                    },
-                    {
-                        "network": NETWORK[addr_type],
-                        "next_hop": topo['routers']['r1']['links']['r3-link1'][
-                            addr_type],
-                        "delete": True
-                    }
-                ]
-            }
-        }
-        logger.info("Configure static routes")
-        result = create_static_routes(tgen, input_dict_4)
-        assert result is True, "Testcase {} : Failed \n Error: {}".format(
-            tc_name, result)
-        step(
-            "After removing the static route with active nexthop verify "
-            "BGP received route is became active in RIB and FIB")
-        dut = 'r3'
-        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4)
-        assert result is True, "Testcase {} : Failed \nError: Route is"
-        " missing in BGP RIB".format(tc_name)
-
-        protocol = 'bgp'
-        result = verify_rib(
-            tgen, addr_type, dut, input_dict_4, protocol=protocol, fib=True)
-        assert result is True, "Testcase {} : Failed \nError: Route is"
-        " missing in RIB".format(tc_name)
-
-    write_test_footer(tc_name)
-"""
-
-
 if __name__ == "__main__":
     args = ["-s"] + sys.argv[1:]
     sys.exit(pytest.main(args))
index 0e051d69107c7c0a4cf335957bb84d000476b5a3..a9dee567dcc5143cde34df1e7698ec6acecec8f9 100644 (file)
@@ -473,7 +473,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ibgp(request):
     intf = topo["routers"]["r2"]["links"]["r1-link{}".format(randnum)]["interface"]
     shutdown_bringup_interface(tgen, dut, intf, False)
 
-    sleep(5)
+
 
     step("Random no shut of the nexthop interfaces")
     # Bringup interface
@@ -566,7 +566,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ibgp(request):
     step("Reload the FRR router")
     # stop/start -> restart FRR router and verify
     stop_router(tgen, "r2")
-    sleep(5)
+
     start_router(tgen, "r2")
 
     step(
@@ -609,7 +609,8 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ibgp(request):
         intf = topo["routers"]["r2"]["links"]["r3-link{}".format(intfr)]["interface"]
         shutdown_bringup_interface(tgen, dut, intf, False)
 
-    sleep(200)
+    # sleep for twice the holddowntimer so that bgp deletes the neighbors.
+    sleep(8)
 
     step("verify bgp convergence as all interface are shut")
 
@@ -1062,7 +1063,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ibgp(request):
     step("Reload the FRR router")
     # stop/start -> restart FRR router and verify
     stop_router(tgen, "r2")
-    sleep(5)
+
     start_router(tgen, "r2")
 
     for addr_type in ADDR_TYPES:
@@ -1530,7 +1531,7 @@ def test_static_route_8nh_diff_AD_ibgp_ecmp_p1_tc7_ibgp(request):
     step("Reload the FRR router")
     # stop/start -> restart FRR router and verify
     stop_router(tgen, "r2")
-    sleep(5)
+
     start_router(tgen, "r2")
 
     for addr_type in ADDR_TYPES:
@@ -1969,7 +1970,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ibgp(request):
             step("Reload the FRR router")
             # stop/start -> restart FRR router and verify
             stop_router(tgen, "r2")
-            sleep(5)
+
             start_router(tgen, "r2")
 
             step("After reloading, verify that routes are still present in R2.")
@@ -2000,7 +2001,8 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ibgp(request):
                 "interface"
             ]
             shutdown_bringup_interface(tgen, dut, intf, False)
-        sleep(180)
+        # sleep for twice the holddowntimer so that bgp deletes the neighbors.
+        sleep(8)
         step("verify bgp convergence as all interface are shut")
 
         bgp_convergence = verify_bgp_convergence(tgen, topo)
@@ -2051,7 +2053,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ibgp(request):
             assert result is not True, "Testcase {} : Failed \nError: Routes "
             " are still present in RIB after BGP nbr is down".format(tc_name)
 
-        sleep(5)
+
         dut = "r2"
         for intfr in range(0, 8):
             intf = topo["routers"]["r2"]["links"]["r3-link{}".format(intfr)][
@@ -2059,7 +2061,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ibgp(request):
             ]
             shutdown_bringup_interface(tgen, dut, intf, True)
 
-        sleep(5)
+
         dut = "r3"
         for intfr in range(0, 8):
             intf = topo["routers"]["r3"]["links"]["r2-link{}".format(intfr)][
index 3458893f69455f2c671e3006d9a92afbaf734080..8e8b84f8a3d09bd87f93b5a33ae93935590780b6 100644 (file)
@@ -36,7 +36,6 @@ import time
 import os
 import pytest
 import ipaddr
-from time import sleep
 from copy import deepcopy
 import random
 from re import search as re_search
@@ -447,7 +446,7 @@ def test_staticroute_with_ecmp_p0_tc3_ibgp(request):
     step("Reload the FRR router")
     # stop/start -> restart FRR router and verify
     stop_router(tgen, "r2")
-    sleep(5)
+
     start_router(tgen, "r2")
 
     result = verify_rib(
@@ -801,7 +800,7 @@ def test_staticroute_with_ecmp_with_diff_AD_p0_tc4_ibgp(request):
     step("Reload the FRR router")
     # stop/start -> restart FRR router and verify
     stop_router(tgen, "r2")
-    sleep(5)
+
     start_router(tgen, "r2")
 
     step(
index abc89b90ee1a069c7c94e5ee78d2eec1bb553c2c..269318428a1e649a15ecd1dc8bca66d1d47d77b8 100644 (file)
@@ -26,7 +26,6 @@ Following tests are covered in the script.
 
 - Verify static route are blocked from route-map and prefix-list
     applied in BGP nbrs
-- Verify Static route when FRR connected to 2 TOR
 """
 
 import sys
@@ -36,7 +35,6 @@ import os
 import pytest
 import ipaddr
 import ipaddress
-from time import sleep
 from copy import deepcopy
 
 # Save the Current Working Directory to find configuration files.
@@ -47,14 +45,12 @@ sys.path.append(os.path.join(CWD, "../lib/"))
 # Import topogen and topotest helpers
 from mininet.topo import Topo
 from lib.topogen import Topogen, get_topogen
-from time import sleep
 
 from lib.common_config import (
     start_topology,
     write_test_header,
     write_test_footer,
     reset_config_on_routers,
-    verify_kernel_ping,
     verify_rib,
     create_static_routes,
     check_address_types,
@@ -987,227 +983,6 @@ def test_static_routes_rmap_pfxlist_p0_tc7_ibgp(request):
     write_test_footer(tc_name)
 
 
-def test_static_routes_tor_p0_tc5_ibgp(request):
-    """Verify Static route when FRR connected to 2 TOR."""
-    tc_name = request.node.name
-    write_test_header(tc_name)
-    tgen = get_topogen()
-    # Don't run this test if we have any failure.
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-    step("Configure link between FRR to FRR1 & FRR2 as shown in the topology.")
-    step("Attach 2 VMs (vm1 & vm2) to FRR, vm3 to FRR1 ,vm4 to FRR2.")
-    step("Configure Ipv4 and ipv6 addresses on all the interfaces.")
-
-    reset_config_on_routers(tgen)
-
-    def_nw = {"ipv4": "0.0.0.0/0", "ipv6": "0::0/0"}
-    step(
-        "Configure the static route (ipv4 & ipv6) on FRR to vm3 and vm4 "
-        "with next hop as FRR1 and FRR2 respectively."
-    )
-    for addr_type in ADDR_TYPES:
-        # Enable static routes
-        for vm in ["vm1", "vm2", "vm3", "vm6"]:
-            input_dict_4 = {
-                vm: {
-                    "static_routes": [
-                        {
-                            "network": def_nw[addr_type],
-                            "next_hop": topo["routers"]["r2"]["links"][vm][
-                                addr_type
-                            ].split("/")[0],
-                        }
-                    ]
-                }
-            }
-            logger.info("Configure static routes")
-            result = create_static_routes(tgen, input_dict_4)
-            assert result is True, "Testcase {} : Failed \n Error: {}".format(
-                tc_name, result
-            )
-
-        input_dict_4 = {
-            "vm4": {
-                "static_routes": [
-                    {
-                        "network": def_nw[addr_type],
-                        "next_hop": topo["routers"]["r1"]["links"]["vm4"][
-                            addr_type
-                        ].split("/")[0],
-                    }
-                ]
-            }
-        }
-        logger.info("Configure static routes")
-        result = create_static_routes(tgen, input_dict_4)
-        assert result is True, "Testcase {} : Failed \n Error: {}".format(
-            tc_name, result
-        )
-
-        input_dict_4 = {
-            "vm5": {
-                "static_routes": [
-                    {
-                        "network": def_nw[addr_type],
-                        "next_hop": topo["routers"]["r3"]["links"]["vm5"][
-                            addr_type
-                        ].split("/")[0],
-                    }
-                ]
-            }
-        }
-        logger.info("Configure static routes")
-        result = create_static_routes(tgen, input_dict_4)
-        assert result is True, "Testcase {} : Failed \n Error: {}".format(
-            tc_name, result
-        )
-
-        input_dict_4 = {
-            "r1": {
-                "static_routes": [
-                    {
-                        "network": topo["routers"]["vm1"]["links"]["r2"][
-                            addr_type
-                        ].split("/")[0]
-                        + "/16",
-                        "next_hop": topo["routers"]["r2"]["links"]["r1-link0"][
-                            addr_type
-                        ].split("/")[0],
-                    },
-                    {
-                        "network": topo["routers"]["vm2"]["links"]["r2"][
-                            addr_type
-                        ].split("/")[0]
-                        + "/16",
-                        "next_hop": topo["routers"]["r2"]["links"]["r1-link0"][
-                            addr_type
-                        ].split("/")[0],
-                    },
-                ]
-            }
-        }
-
-        logger.info("Configure static routes")
-        result = create_static_routes(tgen, input_dict_4)
-        assert result is True, "Testcase {} : Failed \n Error: {}".format(
-            tc_name, result
-        )
-
-        # Enable static routes
-        input_dict_4 = {
-            "r3": {
-                "static_routes": [
-                    {
-                        "network": topo["routers"]["vm3"]["links"]["r2"][
-                            addr_type
-                        ].split("/")[0]
-                        + "/16",
-                        "next_hop": topo["routers"]["r2"]["links"]["r3-link0"][
-                            addr_type
-                        ].split("/")[0],
-                    },
-                    {
-                        "network": topo["routers"]["vm6"]["links"]["r2"][
-                            addr_type
-                        ].split("/")[0]
-                        + "/16",
-                        "next_hop": topo["routers"]["r2"]["links"]["r3-link0"][
-                            addr_type
-                        ].split("/")[0],
-                    },
-                ]
-            }
-        }
-
-        logger.info("Configure static routes")
-        result = create_static_routes(tgen, input_dict_4)
-        assert result is True, "Testcase {} : Failed \n Error: {}".format(
-            tc_name, result
-        )
-
-        # Enable static routes
-        input_dict_4 = {
-            "r2": {
-                "static_routes": [
-                    {
-                        "network": topo["routers"]["vm4"]["links"]["r1"][
-                            addr_type
-                        ].split("/")[0]
-                        + "/16",
-                        "next_hop": topo["routers"]["r1"]["links"]["r2-link0"][
-                            addr_type
-                        ].split("/")[0],
-                    },
-                    {
-                        "network": topo["routers"]["vm5"]["links"]["r3"][
-                            addr_type
-                        ].split("/")[0]
-                        + "/16",
-                        "next_hop": topo["routers"]["r3"]["links"]["r2-link0"][
-                            addr_type
-                        ].split("/")[0],
-                    },
-                    {
-                        "network": topo["routers"]["vm4"]["links"]["r1"][addr_type],
-                        "next_hop": topo["routers"]["r1"]["links"]["r2-link0"][
-                            addr_type
-                        ].split("/")[0],
-                    },
-                    {
-                        "network": topo["routers"]["vm5"]["links"]["r3"][addr_type],
-                        "next_hop": topo["routers"]["r3"]["links"]["r2-link0"][
-                            addr_type
-                        ].split("/")[0],
-                    },
-                    {
-                        "network": topo["routers"]["r1"]["links"]["vm4"][addr_type],
-                        "next_hop": topo["routers"]["r1"]["links"]["r2-link0"][
-                            addr_type
-                        ].split("/")[0],
-                    },
-                    {
-                        "network": topo["routers"]["r3"]["links"]["vm5"][addr_type],
-                        "next_hop": topo["routers"]["r3"]["links"]["r2-link0"][
-                            addr_type
-                        ].split("/")[0],
-                    },
-                ]
-            }
-        }
-
-        logger.info("Configure static routes")
-        result = create_static_routes(tgen, input_dict_4)
-        assert result is True, "Testcase {} : Failed \n Error: {}".format(
-            tc_name, result
-        )
-        sleep(10)
-        step(
-            "Ping from all the vms for both ipv4 and ipv6 address. "
-            "All the ping should pass."
-        )
-
-        step("ping from vm4 to vm1 vm2")
-        vm4tovm1 = topo["routers"]["vm1"]["links"]["r2"][addr_type].split("/")[0]
-        result = verify_kernel_ping(tgen, "vm4", vm4tovm1, count=1, addrtype=addr_type)
-        assert result is True, "Testcase {}:Failed \n Error: {}".format(tc_name, result)
-
-        vm4tovm2 = topo["routers"]["vm2"]["links"]["r2"][addr_type].split("/")[0]
-        result = verify_kernel_ping(tgen, "vm4", vm4tovm2, count=1, addrtype=addr_type)
-        assert result is True, "Testcase {}:Failed \n Error: {}".format(tc_name, result)
-
-        step("ping from vm5 to vm3 vm6")
-        vm5tovm3 = topo["routers"]["vm3"]["links"]["r2"][addr_type].split("/")[0]
-        result = verify_kernel_ping(tgen, "vm5", vm5tovm3, count=1, addrtype=addr_type)
-        assert result is True, "Testcase {}:Failed \n Error: {}".format(tc_name, result)
-
-        vm5tovm6 = topo["routers"]["vm6"]["links"]["r2"][addr_type].split("/")[0]
-        result = verify_kernel_ping(tgen, "vm5", vm5tovm6, count=1, addrtype=addr_type)
-        assert result is True, "Testcase {}:Failed \n Error: {}".format(tc_name, result)
-
-    write_test_footer(tc_name)
-
-
 if __name__ == "__main__":
     args = ["-s"] + sys.argv[1:]
     sys.exit(pytest.main(args))