[HLD] Enhance show acl commands to display status#1261
Merged
bingwang-ms merged 3 commits intosonic-net:masterfrom Mar 15, 2023
Merged
[HLD] Enhance show acl commands to display status#1261bingwang-ms merged 3 commits intosonic-net:masterfrom
bingwang-ms merged 3 commits intosonic-net:masterfrom
Conversation
This was referenced Feb 10, 2023
This was referenced Mar 20, 2023
StormLiangMS
pushed a commit
to sonic-net/sonic-utilities
that referenced
this pull request
Mar 24, 2023
What I did This PR is to backport changes in PR #2667 into 202211 branch. HLD sonic-net/SONiC#1261 This PR is to enhance show acl table and show acl rule commands. Currently, show acl table and show acl rule commands read ACL table/rule configuration from CONFIG_DB directly. We don't know whether the ACL table or rule is created successfully. We improved swss to write the status of ACL table/rule into a STATE_DB table. In this PR, the show command is enhanced to read the status from STATE_DB table. How I did it Introduce two tables in STATE_DB orchgent writes the status to STATE_DB show commands read the status from STATE_DB. How to verify it Verified by copying the new script to a testbed, and check the output. Previous command output (if the output of a command-line utility has changed) $ show acl table DATAACL Name Type Binding Description Stage ------- ------ ----------- ------------- ------- DATAACL L3 Ethernet0 DATAACL ingress Ethernet4 Ethernet8 Ethernet12 show acl rule Table Rule Priority Action Match ------- ------------ ---------- -------- ------------------- DATAACL RULE_1 9999 DROP DST_IP: 9.5.9.3/32 ETHER_TYPE: 2048 DATAACL RULE_2 9998 FORWARD DST_IP: 10.2.1.2/32 ETHER_TYPE: 2048 IP_PROTOCOL: 6 L4_DST_PORT: 22 New command output (if the output of a command-line utility has changed) $ show acl table DATAACL Name Type Binding Description Stage Status ------- ------ ----------- ------------- ------- ------- DATAACL L3 Ethernet0 DATAACL ingress Active Ethernet4 Ethernet8 Ethernet12 show acl rule Table Rule Priority Action Match Status ------- ------------ ---------- -------- ------------------- -------- DATAACL RULE_1 9999 DROP DST_IP: 9.5.9.3/32 Active ETHER_TYPE: 2048 DATAACL RULE_2 9998 FORWARD DST_IP: 10.2.1.2/32 Active ETHER_TYPE: 2048 IP_PROTOCOL: 6 L4_DST_PORT: 22
StormLiangMS
pushed a commit
to sonic-net/sonic-swss-common
that referenced
this pull request
Apr 5, 2023
This PR is to backport change in PR #748 into 202211 branch. HLD sonic-net/SONiC#1261
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.
This PR is to add HLD for enhancement on
show acl tableandshow acl rulecommands.PR: