[acl-loader] Fix and refactor incremental update#242
Merged
prsunny merged 3 commits intosonic-net:masterfrom Apr 25, 2018
jleveque:acl_loader_incremental_update
Merged
[acl-loader] Fix and refactor incremental update#242prsunny merged 3 commits intosonic-net:masterfrom jleveque:acl_loader_incremental_update
prsunny merged 3 commits intosonic-net:masterfrom
jleveque:acl_loader_incremental_update
Conversation
lguohan
reviewed
Apr 20, 2018
acl_loader/main.py
Outdated
| for key in existing_controlplane_rules: | ||
| if cmp(self.rules_info[key], self.rules_db_info[key]) != 0: | ||
| self.configdb.mod_entry(self.ACL_RULE, key, None) | ||
| self.configdb.mod_entry(self.ACL_RULE, key, self.rules_info[key]) |
Contributor
There was a problem hiding this comment.
self.configdb.set_entry(self.ACL_RULE, key, self.rules_info[key])
lguohan
reviewed
Apr 20, 2018
|
|
||
| for key in added_rules: | ||
| for key in added_controlplane_rules: | ||
| self.configdb.mod_entry(self.ACL_RULE, key, self.rules_info[key]) |
Contributor
There was a problem hiding this comment.
move added rules above removed rules
prsunny
approved these changes
Apr 24, 2018
lguohan
approved these changes
Apr 25, 2018
mihirpat1
pushed a commit
to mihirpat1/sonic-utilities
that referenced
this pull request
Sep 15, 2023
kktheballer
pushed a commit
to kktheballer/sonic-utilities
that referenced
this pull request
Jan 14, 2026
```<br>* b1248a0 - (HEAD -> 202506) Merge branch '202505' of https://github.com/sonic-net/sonic-utilities into 202506 (2025-09-19) [Sonic Automation] * 661ac61 - (origin/202505) DOM for flat memory transceiver modules (sonic-net#4063) (2025-09-19) [mssonicbld]<br>```
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.
cmp(self.rules_info[key], self.rules_db_info[key])would consistently fail because some string elements inrules_infowere encoded in Unicode when loading the ACLs from a file, whereas all elements inrules_db_info, pulled from ConfigDB, were encoded in ASCII.rules_db_infoare converted to ASCII, which causes the compare operation to work properly.