diff --git a/src/sonic-yang-models/doc/Configuration.md b/src/sonic-yang-models/doc/Configuration.md index a7726d8b5695..dc761ae02036 100644 --- a/src/sonic-yang-models/doc/Configuration.md +++ b/src/sonic-yang-models/doc/Configuration.md @@ -1422,7 +1422,9 @@ name as object key and member list as attribute. "members": [ "Ethernet56" ], - "mtu": "9100" + "mtu": "9100", + "fallback": "false", + "fast_rate": "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 8b80631f4fb4..4267a507dd91 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -108,7 +108,9 @@ "admin_status": "up", "min_links": "2", "mtu": "9100", - "tpid": "0x8100" + "tpid": "0x8100", + "fast_rate": "false", + "fallback" : "true" } }, "PORTCHANNEL_INTERFACE": { diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/portchannel.json b/src/sonic-yang-models/tests/yang_model_tests/tests/portchannel.json index e69074bdfbf6..ae7a7dffd928 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/portchannel.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/portchannel.json @@ -19,6 +19,16 @@ "eStrKey" : "Pattern", "eStr": ["0x8100|0x9100|0x9200|0x88a8|0x88A8"] }, + "PORT_CHANNEL_INVALID_FALLBACK": { + "desc": "INCORRECT PORTCHANNEL FALLBACK IN PORT_CHANNEL TABLE.", + "eStrKey" : "Pattern", + "eStr": ["false|true|False|True"] + }, + "PORT_CHANNEL_INVALID_FAST_RATE": { + "desc": "INCORRECT PORTCHANNEL FAST_RATE IN PORT_CHANNEL TABLE.", + "eStrKey" : "Pattern", + "eStr": ["false|true|False|True"] + }, "PORTCHANNEL_INTERFACE_IP_ADDR_TEST": { "desc": "Configure IP address on PORTCHANNEL_INTERFACE table." }, diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/portchannel.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/portchannel.json index ba0762e5ebc6..36f2484fa3bf 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/portchannel.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/portchannel.json @@ -25,7 +25,9 @@ "mtu": "9100", "tpid": "0x8100", "lacp_key": "auto", - "name": "PortChannel0001" + "name": "PortChannel0001", + "fast_rate": "false", + "fallback" : "false" } ] } @@ -116,6 +118,36 @@ } } }, + "PORT_CHANNEL_INVALID_FALLBACK": { + "sonic-portchannel:sonic-portchannel": { + "sonic-portchannel:PORTCHANNEL": { + "PORTCHANNEL_LIST": [ + { + "admin_status": "up", + "mtu": "9100", + "tpid": "0x9100", + "name": "PortChannel0001", + "fallback": "enabled" + } + ] + } + } + }, + "PORT_CHANNEL_INVALID_FAST_RATE": { + "sonic-portchannel:sonic-portchannel": { + "sonic-portchannel:PORTCHANNEL": { + "PORTCHANNEL_LIST": [ + { + "admin_status": "up", + "mtu": "9100", + "tpid": "0x9100", + "name": "PortChannel0001", + "fast_rate": "TRUE" + } + ] + } + } + }, "PORTCHANNEL_INTERFACE_IP_ADDR_TEST": { "sonic-portchannel:sonic-portchannel": { "sonic-portchannel:PORTCHANNEL": { diff --git a/src/sonic-yang-models/yang-models/sonic-portchannel.yang b/src/sonic-yang-models/yang-models/sonic-portchannel.yang index 96872eeadb1d..717e3924c420 100644 --- a/src/sonic-yang-models/yang-models/sonic-portchannel.yang +++ b/src/sonic-yang-models/yang-models/sonic-portchannel.yang @@ -102,6 +102,15 @@ module sonic-portchannel { type stypes:tpid_type; } + leaf fallback { + description "Enable LACP fallback feature"; + type stypes:boolean_type; + } + leaf fast_rate { + description "Enable LACP fast rate"; + type stypes:boolean_type; + } + } /* end of list PORTCHANNEL_LIST */ } /* end of container PORTCHANNEL */