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 db9b432714eb..0d67a73148b3 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 @@ -69,6 +69,17 @@ "desc": "PORT_INVALID_ADVTYPES_TEST_2 must condition failure.", "eStrKey" : "Must" }, + "PORT_VALID_LINK_TRAINING_TEST_1": { + "desc": "PORT_VALID_LINK_TRAINING_TEST_1 no failure." + }, + "PORT_VALID_LINK_TRAINING_TEST_2": { + "desc": "PORT_VALID_LINK_TRAINING_TEST_2 no failure." + }, + "PORT_INVALID_LINK_TRAINING_TEST": { + "desc": "PORT_INVALID_LINK_TRAINING_TEST must condition failure.", + "eStrKey" : "Pattern", + "eStr": ["on|off"] + }, "PORT_INVALID_TPID_TEST": { "desc": "PORT_INVALID_TPID_TEST invalid tpid value failure.", "eStrKey" : "Pattern", 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 db3334e80d2b..7f5c91230df8 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 @@ -311,6 +311,57 @@ } }, + "PORT_VALID_LINK_TRAINING_TEST_1": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet8", + "alias": "eth8", + "lanes": "65", + "speed": 25000, + "tpid": "0x8100", + "link_training": "on" + } + ] + } + } + }, + + "PORT_VALID_LINK_TRAINING_TEST_2": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet8", + "alias": "eth8", + "lanes": "65", + "speed": 25000, + "tpid": "0x8100", + "link_training": "off" + } + ] + } + } + }, + + "PORT_INVALID_LINK_TRAINING_TEST": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet8", + "alias": "eth8", + "lanes": "65", + "speed": 25000, + "tpid": "0x8100", + "link_training": 0 + } + ] + } + } + }, + "PORT_INVALID_TPID_TEST": { "sonic-port:sonic-port": { "sonic-port:PORT": {