summaryrefslogtreecommitdiffstats
path: root/isisd/isis_nb_config.c
diff options
context:
space:
mode:
authorIsabella de Leon <ideleon@microsoft.com>2022-09-15 20:50:27 +0200
committerIsabella de Leon <ideleon@microsoft.com>2022-09-22 00:41:38 +0200
commit01ea9b035eaa2676ee54efd61f14ff4484eec59e (patch)
treeaa26c17109ae8ef5fb5e4a3ba59a232d54a2684b /isisd/isis_nb_config.c
parentlib: Fix skip of every other plist deletion (diff)
downloadfrr-01ea9b035eaa2676ee54efd61f14ff4484eec59e.tar.xz
frr-01ea9b035eaa2676ee54efd61f14ff4484eec59e.zip
isisd: Add set-overload on-startup CLI/YANG support
Before: r1# conf r1(config)# router isis <area-tag> r1(config-router)# set-overload-bit <cr> r1(config-router)# end After: r1# conf r1(config)# router isis <area-tag> r1(config-router)# set-overload-bit <cr> on-startup Set overload bit on startup r1(config-router)# set-overload-bit on-startup (0-86400) Set overload time in seconds r1(config-router)# set-overload-bit on-startup 300 r1(config-router)# end Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
Diffstat (limited to 'isisd/isis_nb_config.c')
-rw-r--r--isisd/isis_nb_config.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/isisd/isis_nb_config.c b/isisd/isis_nb_config.c
index dbe4a017b..14a66d256 100644
--- a/isisd/isis_nb_config.c
+++ b/isisd/isis_nb_config.c
@@ -338,9 +338,9 @@ int isis_instance_attached_modify(struct nb_cb_modify_args *args)
}
/*
- * XPath: /frr-isisd:isis/instance/overload
+ * XPath: /frr-isisd:isis/instance/overload/enabled
*/
-int isis_instance_overload_modify(struct nb_cb_modify_args *args)
+int isis_instance_overload_enabled_modify(struct nb_cb_modify_args *args)
{
struct isis_area *area;
bool overload;
@@ -356,6 +356,24 @@ int isis_instance_overload_modify(struct nb_cb_modify_args *args)
}
/*
+ * XPath: /frr-isisd:isis/instance/overload/on-startup
+ */
+int isis_instance_overload_on_startup_modify(struct nb_cb_modify_args *args)
+{
+ struct isis_area *area;
+ uint32_t overload_time;
+
+ if (args->event != NB_EV_APPLY)
+ return NB_OK;
+
+ overload_time = yang_dnode_get_uint32(args->dnode, NULL);
+ area = nb_running_get_entry(args->dnode, NULL, true);
+ isis_area_overload_on_startup_set(area, overload_time);
+
+ return NB_OK;
+}
+
+/*
* XPath: /frr-isisd:isis/instance/metric-style
*/
int isis_instance_metric_style_modify(struct nb_cb_modify_args *args)