From cc204641cf7a9dfaca6d30348ce1f28e685e7639 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Tue, 8 Aug 2023 00:51:35 +0800 Subject: [PATCH] [YANG] add yang model for `MUX_LINKMGR|MUXLOGGER` (#15884) (#16021) Add yang model for MUX_LINKMGR|MUXLOGGER. Co-authored-by: Jing Zhang --- src/sonic-yang-models/doc/Configuration.md | 3 +++ .../tests/files/sample_config_db.json | 3 +++ .../tests/yang_model_tests/tests/mux-linkmgr.json | 3 +++ .../tests_config/mux-linkmgr.json | 10 ++++++++++ .../yang-models/sonic-mux-linkmgr.yang | 15 +++++++++++++++ 5 files changed, 34 insertions(+) diff --git a/src/sonic-yang-models/doc/Configuration.md b/src/sonic-yang-models/doc/Configuration.md index a1fdfc13a2..48bf4b543e 100644 --- a/src/sonic-yang-models/doc/Configuration.md +++ b/src/sonic-yang-models/doc/Configuration.md @@ -1164,6 +1164,9 @@ The **MUX_LINKMGR** table is used for dualtor device configuration. "use_well_known_mac": "enabled", "src_mac": "ToRMac", "interval_pck_loss_count_update": "3" + }, + "MUXLOGGER": { + "log_verbosity": "debug" } } } 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 c28eab35ac..b4a7735c56 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -1837,6 +1837,9 @@ "use_well_known_mac": "enabled", "src_mac": "ToRMac", "interval_pck_loss_count_update": "3" + }, + "MUXLOGGER": { + "log_verbosity": "debug" } }, 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 3f399eec76..6358ec5e6e 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 @@ -4,5 +4,8 @@ }, "MUX_LINKMGR_LINK_PROBER_CHANGE_MAC_ADDR": { "desc": "Use well-known mac and vlan mac as dst/src in linkmgrd link prober. " + }, + "MUX_LINKMGR_MUXLOGGER_CHANGE_VERBOSITY_LEVEL": { + "desc": "Consume verbosity level config changes. " } } \ 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 2210c16936..c57a2c297b 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 @@ -22,5 +22,15 @@ } } } + }, + "MUX_LINKMGR_MUXLOGGER_CHANGE_VERBOSITY_LEVEL": { + "sonic-mux-linkmgr:sonic-mux-linkmgr": { + "sonic-mux-linkmgr:MUX_LINKMGR": { + "sonic-mux-linkmgr:MUXLOGGER": + { + "log_verbosity": "debug" + } + } + } } } \ 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 93e605ea8e..a310cebf41 100644 --- a/src/sonic-yang-models/yang-models/sonic-mux-linkmgr.yang +++ b/src/sonic-yang-models/yang-models/sonic-mux-linkmgr.yang @@ -83,6 +83,21 @@ module sonic-mux-linkmgr { description "The frequency of streaming ICMP heartbeat loss data to telemetry. "; } } + + container MUXLOGGER { + + leaf log_verbosity { + type enumeration { + enum trace; + enum debug; + enum info; + enum error; + enum fatal; + } + + description "Linkmgrd log verbosity level. "; + } + } } } } \ No newline at end of file