diff --git a/src/sonic-yang-models/doc/Configuration.md b/src/sonic-yang-models/doc/Configuration.md index 00465d666b..c17ed75e00 100644 --- a/src/sonic-yang-models/doc/Configuration.md +++ b/src/sonic-yang-models/doc/Configuration.md @@ -1807,7 +1807,8 @@ optional attributes. "speed": "40000", "link_training": "off", "laser_freq": "191300", - "tx_power": "-27.3" + "tx_power": "-27.3", + "dom_polling": "enabled" }, "Ethernet1": { "index": "1", @@ -1819,7 +1820,8 @@ optional attributes. "speed": "40000", "link_training": "on", "laser_freq": "191300", - "tx_power": "-27.3" + "tx_power": "-27.3", + "dom_polling": "enabled" }, "Ethernet63": { "index": "63", @@ -1829,7 +1831,8 @@ optional attributes. "alias": "fortyGigE1/4/16", "speed": "40000", "laser_freq": "191300", - "tx_power": "-27.3" + "tx_power": "-27.3", + "dom_polling": "disabled" } } } @@ -1845,7 +1848,8 @@ optional attributes. "mtu": "9100", "alias": "etp1a", "speed": "100000", - "subport": 1 + "subport": 1, + "dom_polling": "enabled" }, "Ethernet4": { "admin_status": "up", @@ -1855,7 +1859,8 @@ optional attributes. "mtu": "9100", "alias": "etp1b", "speed": "100000", - "subport": 2 + "subport": 2, + "dom_polling": "enabled" }, } } 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 0355d7eb7b..0e1ca2bd16 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -598,7 +598,8 @@ "autoneg": "on", "adv_speeds": "all", "adv_interface_types": "all", - "subport" : "0" + "subport" : "0", + "dom_polling":"enabled" }, "Ethernet3": { "alias": "Eth1/4", @@ -616,7 +617,8 @@ "speed": "11100", "tpid": "0x9100", "admin_status": "up", - "subport": "2" + "subport": "2", + "dom_polling":"enabled" }, "Ethernet5": { "alias": "Eth2/2", diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/port.json b/src/sonic-yang-models/tests/yang_model_tests/tests/port.json index cffa5bac65..f248e207a6 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/port.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/port.json @@ -129,6 +129,14 @@ "eStrKey": "Range", "eStr": "0..8" }, + "PORT_VALID_DOM_POLLING": { + "desc": "PORT_VALID_DOM_POLLING no failure." + }, + "PORT_INVALID_DOM_POLLING": { + "desc": "PORT_INVALID_DOM_POLLING invalid condition failure.", + "eStrKey" : "InvalidValue", + "eStr": ["dom_polling"] + }, "PORT_AUTO_FEC_TEST": { "desc": "PORT_AUTO_FEC_TEST validate auto mode in fec." } diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json index 5879bbac55..8ac0d96473 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json @@ -640,6 +640,48 @@ } }, + "PORT_INVALID_DOM_POLLING": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet0", + "alias": "etp1a", + "lanes": "60, 61", + "speed": 100000, + "subport": 1, + "dom_polling": "on" + } + ] + } + } + }, + + "PORT_VALID_DOM_POLLING": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet0", + "alias": "etp1a", + "lanes": "60, 61", + "speed": 100000, + "subport": 1, + "dom_polling": "enabled" + }, + { + "name": "Ethernet2", + "alias": "etp1b", + "lanes": "62, 63", + "speed": 100000, + "subport": 2, + "dom_polling": "disabled" + } + ] + } + } + }, + "PORT_AUTO_FEC_TEST": { "sonic-port:sonic-port": { "sonic-port:PORT": { diff --git a/src/sonic-yang-models/yang-models/sonic-port.yang b/src/sonic-yang-models/yang-models/sonic-port.yang index f164140d0d..183dd0d4b1 100644 --- a/src/sonic-yang-models/yang-models/sonic-port.yang +++ b/src/sonic-yang-models/yang-models/sonic-port.yang @@ -155,6 +155,10 @@ module sonic-port{ } } + leaf dom_polling { + type stypes:admin_mode; + } + leaf pfc_asym { type string { pattern "on|off";