From 97b4474de1ccc3b3b7eaad28c418fa5b5e6088c3 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 11 Aug 2022 17:32:24 +0300 Subject: [PATCH] ospf6d: Remove ospf6Enabled from JSON output Time to deprecate it. Signed-off-by: Donatas Abraitis --- ospf6d/ospf6_interface.c | 9 +-------- .../test_ospfv3_single_area.py | 7 +++---- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index efa5d2b7ab..11a8879904 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -966,10 +966,6 @@ static const char *ospf6_iftype_str(uint8_t iftype) return "UNKNOWN"; } -#if CONFDATE > 20220709 -CPP_NOTICE("Time to remove ospf6Enabled from JSON output") -#endif - /* show specified interface structure */ static int ospf6_interface_show(struct vty *vty, struct interface *ifp, json_object *json_obj, bool use_json) @@ -996,11 +992,8 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp, ospf6_iftype_str(default_iftype)); json_object_int_add(json_obj, "interfaceId", ifp->ifindex); - if (ifp->info == NULL) { - json_object_boolean_false_add(json_obj, "ospf6Enabled"); + if (ifp->info == NULL) return 0; - } - json_object_boolean_true_add(json_obj, "ospf6Enabled"); oi = (struct ospf6_interface *)ifp->info; diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py index c9824e79c5..d318ec0906 100644 --- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py +++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py @@ -183,7 +183,7 @@ def test_ospfv3_p2p_tc3_p0(request): step("Verify that interface is enabled in ospf.") step("Verify that config is successful.") dut = "r0" - input_dict = {"r0": {"links": {"r3": {"ospf6": {"ospf6Enabled": True}}}}} + input_dict = {"r0": {"links": {"r3": {"ospf6": {}}}}} result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict) assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result) @@ -339,7 +339,7 @@ def test_ospfv3_p2p_tc3_p0(request): assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result) step("Verify that interface is enabled in ospf.") dut = "r0" - input_dict = {"r0": {"links": {"r3": {"ospf6": {"ospf6Enabled": True}}}}} + input_dict = {"r0": {"links": {"r3": {"ospf6": {}}}}} result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict) assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result) @@ -374,7 +374,7 @@ def test_ospfv3_p2p_tc3_p0(request): step("Verify that interface is enabled in ospf.") dut = "r0" - input_dict = {"r0": {"links": {"r3": {"ospf6": {"ospf6Enabled": True}}}}} + input_dict = {"r0": {"links": {"r3": {"ospf6": {}}}}} result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict) assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result) @@ -1172,7 +1172,6 @@ def test_ospfv3_show_p1(request): "ospf6": { "status": "up", "type": "BROADCAST", - "ospf6Enabled": True, "attachedToArea": True, "instanceId": 0, "interfaceMtu": 1500, -- 2.39.5