68 lines
1.6 KiB
YANG
68 lines
1.6 KiB
YANG
module sonic-tc-priority-group-map {
|
|
|
|
yang-version 1.1;
|
|
|
|
namespace "http://github.com/Azure/sonic-tc-priority-group-map";
|
|
|
|
prefix tpgm;
|
|
|
|
import sonic-types {
|
|
prefix stypes;
|
|
}
|
|
|
|
organization
|
|
"SONiC";
|
|
|
|
contact
|
|
"SONiC";
|
|
|
|
description
|
|
"TC_TO_PRIORITY_GROUP_MAP yang Module for SONiC OS";
|
|
|
|
revision 2021-04-15 {
|
|
description
|
|
"Initial revision.";
|
|
}
|
|
|
|
container sonic-tc-priority-group-map {
|
|
|
|
container TC_TO_PRIORITY_GROUP_MAP {
|
|
|
|
description "TC_TO_PRIORITY_GROUP_MAP part of config_db.json";
|
|
|
|
list TC_TO_PRIORITY_GROUP_MAP_LIST {
|
|
|
|
key "name";
|
|
|
|
leaf name {
|
|
type string {
|
|
pattern '[a-zA-Z0-9]{1}([-a-zA-Z0-9_]{0,31})';
|
|
length 1..32 {
|
|
error-message "Invalid length for map name.";
|
|
error-app-tag map-name-invalid-length;
|
|
}
|
|
}
|
|
}
|
|
|
|
list TC_TO_PRIORITY_GROUP_MAP { //this is list inside list for storing mapping between two fields
|
|
|
|
key "tc";
|
|
|
|
leaf tc {
|
|
type stypes:tc_type;
|
|
}
|
|
|
|
leaf pg {
|
|
type string {
|
|
pattern "[0-7]?" {
|
|
error-message "Invalid Priority Group";
|
|
error-app-tag pg-invalid;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|