Skip to content

Commit

Permalink
chane port to leafref also for VOQ
Browse files Browse the repository at this point in the history
allow None for cable length - for port removal

Signed-off-by: matiAlfaro <[email protected]>
  • Loading branch information
matiAlfaro committed Jul 2, 2024
1 parent 0114373 commit 9758ae7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,22 @@
}
},
"VOQ_BUFFER_QUEUE_CONFIG": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth0",
"description": "Ethernet0",
"lanes": "65",
"mtu": "9000",
"name": "Ethernet4",
"tpid": "0x8100",
"speed": "25000"
}
]
}
},
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
Expand Down
5 changes: 2 additions & 3 deletions src/sonic-yang-models/yang-models/sonic-buffer-queue.yang
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,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.";
}

Expand Down
2 changes: 1 addition & 1 deletion src/sonic-yang-models/yang-models/sonic-cable-length.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9758ae7

Please sign in to comment.