[ACL] Add CTRLPLANE table services support#4450
Open
HanumanthKumarMotepalli wants to merge 3 commits intosonic-net:masterfrom
Open
[ACL] Add CTRLPLANE table services support#4450HanumanthKumarMotepalli wants to merge 3 commits intosonic-net:masterfrom
HanumanthKumarMotepalli wants to merge 3 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Hanumanth Kumar Motepalli <hanumanth-kumar.motepalli@hpe.com>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
* Document new -S/--services option for config acl add table * Add CTRLPLANE as a valid table_type in parameter description * Add CTRLPLANE usage examples with -S flag Signed-off-by: Hanumanth Kumar Motepalli <hanumanth-kumar.motepalli@hpe.com>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@HanumanthKumarMotepalli - Please fix the pre commit error |
Signed-off-by: Hanumanth Kumar Motepalli <hanumanth-kumar.motepalli@hpe.com>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Author
Resolved |
Author
|
Hi @yxieca, could you please suggest the appropriate reviewers for this PR? |
Contributor
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.
fixes sonic-net/sonic-buildimage#4970
What I did
Added --services / -S option to the config acl add table command to support CTRLPLANE ACL table type. Previously, CTRLPLANE tables could not be properly configured.
How I did it
How to verify it
#Should succeed
config acl add table SNMP_ACL CTRLPLANE -S SNMP.
config acl add table ROUTER_ACL CTRLPLANE -S SNMP,SSH,NTP
#Should fail - no service provided
config acl add table SNMP_ACL CTRLPLANE
#Should fail - CTRLPLANE cannot bind ports
config acl add table SNMP_ACL CTRLPLANE -S SNMP -p Ethernet0
#Should fail - invalid service
config acl add table SNMP_ACL CTRLPLANE -S INVALID_SVC
Previous command output (if the output of a command-line utility has changed)
$ config acl add table SNMP_ACL CTRLPLANE
#(no error — silently created table without services field)
#show acl table then crashes with KeyError:
New command output (if the output of a command-line utility has changed)
$ config acl add table SNMP_ACL CTRLPLANE
Failed to parse ACL table config: exception=CTRLPLANE ACL table requires at least one service via -S/--services (e.g. SNMP,SSH,NTP)
$ config acl add table SNMP_ACL CTRLPLANE -S SNMP
#(succeeds, table created with services=["SNMP"])