[sonic-yang-models]: Add PACKET_COLOR_ACTION to sonic-acl YANG#28151
Open
AnantKishorSharma wants to merge 1 commit into
Open
[sonic-yang-models]: Add PACKET_COLOR_ACTION to sonic-acl YANG#28151AnantKishorSharma wants to merge 1 commit into
AnantKishorSharma wants to merge 1 commit into
Conversation
Model the new ACL rule action PACKET_COLOR_ACTION (GREEN/YELLOW/RED) in the sonic-acl YANG, matching the AclOrch SET_PACKET_COLOR support in sonic-swss. Adds positive and negative yang_model_tests for the new leaf. Signed-off-by: Anant Kishor Sharma <anant.kishor-sharma@hpe.com>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Add the
PACKET_COLOR_ACTIONleaf (enumGREEN/YELLOW/RED) to thesonic-aclYANG model so a CONFIG_DB ACL rule can carry the packet-color action. This is the YANG counterpart to the orchagent support in sonic-net/sonic-swss#4717.Details
yang-templates/sonic-acl.yang.j2: newleaf PACKET_COLOR_ACTION(enumeration GREEN/YELLOW/RED) under the ACL rule.yang_model_tests: positive caseACL_RULE_WITH_VALID_PACKET_COLOR_ACTIONand negative caseACL_RULE_WITH_INVALID_PACKET_COLOR_ACTION(rejects a non-enum value).How I verified
Ran the full
sonic-yang-modelspytest (tests/yang_model_tests) — both new cases pass, no mismatches.Related: sonic-net/sonic-swss#4717 (orchagent support), sonic-net/sonic-swss#4716 (issue).