From 25662c62b4051e85618c722463e91fc920e618ae Mon Sep 17 00:00:00 2001 From: Jing Zhang Date: Wed, 2 Aug 2023 14:41:48 -0700 Subject: [PATCH] add service_mgmt (#15927) Adding yang model for CONFIG_DB table MUX_LINKMGR|SERVICE_MGMT. sign-off: Jing Zhang zhangjing@microsoft.com --- src/sonic-yang-models/doc/Configuration.md | 3 +++ .../tests/files/sample_config_db.json | 3 +++ .../tests/yang_model_tests/tests/mux-linkmgr.json | 3 +++ .../yang_model_tests/tests_config/mux-linkmgr.json | 10 ++++++++++ .../yang-models/sonic-mux-linkmgr.yang | 14 ++++++++++++++ 5 files changed, 33 insertions(+) diff --git a/src/sonic-yang-models/doc/Configuration.md b/src/sonic-yang-models/doc/Configuration.md index 4252263ecf..a45a5fa85c 100644 --- a/src/sonic-yang-models/doc/Configuration.md +++ b/src/sonic-yang-models/doc/Configuration.md @@ -1223,6 +1223,9 @@ The **MUX_LINKMGR** table is used for dualtor device configuration. }, "MUXLOGGER": { "log_verbosity": "debug" + }, + "SERVICE_MGMT": { + "kill_radv": "True" } } } diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json index fa1b19c2be..27da24159c 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -1947,6 +1947,9 @@ }, "MUXLOGGER": { "log_verbosity": "debug" + }, + "SERVICE_MGMT": { + "kill_radv": "False" } }, diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/mux-linkmgr.json b/src/sonic-yang-models/tests/yang_model_tests/tests/mux-linkmgr.json index 6358ec5e6e..7c4aeadffd 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/mux-linkmgr.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/mux-linkmgr.json @@ -7,5 +7,8 @@ }, "MUX_LINKMGR_MUXLOGGER_CHANGE_VERBOSITY_LEVEL": { "desc": "Consume verbosity level config changes. " + }, + "MUX_LINKMGR_SERVICE_MGMT_KILL_RADV_DISABLED": { + "desc": "Disable feature to kill radv." } } \ No newline at end of file diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/mux-linkmgr.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/mux-linkmgr.json index c57a2c297b..1feff4f440 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/mux-linkmgr.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/mux-linkmgr.json @@ -32,5 +32,15 @@ } } } + }, + "MUX_LINKMGR_SERVICE_MGMT_KILL_RADV_DISABLED": { + "sonic-mux-linkmgr:sonic-mux-linkmgr": { + "sonic-mux-linkmgr:MUX_LINKMGR": { + "sonic-mux-linkmgr:SERVICE_MGMT": + { + "kill_radv": "False" + } + } + } } } \ No newline at end of file diff --git a/src/sonic-yang-models/yang-models/sonic-mux-linkmgr.yang b/src/sonic-yang-models/yang-models/sonic-mux-linkmgr.yang index a310cebf41..d7b07ed733 100644 --- a/src/sonic-yang-models/yang-models/sonic-mux-linkmgr.yang +++ b/src/sonic-yang-models/yang-models/sonic-mux-linkmgr.yang @@ -98,6 +98,20 @@ module sonic-mux-linkmgr { description "Linkmgrd log verbosity level. "; } } + + container SERVICE_MGMT { + + leaf kill_radv { + type enumeration { + enum True; + enum False; + } + + default True; + + description "Kill radv service instead of gracefully stopping it. "; + } + } } } } \ No newline at end of file