diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/buffer_queue.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/buffer_queue.json index 91a39a89e3a..032aa0f833e 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/buffer_queue.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/buffer_queue.json @@ -209,6 +209,21 @@ } }, "VOQ_BUFFER_QUEUE_CONFIG": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "admin_status": "up", + "alias": "eth0", + "description": "Ethernet0", + "mtu": "9000", + "name": "Ethernet4", + "tpid": "0x8100", + "speed": "25000" + } + ] + } + }, "sonic-device_metadata:sonic-device_metadata": { "sonic-device_metadata:DEVICE_METADATA": { "sonic-device_metadata:localhost": { diff --git a/src/sonic-yang-models/yang-models/sonic-buffer-queue.yang b/src/sonic-yang-models/yang-models/sonic-buffer-queue.yang index 685ed026dbf..22bf4b0043a 100644 --- a/src/sonic-yang-models/yang-models/sonic-buffer-queue.yang +++ b/src/sonic-yang-models/yang-models/sonic-buffer-queue.yang @@ -88,10 +88,9 @@ module sonic-buffer-queue { } leaf port { - type string { - length 1..128; + type leafref { + path "/prt:sonic-port/prt:PORT/prt:PORT_LIST/prt:name"; } - description "port name."; } diff --git a/src/sonic-yang-models/yang-models/sonic-cable-length.yang b/src/sonic-yang-models/yang-models/sonic-cable-length.yang index 84ca01f34a0..b0ea408847d 100644 --- a/src/sonic-yang-models/yang-models/sonic-cable-length.yang +++ b/src/sonic-yang-models/yang-models/sonic-cable-length.yang @@ -13,7 +13,7 @@ module sonic-cable-length { description "CABLE_LENGTH YANG module for SONiC OS"; revision 2021-11-11 { - description "Initial version"; + description "Initial version."; } container sonic-cable-length { @@ -48,7 +48,7 @@ module sonic-cable-length { leaf length { type string { - pattern '[0-9]+m' { + pattern '[0-9]+m|None' { error-message "Invalid cable length."; error-app-tag cable-length-invalid-length; }