]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: Fix ospf_asbr_summary_topo1.py
authorDonald Sharp <sharpd@nvidia.com>
Fri, 15 Oct 2021 15:43:44 +0000 (11:43 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 15 Oct 2021 15:43:44 +0000 (11:43 -0400)
This script is failing occassionally in our upstream topotests.
Where it was changing route-maps and attempting to see if
summarization was working correctly.  The problem was that
the code appeared to be attempting to add route-maps to
redistribution in ospf then modifying the route-maps behavior
to affect summarization as well as the metric type of that
summarization.

The problem is of course that ospf does not appear to modify
the summary routes metric-type when the components
of that summary change it's metric-type.  So the test
is testing nothing.  In addition the test had messed
up the usage of the route-map generation code and all
the generated config was in different sequence numbers
but route-map processing would never get to those
new sequence numbers because of how route-maps are processed.

Let's just remove this part of the test instead of trying
to unwind it into anything meaningfull

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_topo1.py

index 64dfa0c69d18250e9161aefd53d7c0e99359f165..f9fa55e2750121347ca9f79991ee0a6b2e732557 100644 (file)
@@ -669,89 +669,6 @@ def test_ospf_type5_summary_tc48_p0(request):
         result is True
     ), "Testcase {} : Failed" "Error: Summary missing in OSPF DB".format(tc_name)
 
-    step("Configure metric type as 1 in route map.")
-
-    routemaps = {
-        "r0": {
-            "route_maps": {
-                "rmap_ipv4": [{"action": "permit", "set": {"metric-type": "type-1"}}]
-            }
-        }
-    }
-    result = create_route_maps(tgen, routemaps)
-    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
-
-    step(
-        "Verify that external routes(static / connected) are summarised"
-        " to configured summary address with metric type 2."
-    )
-    input_dict = {
-        SUMMARY["ipv4"][0]: {
-            "Summary address": SUMMARY["ipv4"][0],
-            "Metric-type": "E2",
-            "Metric": 20,
-            "Tag": 0,
-            "External route count": 5,
-        }
-    }
-    dut = "r0"
-    result = verify_ospf_summary(tgen, topo, dut, input_dict)
-    assert (
-        result is True
-    ), "Testcase {} : Failed" "Error: Summary missing in OSPF DB".format(tc_name)
-
-    step("Un configure metric type from route map.")
-
-    routemaps = {
-        "r0": {
-            "route_maps": {
-                "rmap_ipv4": [
-                    {
-                        "action": "permit",
-                        "set": {"metric-type": "type-1"},
-                        "delete": True,
-                    }
-                ]
-            }
-        }
-    }
-    result = create_route_maps(tgen, routemaps)
-    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
-
-    step(
-        "Verify that external routes(static / connected) are summarised"
-        " to configured summary address with metric type 2."
-    )
-    input_dict = {
-        SUMMARY["ipv4"][0]: {
-            "Summary address": SUMMARY["ipv4"][0],
-            "Metric-type": "E2",
-            "Metric": 20,
-            "Tag": 0,
-            "External route count": 5,
-        }
-    }
-    dut = "r0"
-    result = verify_ospf_summary(tgen, topo, dut, input_dict)
-    assert (
-        result is True
-    ), "Testcase {} : Failed" "Error: Summary missing in OSPF DB".format(tc_name)
-
-    step("Change rule from permit to deny in prefix list.")
-    pfx_list = {
-        "r0": {
-            "prefix_lists": {
-                "ipv4": {
-                    "pf_list_1_ipv4": [
-                        {"seqid": 10, "network": "any", "action": "deny"}
-                    ]
-                }
-            }
-        }
-    }
-    result = create_prefix_lists(tgen, pfx_list)
-    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
-
     write_test_footer(tc_name)