diff options
| author | ckishimo <carles.kishimoto@gmail.com> | 2021-01-08 16:10:38 +0100 |
|---|---|---|
| committer | ckishimo <carles.kishimoto@gmail.com> | 2021-01-12 11:18:22 +0100 |
| commit | 88b7d3e726c4e42c6bf2cfe87f7d2de22646ba0a (patch) | |
| tree | 51ea63a9ea065dad3b1f0309badd0e48ba3fd68b /tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py | |
| parent | 9458be1aecca7c69aff6c9168cf2277209684fab (diff) | |
tests: move redistribute function into lib
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
Diffstat (limited to 'tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py')
| -rw-r--r-- | tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py b/tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py index f8752f3543..2da1dcd21a 100644 --- a/tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py +++ b/tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py @@ -66,6 +66,7 @@ from lib.ospf import ( verify_ospf_rib, create_router_ospf, verify_ospf_interface, + redistribute_ospf, ) from ipaddress import IPv4Address @@ -187,19 +188,6 @@ def teardown_module(): pass -def redistribute(dut, route_type, **kwargs): - """Local def for redstribution of routes inside ospf.""" - global topo - tgen = get_topogen() - - ospf_red = {dut: {"ospf": {"redistribute": [{"redist_type": route_type}]}}} - for k, v in kwargs.items(): - ospf_red[dut]["ospf"]["redistribute"][0][k] = v - - result = create_router_ospf(tgen, topo, ospf_red) - assert result is True, "Testcase : Failed \n Error: {}".format(result) - - # ################################## # Test cases start here. # ################################## @@ -252,7 +240,7 @@ def test_ospf_lan_ecmp_tc18_p0(request): ) dut = rtr - redistribute(dut, "static") + redistribute_ospf(tgen, topo, dut, "static") step( "Verify that route in R0 in stalled with 8 hops. " |
