Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Yang] Update Yang for pfc_enable and pfcwd_sw_enable fields #11747

Merged
merged 1 commit into from
Aug 17, 2022

Conversation

bingwang-ms
Copy link
Contributor

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 .                                                                                                                                                     [100%]

====================================================================================== 3 passed in 2.55 seconds =======================================================================================

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Update Yang model for pfc_enable and pfcwd_sw_enable fields to support more than 2 queues, like 2,3,4,6.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@bingwang-ms bingwang-ms marked this pull request as ready for review August 16, 2022 15:27
@yxieca yxieca merged commit 53a2810 into sonic-net:master Aug 17, 2022
yxieca pushed a commit that referenced this pull request Aug 17, 2022
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 .
liushilongbuaa added a commit to liushilongbuaa/sonic-buildimage that referenced this pull request Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants