diff --git a/src/sonic-yang-models/doc/Configuration.md b/src/sonic-yang-models/doc/Configuration.md index 027b66c6967..3f28733f86c 100644 --- a/src/sonic-yang-models/doc/Configuration.md +++ b/src/sonic-yang-models/doc/Configuration.md @@ -1370,6 +1370,10 @@ The FG_NHG_PREFIX table provides the FG_NHG_PREFIX for which FG behavior is desi "WRED_ECN_PORT": { "FLEX_COUNTER_STATUS": "enable", "POLL_INTERVAL": "1000" + }, + "SWITCH": { + "FLEX_COUNTER_STATUS": "enable", + "POLL_INTERVAL": "1000" } } } 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 4ad5df98ebc..8cd7e79ffc4 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -1556,6 +1556,10 @@ "SRV6": { "FLEX_COUNTER_STATUS": "enable", "POLL_INTERVAL": "10000" + }, + "SWITCH": { + "FLEX_COUNTER_STATUS": "enable", + "POLL_INTERVAL": "60000" } }, "FLOW_COUNTER_ROUTE_PATTERN": { diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/flex_counter.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/flex_counter.json index 44a8417cb9b..bb2f7629b9c 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/flex_counter.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/flex_counter.json @@ -70,6 +70,10 @@ "SRV6": { "FLEX_COUNTER_STATUS": "enable", "POLL_INTERVAL": 1000 + }, + "SWITCH": { + "FLEX_COUNTER_STATUS": "enable", + "POLL_INTERVAL": 1000 } } } diff --git a/src/sonic-yang-models/yang-models/sonic-flex_counter.yang b/src/sonic-yang-models/yang-models/sonic-flex_counter.yang index 6434005e386..f0bea6b292c 100644 --- a/src/sonic-yang-models/yang-models/sonic-flex_counter.yang +++ b/src/sonic-yang-models/yang-models/sonic-flex_counter.yang @@ -340,6 +340,19 @@ module sonic-flex_counter { } } + container SWITCH { + /* SWITCH_STAT_COUNTER_FLEX_COUNTER_GROUP */ + leaf FLEX_COUNTER_STATUS { + type flex_status; + } + leaf FLEX_COUNTER_DELAY_STATUS { + type flex_delay_status; + } + leaf POLL_INTERVAL { + type poll_interval; + } + } + } /* end of container FLEX_COUNTER_TABLE */