diff options
| author | ckishimo <carles.kishimoto@gmail.com> | 2021-01-08 10:25:49 +0100 |
|---|---|---|
| committer | ckishimo <carles.kishimoto@gmail.com> | 2021-01-12 11:18:22 +0100 |
| commit | 881fa68f057acd52905ca7c917e65f9b895290fa (patch) | |
| tree | 549a8a136af19c920c581acbdfa463d3b79f99f8 /tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py | |
| parent | aa6fdabb7323407ffcd95a51e617cb0d1791443a (diff) | |
tests: add new def for redistribution in ospf
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 | 13 |
1 files changed, 13 insertions, 0 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 967bc44879..f56a884998 100644 --- a/tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py +++ b/tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py @@ -223,6 +223,19 @@ def red_connected(dut, config=True): assert result is True, "Testcase: Failed \n Error: {}".format(result) +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. # ################################## |
