Skip to content

[sonic-yang-models]: Add PACKET_COLOR_ACTION to sonic-acl YANG#28151

Open
AnantKishorSharma wants to merge 1 commit into
sonic-net:masterfrom
AnantKishorSharma:acl-set-packet-color-yang
Open

[sonic-yang-models]: Add PACKET_COLOR_ACTION to sonic-acl YANG#28151
AnantKishorSharma wants to merge 1 commit into
sonic-net:masterfrom
AnantKishorSharma:acl-set-packet-color-yang

Conversation

@AnantKishorSharma

Copy link
Copy Markdown
Contributor

What I did

Add the PACKET_COLOR_ACTION leaf (enum GREEN/YELLOW/RED) to the sonic-acl YANG 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: new leaf PACKET_COLOR_ACTION (enumeration GREEN/YELLOW/RED) under the ACL rule.
  • yang_model_tests: positive case ACL_RULE_WITH_VALID_PACKET_COLOR_ACTION and negative case ACL_RULE_WITH_INVALID_PACKET_COLOR_ACTION (rejects a non-enum value).

How I verified

Ran the full sonic-yang-models pytest (tests/yang_model_tests) — both new cases pass, no mismatches.

Related: sonic-net/sonic-swss#4717 (orchagent support), sonic-net/sonic-swss#4716 (issue).

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>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants