Update Yang for pfc_enable field (#11747)
Why I did it This PR is to update Yang model for pfc_enable and pfcwd_sw_enable fields to support more than 2 queues, like 2,3,4,6. Before this change, the regex "[0-7](,[0-7])?" accepts only no more than 2 queues. How I did it Update the regex pattern for pfc_enable and pfcwd_sw_enable, from "[0-7](,[0-7])?" to "[0-7](,[0-7])* How to verify it The change is verified by UT. The test input is updated to cover the change. collected 3 items tests/test_sonic_yang_models.py .. [ 66%] tests/yang_model_tests/test_yang_model.py .
This commit is contained in:
parent
91b7018910
commit
9ee2724992
@ -669,8 +669,8 @@
|
||||
"pfc_to_pg_map": "map1",
|
||||
"dscp_to_tc_map": "map1",
|
||||
"dot1p_to_tc_map": "map1",
|
||||
"pfc_enable": "3,4",
|
||||
"pfcwd_sw_enable" : "3,4"
|
||||
"pfc_enable": "2,3,4,6",
|
||||
"pfcwd_sw_enable" : "2,3,4,6"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -82,13 +82,13 @@ module sonic-port-qos-map {
|
||||
|
||||
leaf pfc_enable {
|
||||
type string {
|
||||
pattern "[0-7](,[0-7])?";
|
||||
pattern "[0-7](,[0-7])*";
|
||||
}
|
||||
}
|
||||
|
||||
leaf pfcwd_sw_enable {
|
||||
type string {
|
||||
pattern "[0-7](,[0-7])?";
|
||||
pattern "[0-7](,[0-7])*";
|
||||
}
|
||||
description
|
||||
"Specify the queue(s) on which software pfc watchdog are enabled.";
|
||||
|
Loading…
Reference in New Issue
Block a user