-
Notifications
You must be signed in to change notification settings - Fork 632
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
sonic-utilities : CLICK support to add/delete rules in openconfig format #2523
base: master
Are you sure you want to change the base?
sonic-utilities : CLICK support to add/delete rules in openconfig format #2523
Conversation
…mat using acl-loader * Support for adding rules using json file in dataplane acl using "config acl add rule <filename> * Support for deleting rule using table_name rule_name using "config acl delete rule <table_name> <rule_name>"
This pull request introduces 1 alert when merging 580c7a5 into addae73 - view on LGTM.com new alerts:
Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog. |
Addressed |
Closed by mistake. Reopening. |
Hi, Can anyone review this pull request and give your feedback. |
What I did
Changes in existing acl CLICK command to handle cases of rule addition/deletion:
Existing CLICK commands "config acl update full/incremental", both delete all the existing acl rules and add the new rules. There is no option for adding new rules to the dataplane ACL table. Similarly, there is no provision to remove a single rule from acl table using CLICK commands.
How I did it
In config/main.py script, "config acl remove table" included the cli command "acl-loader delete " also. This ensures that rules are also cleared when table is deleted.
How to verify it
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)
#config acl add rule acl_src_ipv4.json
#config acl remove rule DATAACL RULE_2
#config acl remove table DATAACL
UT file attached.