Merged
Conversation
Signed-off-by: Abhishek Dosi <[email protected]>
This reverts commit adeb086.
Signed-off-by: Abhishek Dosi <[email protected]>
shi-su
previously approved these changes
Feb 4, 2021
| cfg_mgr.push_list = push_list | ||
| cfg_mgr.get_text.return_value = currect_config | ||
| if gloabl_default_action: | ||
| global_constants["bgp"]["allow_list"]["default_action"] = gloabl_default_action |
Contributor
There was a problem hiding this comment.
Just a personal preference, what about updating mgr.constants["bgp"]["allow_list"]["default_action"] afterwards? I feel updating this global default action and then revert it back looks a little strange.
Contributor
Author
There was a problem hiding this comment.
@shi-su Thanks updated accordingly usingdeepcopy() for constant.
Signed-off-by: Abhishek Dosi <[email protected]>
shi-su
approved these changes
Feb 4, 2021
abdosi
added a commit
that referenced
this pull request
Feb 4, 2021
When we add allow-list key with action above route-map gets updated . For eg if we add deny action above template will become to no-export community. Now if we delete the key Issue is we still keep the no-export and do not move back to drop community. This PR fixes this issue by rolling back default route-map community value back to constants.yml default action.
abdosi
added a commit
to sonic-net/sonic-mgmt
that referenced
this pull request
Feb 5, 2021
Updated test case to align with sonic-net/sonic-buildimage#6370 which made allow list action dynamic Added test case to cover sonic-net/sonic-buildimage#6671 Remove fixed value of Drop Community and read from /etc/sonic/constants.yml file. Organized the case as three test case one to verify default pre/post-config behavior when no prefix list there on device and then test case to verify with prefix list programmed with action as permit and deny
daall
pushed a commit
that referenced
this pull request
Feb 5, 2021
When we add allow-list key with action above route-map gets updated . For eg if we add deny action above template will become to no-export community. Now if we delete the key Issue is we still keep the no-export and do not move back to drop community. This PR fixes this issue by rolling back default route-map community value back to constants.yml default action.
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.
What I did:
For Allow list prefix we have default route-map to set community define in template. Based on default action define in constants.yml the community value can be no-export (drop action) or drop-community (permit action) in the template generated route-map
When we add allow-list key with action above route-map gets updated . For eg if we add deny action above template will become to no-export community. Now if we delete the key Issue is we still keep the no-export and do not move back to drop community.
This PR fixes this issue by rolling back default route-map community value back to constants.yml default action.
Why I did:
This is needed if we want to roll-back the allow list feature (delete allow prefix key) that was having deny action and move back to permit as default
How I verify:
Added Unit test cases to cover this scenario.