86fec08928
changes: -- yang model for mpls_tc_to_tc_map table. -- tests. #### Why I did it yang model for mpls_tc_to_tc_map table. #### How I did it -- yang model for mpls_tc_to_tc_map table. -- yang model tests. #### How to verify it -- yang model build time tests.
71 lines
1.7 KiB
YANG
71 lines
1.7 KiB
YANG
module sonic-mpls-tc-map {
|
|
|
|
yang-version 1.1;
|
|
|
|
namespace "http://github.com/Azure/sonic-mpls-tc-map";
|
|
|
|
prefix mpls_tc_map;
|
|
|
|
import sonic-types {
|
|
prefix stypes;
|
|
}
|
|
|
|
organization
|
|
"SONiC";
|
|
|
|
contact
|
|
"SONiC";
|
|
|
|
description
|
|
"MPLS_TC_TO_TC_MAP yang Module for SONiC OS";
|
|
|
|
revision 2021-04-15 {
|
|
description
|
|
"Initial revision.";
|
|
}
|
|
|
|
container sonic-mpls-tc-map {
|
|
|
|
container MPLS_TC_TO_TC_MAP {
|
|
|
|
description "MPLS_TC_TO_TC_MAP part of config_db.json";
|
|
|
|
list MPLS_TC_TO_TC_MAP_LIST {
|
|
|
|
key "name";
|
|
|
|
leaf name {
|
|
description "Name of MPLS TC Mpping List";
|
|
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 MPLS_TC_TO_TC_MAP { //this is list inside list for storing mapping between two fields
|
|
|
|
key "mpls";
|
|
|
|
leaf mpls {
|
|
description "MPLS TC Value";
|
|
type string {
|
|
pattern "[0-7]?" {
|
|
error-message "Invalid MPLS";
|
|
error-app-tag mpls-invalid;
|
|
}
|
|
}
|
|
}
|
|
|
|
leaf tc {
|
|
description "Matching TC Value";
|
|
type stypes:tc_type;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|