2 # SPDX-License-Identifier: ISC
5 # Copyright (c) 2021 by VMware, Inc. ("VMware")
6 # Used Copyright (c) 2018 by Network Device Education Foundation,
7 # Inc. ("NetDEF") in this file.
11 Following tests are covered to test BGP Multi-VRF Dynamic Route Leaking:
12 1. Verify recursive import among Tenant VRFs.
13 2. Verify that dynamic import works fine between two different Tenant VRFs.
14 When next-hop IPs are same across all VRFs.
15 When next-hop IPs are different across all VRFs.
16 3. Verify that with multiple tenant VRFs, dynamic import works fine between
17 Tenant VRFs to default VRF.
18 When next-hop IPs and prefixes are same across all VRFs.
19 When next-hop IPs and prefixes are different across all VRFs.
27 from time
import sleep
29 # Save the Current Working Directory to find configuration files.
30 CWD
= os
.path
.dirname(os
.path
.realpath(__file__
))
31 sys
.path
.append(os
.path
.join(CWD
, "../"))
32 sys
.path
.append(os
.path
.join(CWD
, "../lib/"))
34 # Required to instantiate the topology builder class.
36 # pylint: disable=C0413
37 # Import topogen and topotest helpers
38 from lib
.topogen
import Topogen
, get_topogen
39 from lib
.topotest
import version_cmp
41 from lib
.common_config
import (
46 reset_config_on_routers
,
52 create_bgp_community_lists
,
53 get_frr_ipv6_linklocal
,
56 from lib
.topolog
import logger
58 verify_bgp_convergence
,
63 from lib
.topojson
import build_config_from_json
65 pytestmark
= [pytest
.mark
.bgpd
, pytest
.mark
.staticd
]
68 NETWORK1_1
= {"ipv4": "11.11.11.1/32", "ipv6": "11:11::1/128"}
69 NETWORK1_2
= {"ipv4": "11.11.11.11/32", "ipv6": "11:11::11/128"}
70 NETWORK1_3
= {"ipv4": "10.10.10.1/32", "ipv6": "10:10::1/128"}
71 NETWORK1_4
= {"ipv4": "10.10.10.100/32", "ipv6": "10:10::100/128"}
72 NETWORK1_5
= {"ipv4": "110.110.110.1/32", "ipv6": "110:110::1/128"}
73 NETWORK1_6
= {"ipv4": "110.110.110.100/32", "ipv6": "110:110::100/128"}
75 NETWORK2_1
= {"ipv4": "22.22.22.2/32", "ipv6": "22:22::2/128"}
76 NETWORK2_2
= {"ipv4": "22.22.22.22/32", "ipv6": "22:22::22/128"}
77 NETWORK2_3
= {"ipv4": "20.20.20.20/32", "ipv6": "20:20::20/128"}
78 NETWORK2_4
= {"ipv4": "20.20.20.200/32", "ipv6": "20:20::200/128"}
79 NETWORK2_5
= {"ipv4": "220.220.220.20/32", "ipv6": "220:220::20/128"}
80 NETWORK2_6
= {"ipv4": "220.220.220.200/32", "ipv6": "220:220::200/128"}
82 NETWORK3_1
= {"ipv4": "30.30.30.3/32", "ipv6": "30:30::3/128"}
83 NETWORK3_2
= {"ipv4": "30.30.30.30/32", "ipv6": "30:30::30/128"}
86 "ipv4": ["11.11.11.1", "22.22.22.2", "22.22.22.22"],
87 "ipv6": ["11:11::1", "22:22::2", "22:22::22"],
89 PREFERRED_NEXT_HOP
= "global"
90 VRF_LIST
= ["RED", "BLUE", "GREEN"]
91 COMM_VAL_1
= "100:100"
92 COMM_VAL_2
= "500:500"
93 COMM_VAL_3
= "600:600"
96 def setup_module(mod
):
98 Sets up the pytest environment
103 testsuite_run_time
= time
.asctime(time
.localtime(time
.time()))
104 logger
.info("Testsuite start time: {}".format(testsuite_run_time
))
105 logger
.info("=" * 40)
107 logger
.info("Running setup_module to create topology")
109 # This function initiates the topology build with Topogen...
110 json_file
= "{}/bgp_vrf_dynamic_route_leak_topo4.json".format(CWD
)
111 tgen
= Topogen(json_file
, mod
.__name
__)
113 topo
= tgen
.json_topo
114 # ... and here it calls Mininet initialization functions.
116 # Starting topology, create tmp files which are loaded to routers
117 # to start daemons and then start routers
120 # Run these tests for kernel version 4.19 or above
121 if version_cmp(platform
.release(), "4.19") < 0:
123 "BGP vrf dynamic route leak tests will not run "
124 '(have kernel "{}", but it requires >= 4.19)'.format(platform
.release())
126 pytest
.skip(error_msg
)
128 # Creating configuration from JSON
129 build_config_from_json(tgen
, topo
)
131 global BGP_CONVERGENCE
133 ADDR_TYPES
= check_address_types()
135 BGP_CONVERGENCE
= verify_bgp_convergence(tgen
, topo
)
136 assert BGP_CONVERGENCE
is True, "setup_module : Failed \n Error: {}".format(
140 logger
.info("Running setup_module() done")
143 def teardown_module():
144 """Teardown the pytest environment"""
146 logger
.info("Running teardown_module to delete topology")
150 # Stop toplogy and Remove tmp files
154 "Testsuite end time: {}".format(time
.asctime(time
.localtime(time
.time())))
156 logger
.info("=" * 40)
159 #####################################################
163 #####################################################
166 def test_dynamic_import_routes_between_tenant_to_default_vrf_p0(request
):
168 Verify that with multiple tenant VRFs, dynamic import works fine between
169 Tenant VRFs to default VRF.
171 When next-hop IPs and prefixes are same across all VRFs.
172 When next-hop IPs and prefixes are different across all VRFs.
176 tc_name
= request
.node
.name
177 write_test_header(tc_name
)
178 reset_config_on_routers(tgen
)
179 if tgen
.routers_have_failure():
180 pytest
.skip(tgen
.errors
)
183 "Configure static routes on R3 for each vrf and redistribute in "
184 "respective BGP instance"
187 for vrf_name
, network
in zip(VRF_LIST
, [NETWORK1_1
, NETWORK2_1
, NETWORK3_1
]):
188 step("Configure static route for VRF : {}".format(vrf_name
))
189 for addr_type
in ADDR_TYPES
:
194 "network": [network
[addr_type
]],
195 "next_hop": "blackhole",
202 result
= create_static_routes(tgen
, static_routes
)
203 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
207 step("Redistribute static route on BGP VRF : {}".format(vrf_name
))
209 for addr_type
in ADDR_TYPES
:
211 {addr_type
: {"unicast": {"redistribute": [{"redist_type": "static"}]}}}
215 "r3": {"bgp": [{"vrf": vrf_name
, "local_as": 3, "address_family": temp
}]}
218 result
= create_router_bgp(tgen
, topo
, redist_dict
)
219 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
223 for vrf_name
, network
in zip(VRF_LIST
, [NETWORK1_1
, NETWORK2_1
, NETWORK3_1
]):
225 "Verify that R3 has installed redistributed routes in respective "
226 "vrfs: {}".format(vrf_name
)
228 for addr_type
in ADDR_TYPES
:
233 "network": [network
[addr_type
]],
234 "next_hop": "blackhole",
241 result
= verify_rib(tgen
, addr_type
, "r3", static_routes
)
242 assert result
is True, "Testcase {} : Failed \n Error {}".format(
246 step("Import all tenant vrfs(GREEN+BLUE+RED) in default vrf on R3")
248 for vrf_name
in ["RED", "BLUE", "GREEN"]:
250 for addr_type
in ADDR_TYPES
:
251 temp
.update({addr_type
: {"unicast": {"import": {"vrf": vrf_name
}}}})
253 redist_dict
= {"r3": {"bgp": [{"local_as": 3, "address_family": temp
}]}}
255 result
= create_router_bgp(tgen
, topo
, redist_dict
)
256 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
261 "Verify on R3 that it installs all the routes(imported from tenant "
262 "VRFs) in default vrf. Additionally, verify that R1 & R2 also "
263 "receive these routes from R3 and install in default vrf, next-hop "
267 for vrf_name
, network
in zip(VRF_LIST
, [NETWORK1_1
, NETWORK2_1
, NETWORK3_1
]):
268 for addr_type
in ADDR_TYPES
:
273 "network": [network
[addr_type
]],
274 "next_hop": "blackhole",
280 for dut
in ["r2", "r1"]:
281 next_hop_val
= topo
["routers"]["r3"]["links"]["{}-link4".format(dut
)][
285 result
= verify_bgp_rib(
286 tgen
, addr_type
, dut
, static_routes
, next_hop
=next_hop_val
288 assert result
is True, "Testcase {} : Failed \n Error {}".format(
293 tgen
, addr_type
, dut
, static_routes
, next_hop
=next_hop_val
295 assert result
is True, "Testcase {} : Failed \n Error {}".format(
299 result
= verify_bgp_rib(tgen
, addr_type
, "r3", static_routes
)
300 assert result
is True, "Testcase {} : Failed \n Error {}".format(
304 result
= verify_rib(tgen
, addr_type
, "r3", static_routes
)
305 assert result
is True, "Testcase {} : Failed \n Error {}".format(
309 for action
, value
, status
in zip(
310 ["Remove", "Add"], [True, False], ["withdraw", "re-install"]
313 "{} import vrf GREEN/BLUE/RED/all command from default vrf "
314 "instance on R3".format(action
)
316 for vrf_name
in ["RED", "BLUE", "GREEN"]:
318 for addr_type
in ADDR_TYPES
:
322 "unicast": {"import": {"vrf": vrf_name
, "delete": value
}}
327 import_dict
= {"r3": {"bgp": [{"local_as": 3, "address_family": temp
}]}}
329 result
= create_router_bgp(tgen
, topo
, import_dict
)
330 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
335 "Verify that R1,R2 & R3 {} imported routes from GREEN/BLUE/RED/all"
336 " in default vrf's RIB".format(status
)
338 for dut
in ["r1", "r2", "r3"]:
339 for addr_type
in ADDR_TYPES
:
345 NETWORK1_1
[addr_type
],
346 NETWORK2_1
[addr_type
],
347 NETWORK3_1
[addr_type
],
349 "next_hop": "blackhole",
356 result
= verify_bgp_rib(
357 tgen
, addr_type
, dut
, static_routes
, expected
=False
361 ), "Testcase {} : Failed \nError {}\n" "Routes {} still in BGP table".format(
364 static_routes
[dut
]["static_routes"][0]["network"],
368 tgen
, addr_type
, dut
, static_routes
, expected
=False
372 ), "Testcase {} : Failed \nError {}\n" "Routes {} still in BGP table".format(
375 static_routes
[dut
]["static_routes"][0]["network"],
378 result
= verify_bgp_rib(tgen
, addr_type
, dut
, static_routes
)
379 assert result
is True, "Testcase {} : Failed \n Error {}".format(
383 result
= verify_rib(tgen
, addr_type
, dut
, static_routes
)
384 assert result
is True, "Testcase {} : Failed \n Error {}".format(
388 for action
, value
in zip(["Shut", "No shut"], [True, False]):
390 "{} the neighborship between R1-R3 and R1-R2 for vrf RED, GREEN "
391 "and BLUE".format(action
)
393 bgp_disable
= {"r3": {"bgp": []}}
394 for vrf_name
in ["RED", "GREEN", "BLUE"]:
396 for addr_type
in ADDR_TYPES
:
403 "dest_link": {"r3-link4": {"shutdown": value
}}
406 "dest_link": {"r3-link4": {"shutdown": value
}}
414 bgp_disable
["r3"]["bgp"].append(
415 {"vrf": vrf_name
, "local_as": 3, "address_family": temp
}
417 result
= create_router_bgp(tgen
, topo
, bgp_disable
)
418 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
423 "Verify that when peering is shutdown for tenant vrfs, it "
424 "doesn't impact the RIB/FIB of default vrf on router R1 and R2"
426 for dut
in ["r1", "r2"]:
427 step("Verify RIB/FIB for default vrf on {}".format(dut
))
428 for addr_type
in ADDR_TYPES
:
434 NETWORK1_1
[addr_type
],
435 NETWORK2_1
[addr_type
],
436 NETWORK3_1
[addr_type
],
438 "next_hop": "blackhole",
443 result
= verify_bgp_rib(tgen
, addr_type
, dut
, static_routes
)
444 assert result
is True, "Testcase {} : Failed \n Error {}".format(
448 result
= verify_rib(tgen
, addr_type
, dut
, static_routes
)
449 assert result
is True, "Testcase {} : Failed \n Error {}".format(
453 for action
, value
, status
in zip(
454 ["Shut", "No shut"], [True, False], ["Withdraw", "Reinstall"]
457 "{} the neighborship between R1-R3 and R2-R3 for default vrf".format(action
)
460 for addr_type
in ADDR_TYPES
:
466 "r1": {"dest_link": {"r3-link4": {"shutdown": value
}}},
467 "r2": {"dest_link": {"r3-link4": {"shutdown": value
}}},
474 bgp_disable
= {"r3": {"bgp": [{"local_as": 3, "address_family": temp
}]}}
475 result
= create_router_bgp(tgen
, topo
, bgp_disable
)
476 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
481 "Verify that R1 and R2 {} all the routes from default vrf's RIB"
482 " and FIB".format(status
)
484 for dut
in ["r1", "r2"]:
485 step("Verify RIB/FIB for default vrf on {}".format(dut
))
486 for addr_type
in ADDR_TYPES
:
492 NETWORK1_1
[addr_type
],
493 NETWORK2_1
[addr_type
],
494 NETWORK3_1
[addr_type
],
496 "next_hop": "blackhole",
503 result
= verify_bgp_rib(
504 tgen
, addr_type
, dut
, static_routes
, expected
=False
508 ), "Testcase {} : Failed \nError {}\n" "Routes {} still in BGP table".format(
511 static_routes
[dut
]["static_routes"][0]["network"],
515 tgen
, addr_type
, dut
, static_routes
, expected
=False
519 ), "Testcase {} : Failed Error {}" "Routes {} still in Route table".format(
522 static_routes
[dut
]["static_routes"][0]["network"],
525 result
= verify_bgp_rib(tgen
, addr_type
, dut
, static_routes
)
526 assert result
is True, "Testcase {} : Failed \n Error {}".format(
530 result
= verify_rib(tgen
, addr_type
, dut
, static_routes
)
531 assert result
is True, "Testcase {} : Failed \n Error {}".format(
535 step("Remove import command from router R3 and configure the same on R2")
537 for vrf_name
in VRF_LIST
:
538 for addr_type
in ADDR_TYPES
:
540 {addr_type
: {"unicast": {"import": {"vrf": vrf_name
, "delete": True}}}}
543 import_dict
= {"r3": {"bgp": [{"local_as": 3, "address_family": temp
}]}}
545 result
= create_router_bgp(tgen
, topo
, import_dict
)
546 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
551 "Verify that once import commands are removed from R3, all imported "
552 "routes are withdrawn from RIB/FIB of default vrf on R1/R2/R3"
555 for dut
in ["r1", "r2", "r3"]:
556 step("Verify RIB/FIB for default vrf on {}".format(dut
))
557 for addr_type
in ADDR_TYPES
:
563 NETWORK1_1
[addr_type
],
564 NETWORK2_1
[addr_type
],
565 NETWORK3_1
[addr_type
],
567 "next_hop": "blackhole",
572 result
= verify_bgp_rib(tgen
, addr_type
, dut
, static_routes
, expected
=False)
573 assert result
is not True, (
574 "Testcase {} : Failed \nError {}\n"
575 "Routes {} still in BGP table".format(
576 tc_name
, result
, static_routes
[dut
]["static_routes"][0]["network"]
580 result
= verify_rib(tgen
, addr_type
, dut
, static_routes
, expected
=False)
581 assert result
is not True, "Testcase {} : Failed \n Error {}".format(
585 for vrf_name
, network
in zip(VRF_LIST
, [NETWORK1_1
, NETWORK2_1
, NETWORK3_1
]):
586 step("Configure static route for VRF : {} on r2".format(vrf_name
))
587 for addr_type
in ADDR_TYPES
:
592 "network": [network
[addr_type
]],
593 "next_hop": "blackhole",
600 result
= create_static_routes(tgen
, static_routes
)
601 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
605 step("Redistribute static route on BGP VRF : {}".format(vrf_name
))
607 for addr_type
in ADDR_TYPES
:
609 {addr_type
: {"unicast": {"redistribute": [{"redist_type": "static"}]}}}
613 "r2": {"bgp": [{"vrf": vrf_name
, "local_as": 2, "address_family": temp
}]}
616 result
= create_router_bgp(tgen
, topo
, redist_dict
)
617 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
621 step("Remove redistribute static route on BGP VRF : {} on r3".format(vrf_name
))
623 for addr_type
in ADDR_TYPES
:
628 "redistribute": [{"redist_type": "static", "delete": True}]
635 "r3": {"bgp": [{"vrf": vrf_name
, "local_as": 3, "address_family": temp
}]}
638 result
= create_router_bgp(tgen
, topo
, redist_dict
)
639 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
643 for vrf_name
in ["RED", "BLUE", "GREEN"]:
645 for addr_type
in ADDR_TYPES
:
646 temp
.update({addr_type
: {"unicast": {"import": {"vrf": vrf_name
}}}})
648 import_dict
= {"r2": {"bgp": [{"local_as": 2, "address_family": temp
}]}}
650 result
= create_router_bgp(tgen
, topo
, import_dict
)
651 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
656 "Verify after import commands are re-configured on R2's vrf RED, all "
657 "those routes are installed again in default vrf of R1,R2,R3"
659 for dut
in ["r1", "r2", "r3"]:
660 step("Verify RIB/FIB for vrf RED on {}".format(dut
))
661 for addr_type
in ADDR_TYPES
:
667 NETWORK1_1
[addr_type
],
668 NETWORK2_1
[addr_type
],
669 NETWORK3_1
[addr_type
],
671 "next_hop": "blackhole",
676 result
= verify_bgp_rib(tgen
, addr_type
, dut
, static_routes
)
677 assert result
is True, "Testcase {} : Failed \n Error {}".format(
681 result
= verify_rib(tgen
, addr_type
, dut
, static_routes
)
682 assert result
is True, "Testcase {} : Failed \n Error {}".format(
686 step("Remove import vrf RED/GREEN/BLUE/all one by one from default vrf" " on R2")
687 for vrf_name
in ["RED", "BLUE", "GREEN"]:
689 for addr_type
in ADDR_TYPES
:
691 {addr_type
: {"unicast": {"import": {"vrf": vrf_name
, "delete": True}}}}
694 import_dict
= {"r2": {"bgp": [{"local_as": 2, "address_family": temp
}]}}
696 result
= create_router_bgp(tgen
, topo
, import_dict
)
697 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
702 "Verify that R1, R2 and R3 withdraws imported routes from default "
705 for dut
in ["r1", "r2", "r3"]:
706 for addr_type
in ADDR_TYPES
:
712 NETWORK1_1
[addr_type
],
713 NETWORK2_1
[addr_type
],
714 NETWORK3_1
[addr_type
],
716 "next_hop": "blackhole",
721 result
= verify_bgp_rib(tgen
, addr_type
, dut
, static_routes
, expected
=False)
722 assert result
is not True, (
723 "Testcase {} : Failed \nError {}\n"
724 "Routes {} still in BGP table".format(
725 tc_name
, result
, static_routes
[dut
]["static_routes"][0]["network"]
729 result
= verify_rib(tgen
, addr_type
, dut
, static_routes
, expected
=False)
730 assert result
is not True, "Testcase {} : Failed \n Error {}".format(
734 step("Add import vrf RED/GREEN/BLUE/all one by one from default vrf on R2")
735 for vrf_name
in ["RED", "BLUE", "GREEN"]:
737 for addr_type
in ADDR_TYPES
:
738 temp
.update({addr_type
: {"unicast": {"import": {"vrf": vrf_name
}}}})
740 import_dict
= {"r2": {"bgp": [{"local_as": 2, "address_family": temp
}]}}
742 result
= create_router_bgp(tgen
, topo
, import_dict
)
743 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
747 for dut
in ["r1", "r2", "r3"]:
748 step("Verify that {} reinstall imported routes from vrf RED's RIB".format(dut
))
749 for addr_type
in ADDR_TYPES
:
755 NETWORK1_1
[addr_type
],
756 NETWORK2_1
[addr_type
],
757 NETWORK3_1
[addr_type
],
759 "next_hop": "blackhole",
764 result
= verify_bgp_rib(tgen
, addr_type
, dut
, static_routes
)
765 assert result
is True, "Testcase {} : Failed \n Error {}".format(
769 result
= verify_rib(tgen
, addr_type
, dut
, static_routes
)
770 assert result
is True, "Testcase {} : Failed \n Error {}".format(
774 for action
, value
in zip(["Shut", "No shut"], [True, False]):
776 "{} the neighborship between R2-R3 for vrf GREEN, BLUE and RED".format(
780 bgp_disable
= {"r2": {"bgp": []}}
781 for vrf_name
in ["GREEN", "BLUE", "RED"]:
783 for addr_type
in ADDR_TYPES
:
790 "dest_link": {"r2-link4": {"shutdown": value
}}
798 bgp_disable
["r2"]["bgp"].append(
799 {"vrf": vrf_name
, "local_as": 2, "address_family": temp
}
801 result
= create_router_bgp(tgen
, topo
, bgp_disable
)
802 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
806 step("Verify RIB/FIB of vrf RED will be unchanged on all 3 routers")
807 for dut
in ["r1", "r2", "r3"]:
808 step("Verify RIB/FIB for vrf RED on {}".format(dut
))
809 for addr_type
in ADDR_TYPES
:
815 NETWORK1_1
[addr_type
],
816 NETWORK2_1
[addr_type
],
817 NETWORK3_1
[addr_type
],
819 "next_hop": "blackhole",
825 result
= verify_bgp_rib(tgen
, addr_type
, dut
, static_routes
)
826 assert result
is True, "Testcase {} : Failed \n Error {}".format(
830 result
= verify_rib(tgen
, addr_type
, dut
, static_routes
)
831 assert result
is True, "Testcase {} : Failed \n Error {}".format(
835 for action
, value
, status
in zip(
836 ["Shut", "No shut"], [True, False], ["Withdraw", "Reinstall"]
838 step("{} the neighborship between R2-R3 for default vrf".format(action
))
840 for addr_type
in ADDR_TYPES
:
846 "r3": {"dest_link": {"r2-link4": {"shutdown": value
}}}
853 bgp_disable
= {"r2": {"bgp": [{"local_as": 2, "address_family": temp
}]}}
854 result
= create_router_bgp(tgen
, topo
, bgp_disable
)
855 assert result
is True, "Testcase {} :Failed \n Error: {}".format(
860 "Verify that R1 and R2 {} all the routes from default vrfs RIB and"
861 " FIB".format(status
)
863 for dut
in ["r1", "r3"]:
864 step("Verify RIB/FIB for default vrf on {}".format(dut
))
865 for addr_type
in ADDR_TYPES
:
871 NETWORK1_1
[addr_type
],
872 NETWORK2_1
[addr_type
],
873 NETWORK3_1
[addr_type
],
875 "next_hop": "blackhole",
882 result
= verify_bgp_rib(
883 tgen
, addr_type
, dut
, static_routes
, expected
=False
887 ), "Testcase {} : Failed \nError {}\n" "Routes {} still in BGP table".format(
890 static_routes
[dut
]["static_routes"][0]["network"],
894 tgen
, addr_type
, dut
, static_routes
, expected
=False
898 ), "Testcase {} : Failed Error {}" "Routes {} still in Route table".format(
901 static_routes
[dut
]["static_routes"][0]["network"],
904 result
= verify_bgp_rib(tgen
, addr_type
, dut
, static_routes
)
905 assert result
is True, "Testcase {} : Failed \n Error {}".format(
909 result
= verify_rib(tgen
, addr_type
, dut
, static_routes
)
910 assert result
is True, "Testcase {} : Failed \n Error {}".format(
914 write_test_footer(tc_name
)
917 if __name__
== "__main__":
918 args
= ["-s"] + sys
.argv
[1:]
919 sys
.exit(pytest
.main(args
))