13bb747398
Why I did it Added Buffer yang files derived from sonic/mgmt-cvl/testdata/schema from sonic-mgmt-common, used by mgmt-framework. Updated BUFFER_PG|({ifname},)*|{pg_num} to BUFFER_PG|{ifname}|{pg_num} in sonic-buffer-pg.yang. This change is required for configuration migration for dynamic port breakout operation. Added sonic-buffer-queue.yang for BUFFER_QUEUE Tables: BUFFER_POOL, BUFFER_PROFILE, BUFFER_PG, BUFFER_QUEUE. How I did it Defined Yang models for BUFFER tables based on Guideline doc: https://github.com/Azure/SONiC/blob/master/doc/mgmt/SONiC_YANG_Model_Guidelines.md and https://github.com/Azure/sonic-utilities/blob/master/doc/Command-Reference.md How to verify it sonic_yang_models package build. Description for the changelog MMU Buffer yang files (BUFFER_POOL/BUFFER_PROFILE/BUFFER_PG/BUFFER_QUEUE)
67 lines
1.5 KiB
YANG
67 lines
1.5 KiB
YANG
module sonic-buffer-queue {
|
|
namespace "http://github.com/Azure/sonic-buffer-queue";
|
|
prefix bqueue;
|
|
|
|
import sonic-extension {
|
|
prefix sonic-ext;
|
|
}
|
|
|
|
import sonic-port {
|
|
prefix prt;
|
|
}
|
|
|
|
import sonic-buffer-profile {
|
|
prefix bpf;
|
|
}
|
|
|
|
organization
|
|
"SONiC";
|
|
|
|
contact
|
|
"SONiC";
|
|
|
|
description
|
|
"SONIC BUFFER QUEUE";
|
|
|
|
revision 2021-07-01 {
|
|
description
|
|
"Initial revision.";
|
|
}
|
|
|
|
|
|
container sonic-buffer-queue {
|
|
|
|
container BUFFER_QUEUE {
|
|
|
|
list BUFFER_QUEUE_LIST {
|
|
key "port qindex";
|
|
|
|
leaf port {
|
|
type leafref {
|
|
path "/prt:sonic-port/prt:PORT/prt:PORT_LIST/prt:name";
|
|
}
|
|
}
|
|
|
|
leaf qindex {
|
|
type string {
|
|
pattern "(1[0-5]|[0-9])((-)(1[0-5]|[0-9]))?"{
|
|
error-message "Invalid Q-index";
|
|
error-app-tag qindex-invalid;
|
|
}
|
|
}
|
|
description "Egress Queue Index for a port";
|
|
}
|
|
|
|
leaf profile {
|
|
default 0;
|
|
type leafref {
|
|
path "/bpf:sonic-buffer-profile/bpf:BUFFER_PROFILE/bpf:BUFFER_PROFILE_LIST/bpf:name";
|
|
}
|
|
description "Buffer Profile associated with Priority Queue for a port";
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|