[202012][cherry-pick] Support port name in ACL table AttachTo
attribute
#13178
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.
Why I did it
This PR is to cherry-pick #13105 and #13444 into
202012
branch after resloving conflicts.This PR is to update
minigraph.py
to support both port alias and port name as input ofAttachTo
attribute of ACL table.Before this change, only port alias is supported.
Because the input string of
AttachTo
for ACL table can appear in both port name group and port alias group, I added a logic to determine whether the string should be port name or port aliasHow I did it
AttachTo
.How to verify it
test_minigraph_acl_attach_to_ports
minigraph.py
to a testbed and runconflg load_minigraph
.Which release branch to backport (provide reason below if selected)
Description for the changelog
This PR is to update
minigraph.py
to support both port alias and port name as input ofAttachTo
attribute of ACL table.Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)