forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding YANG model for TC_TO_DSCP_MAP
issue : sonic-net#20575
- Loading branch information
1 parent
f14e534
commit c0319e0
Showing
6 changed files
with
182 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
module sonic-tc-dscp-map { | ||
|
||
yang-version 1.1; | ||
|
||
namespace "http://github.com/sonic-net/sonic-tc-dscp-map"; | ||
|
||
prefix dtm; | ||
|
||
import sonic-types { | ||
prefix stypes; | ||
} | ||
|
||
organization | ||
"SONiC"; | ||
|
||
contact | ||
"SONiC"; | ||
|
||
description | ||
"TC_TO_DSCP_MAP yang Module for SONiC OS"; | ||
|
||
revision 2025-01-10 { | ||
description | ||
"Initial revision."; | ||
} | ||
|
||
container sonic-tc-dscp-map { | ||
|
||
container TC_TO_DSCP_MAP { | ||
|
||
description "TC_TO_DSCP_MAP part of config_db.json"; | ||
|
||
list TC_TO_DSCP_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_DSCP_MAP { //this is list inside list for storing mapping between two fields | ||
|
||
key "tc"; | ||
|
||
leaf tc { | ||
type stypes:tc_type; | ||
} | ||
|
||
leaf dscp { | ||
type string { | ||
pattern "6[0-3]|[1-5][0-9]?|[0-9]?" { | ||
error-message "Invalid DSCP"; | ||
error-app-tag dscp-invalid; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |