Update YANG for PORT_QOS_MAP to support switch level mapping (#11089)

Signed-off-by: bingwang <wang.bing@microsoft.com>

Co-authored-by: Neetha John <nejo@microsoft.com>
This commit is contained in:
bingwang-ms 2022-06-16 11:29:38 +08:00 committed by Ying Xie
parent 255d77e610
commit 16c424b081
3 changed files with 48 additions and 6 deletions

View File

@ -87,6 +87,10 @@
"desc": "Configure qos maps on port." "desc": "Configure qos maps on port."
}, },
"PORT_QOS_MAP_APPLY_MAP_TO_GLOBAL": {
"desc": "Configure qos maps on switch level."
},
"PORT_QOS_MAP_APPLY_NON_EXISTS_MAPS": { "PORT_QOS_MAP_APPLY_NON_EXISTS_MAPS": {
"desc": "Configure non exists qos maps on port.", "desc": "Configure non exists qos maps on port.",
"eStrKey": "LeafRef" "eStrKey": "LeafRef"
@ -94,7 +98,7 @@
"PORT_QOS_MAP_APPLY_NON_EXISTS_PORT": { "PORT_QOS_MAP_APPLY_NON_EXISTS_PORT": {
"desc": "Configure port qos map entry on non exists port.", "desc": "Configure port qos map entry on non exists port.",
"eStrKey": "LeafRef" "eStr": "Invalid value"
}, },
"PORT_QOS_MAP_APPLY_INVALID_PFC": { "PORT_QOS_MAP_APPLY_INVALID_PFC": {

View File

@ -629,6 +629,39 @@
} }
}, },
"PORT_QOS_MAP_APPLY_MAP_TO_GLOBAL": {
"sonic-dscp-tc-map:sonic-dscp-tc-map": {
"sonic-dscp-tc-map:DSCP_TO_TC_MAP": {
"DSCP_TO_TC_MAP_LIST": [
{
"name": "map1",
"DSCP_TO_TC_MAP": [
{
"dscp": "1",
"tc": "1"
},
{
"dscp":"2",
"tc":"2"
}
]
}
]
}
},
"sonic-port-qos-map:sonic-port-qos-map": {
"sonic-port-qos-map:PORT_QOS_MAP": {
"PORT_QOS_MAP_LIST": [
{
"ifname": "global",
"dscp_to_tc_map": "map1"
}
]
}
}
},
"PORT_QOS_MAP_APPLY_NON_EXISTS_MAPS": { "PORT_QOS_MAP_APPLY_NON_EXISTS_MAPS": {
"sonic-port:sonic-port": { "sonic-port:sonic-port": {
"sonic-port:PORT": { "sonic-port:PORT": {

View File

@ -56,11 +56,16 @@ module sonic-port-qos-map {
key "ifname"; key "ifname";
leaf ifname { leaf ifname {
type union {
type string {
pattern "global";
}
type leafref { type leafref {
path "/prt:sonic-port/prt:PORT/prt:PORT_LIST/prt:name"; path "/prt:sonic-port/prt:PORT/prt:PORT_LIST/prt:name";
} }
}
description description
"Reference of port on which QOS MAPS to be configured."; "Reference of port or global on which QOS MAPS to be configured.";
} }
leaf tc_to_pg_map { leaf tc_to_pg_map {