-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Adding yang model for PFC watch dog parameters #7839
Conversation
Hi Anshu, |
Hi Anshu, The BGP failure issue was resolved. All checks are passing now. |
@rathnasabapathyv please follow-up and resolve the conflict. |
src/sonic-yang-models/tests/yang_model_tests/tests_config/pfc.json
Outdated
Show resolved
Hide resolved
src/sonic-yang-models/tests/yang_model_tests/tests_config/pfc.json
Outdated
Show resolved
Hide resolved
src/sonic-yang-models/tests/yang_model_tests/tests_config/pfc.json
Outdated
Show resolved
Hide resolved
@AmitKaushik7 Please update as per suggestions and update the description with test results under "How to verify" section. |
BRCM team will continue to work on this, ETA is next week. |
All the comments have been addressed by BRCM, PR can be merged. @lguohan please help to merge. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the description with test results.
Why I did it
Added sonic-pfcwd.yang file that defines the yang model for PFC watch dog parameters
sonic-pfcwd.yang is required for configuring action, detection_time, restoration time of PFC watchdog on the interface port.
How I did it
Defined Yang models for PFC_WD table based on Guideline doc:
https://github.com/Azure/SONiC/blob/master/doc/mgmt/SONiC_YANG_Model_Guidelines.md
and
https://github.com/Azure/sonic-utilities/blob/master/doc/Command-Reference.md
How to verify it
sonic_yang_models package build.
Using pytest
pytest tests/yang_model_tests/test_yang_model.py -v
------------------- Test 15: PFC_WDOG_WITH_WRONG_POLL_INTERVAL_LOW_VALUE---------------------
libyang[0]: Value "99" does not satisfy the constraint "100..3000" (range, length, or pattern). (path: /sonic-pfcwd:sonic-pfcwd/PFC_WD/PFC_WD_LIST[ifname='GLOBAL']/POLL_INTERVAL)
INFO:YANG-TEST:Value "99" does not satisfy the constraint "100..3000" (range, length, or pattern).
INFO:YANG-TEST:PFC_WDOG_WITH_WRONG_POLL_INTERVAL_LOW_VALUE Passed
INFO:YANG-TEST:
------------------- Test 16: PFC_WDOG_WITH_CORRECT_ACTION_FORWARD_VALUE no failure.---------------------
INFO:YANG-TEST:PFC_WDOG_WITH_CORRECT_ACTION_FORWARD_VALUE no failure. Passed
INFO:YANG-TEST:
------------------- Test 18: PFC_WDOG_WITH_CORRECT_ACTION_ALERT_VALUE no failure.---------------------
INFO:YANG-TEST:PFC_WDOG_WITH_CORRECT_ACTION_ALERT_VALUE no failure. Passed
INFO:YANG-TEST:
------------------- Test 20: PFC_WDOG_WITH_WRONG_RESTORATION_TIME_LOW_VALUE---------------------
libyang[0]: Value "99" does not satisfy the constraint "100..5000" (range, length, or pattern). (path: /sonic-pfcwd:sonic-pfcwd/PFC_WD/PFC_WD_LIST/detection_time)
INFO:YANG-TEST:Value "99" does not satisfy the constraint "100..5000" (range, length, or pattern).
INFO:YANG-TEST:PFC_WDOG_WITH_WRONG_RESTORATION_TIME_LOW_VALUE Passed
INFO:YANG-TEST:
------------------- Test 21: PFC_WDOG_WITH_CORRECT_ACTION_DROP_VALUE no failure.---------------------
INFO:YANG-TEST:PFC_WDOG_WITH_CORRECT_ACTION_DROP_VALUE no failure. Passed
INFO:YANG-TEST:
------------------- Test 22: PFC_WDOG_WITH_WRONG_DETECTION_TIME_HIGH_VALUE---------------------
libyang[0]: Invalid value "wrong" in "action" element. (path: /sonic-pfcwd:sonic-pfcwd/PFC_WD/PFC_WD_LIST/action)
INFO:YANG-TEST:Invalid value "wrong" in "action" element.
INFO:YANG-TEST:PFC_WDOG_WITH_WRONG_DETECTION_TIME_HIGH_VALUE Passed
INFO:YANG-TEST:
------------------- Test 23: PFC_WDOG_WITH_WRONG_ACTION_VALUE must contain a valid action---------------------
libyang[0]: Invalid value "wrong" in "action" element. (path: /sonic-pfcwd:sonic-pfcwd/PFC_WD/PFC_WD_LIST/action)
INFO:YANG-TEST:Invalid value "wrong" in "action" element.
INFO:YANG-TEST:PFC_WDOG_WITH_WRONG_ACTION_VALUE must contain a valid action Passed
INFO:YANG-TEST:
------------------- Test 24: PFC_WDOG_WITH_WRONG_RESTORATION_TIME_HIGH_VALUE---------------------
libyang[0]: Invalid value "wrong" in "action" element. (path: /sonic-pfcwd:sonic-pfcwd/PFC_WD/PFC_WD_LIST/action)
INFO:YANG-TEST:Invalid value "wrong" in "action" element.
INFO:YANG-TEST:PFC_WDOG_WITH_WRONG_RESTORATION_TIME_HIGH_VALUE Passed
------------------- Test 26: PORT_VALID_ADVTYPES_TEST_2 no failure.---------------------
INFO:YANG-TEST:PORT_VALID_ADVTYPES_TEST_2 no failure. Passed
INFO:YANG-TEST:
------------------- Test 27: PFC_WDOG_WITH_CORRECT_POLL_INTERVAL_VALUE no failure---------------------
INFO:YANG-TEST:PFC_WDOG_WITH_CORRECT_POLL_INTERVAL_VALUE no failure Passed
Which release branch to backport (provide reason below if selected)
Description for the changelog
Added yang models for PFC WD parameters: "Action", "Detection time", "Restoration time", "Poll Interval"