forked from Mirror/frr
ospf,ospf6: fix json key typo supoort
Fix json key 'supoort' -> 'support'; add 1-year deprecation notice; fix topotests to use corrected json key. Signed-off-by: Mark Stapp <mjs@labn.net>
This commit is contained in:
parent
d5243675f2
commit
a63fecfb56
|
@ -937,12 +937,22 @@ static void show_ospf6_gr_helper_details(struct vty *vty, struct ospf6 *ospf6,
|
||||||
(ospf6->ospf6_helper_cfg.strict_lsa_check)
|
(ospf6->ospf6_helper_cfg.strict_lsa_check)
|
||||||
? "Enabled"
|
? "Enabled"
|
||||||
: "Disabled");
|
: "Disabled");
|
||||||
|
|
||||||
|
#if CONFDATE > 20240401
|
||||||
|
CPP_NOTICE("Remove deprecated json key: restartSupoort")
|
||||||
|
#endif
|
||||||
json_object_string_add(
|
json_object_string_add(
|
||||||
json, "restartSupoort",
|
json, "restartSupoort",
|
||||||
(ospf6->ospf6_helper_cfg.only_planned_restart)
|
(ospf6->ospf6_helper_cfg.only_planned_restart)
|
||||||
? "Planned Restart only"
|
? "Planned Restart only"
|
||||||
: "Planned and Unplanned Restarts");
|
: "Planned and Unplanned Restarts");
|
||||||
|
|
||||||
|
json_object_string_add(
|
||||||
|
json, "restartSupport",
|
||||||
|
(ospf6->ospf6_helper_cfg.only_planned_restart)
|
||||||
|
? "Planned Restart only"
|
||||||
|
: "Planned and Unplanned Restarts");
|
||||||
|
|
||||||
json_object_int_add(
|
json_object_int_add(
|
||||||
json, "supportedGracePeriod",
|
json, "supportedGracePeriod",
|
||||||
ospf6->ospf6_helper_cfg.supported_grace_time);
|
ospf6->ospf6_helper_cfg.supported_grace_time);
|
||||||
|
|
|
@ -10080,12 +10080,21 @@ static int ospf_show_gr_helper_details(struct vty *vty, struct ospf *ospf,
|
||||||
json_object_string_add(json_vrf, "strictLsaCheck",
|
json_object_string_add(json_vrf, "strictLsaCheck",
|
||||||
(ospf->strict_lsa_check) ? "Enabled"
|
(ospf->strict_lsa_check) ? "Enabled"
|
||||||
: "Disabled");
|
: "Disabled");
|
||||||
|
#if CONFDATE > 20240401
|
||||||
|
CPP_NOTICE("Remove deprecated json key: restartSupoort")
|
||||||
|
#endif
|
||||||
json_object_string_add(
|
json_object_string_add(
|
||||||
json_vrf, "restartSupoort",
|
json_vrf, "restartSupoort",
|
||||||
(ospf->only_planned_restart)
|
(ospf->only_planned_restart)
|
||||||
? "Planned Restart only"
|
? "Planned Restart only"
|
||||||
: "Planned and Unplanned Restarts");
|
: "Planned and Unplanned Restarts");
|
||||||
|
|
||||||
|
json_object_string_add(
|
||||||
|
json_vrf, "restartSupport",
|
||||||
|
(ospf->only_planned_restart)
|
||||||
|
? "Planned Restart only"
|
||||||
|
: "Planned and Unplanned Restarts");
|
||||||
|
|
||||||
json_object_int_add(json_vrf, "supportedGracePeriod",
|
json_object_int_add(json_vrf, "supportedGracePeriod",
|
||||||
ospf->supported_grace_time);
|
ospf->supported_grace_time);
|
||||||
|
|
||||||
|
|
|
@ -2477,7 +2477,7 @@ def verify_ospf_gr_helper(tgen, topo, dut, input_dict=None):
|
||||||
input_dict = {
|
input_dict = {
|
||||||
"helperSupport":"Disabled",
|
"helperSupport":"Disabled",
|
||||||
"strictLsaCheck":"Enabled",
|
"strictLsaCheck":"Enabled",
|
||||||
"restartSupoort":"Planned and Unplanned Restarts",
|
"restartSupport":"Planned and Unplanned Restarts",
|
||||||
"supportedGracePeriod":1800
|
"supportedGracePeriod":1800
|
||||||
}
|
}
|
||||||
result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
|
result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
|
||||||
|
|
|
@ -188,7 +188,7 @@ def test_ospf_gr_helper_tc1_p0(request):
|
||||||
input_dict = {
|
input_dict = {
|
||||||
"helperSupport": "Disabled",
|
"helperSupport": "Disabled",
|
||||||
"strictLsaCheck": "Enabled",
|
"strictLsaCheck": "Enabled",
|
||||||
"restartSupoort": "Planned and Unplanned Restarts",
|
"restartSupport": "Planned and Unplanned Restarts",
|
||||||
"supportedGracePeriod": 1800,
|
"supportedGracePeriod": 1800,
|
||||||
}
|
}
|
||||||
dut = "r0"
|
dut = "r0"
|
||||||
|
@ -220,7 +220,7 @@ def test_ospf_gr_helper_tc1_p0(request):
|
||||||
input_dict = {
|
input_dict = {
|
||||||
"helperSupport": "Enabled",
|
"helperSupport": "Enabled",
|
||||||
"strictLsaCheck": "Enabled",
|
"strictLsaCheck": "Enabled",
|
||||||
"restartSupoort": "Planned and Unplanned Restarts",
|
"restartSupport": "Planned and Unplanned Restarts",
|
||||||
"supportedGracePeriod": 1800,
|
"supportedGracePeriod": 1800,
|
||||||
}
|
}
|
||||||
dut = "r0"
|
dut = "r0"
|
||||||
|
|
Loading…
Reference in a new issue