-
Notifications
You must be signed in to change notification settings - Fork 366
Add ProfileProvider class to support read profile config from PROFILE_DB. #683
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
ed04b93
Install libyang in azure pipeline
liuh-80 3d76913
Add profile config provider.
liuh-80 364f353
Fix missing file
liuh-80 269b00e
Fix file mode
liuh-80 44c9a75
Fix build issue
liuh-80 61db251
Fix config issue
liuh-80 4c3c951
Remove add new DB from redis config
liuh-80 6dcbee5
Merge branch 'dev/liuh/install-yang-to-pipeline' into dev/liuh/profil…
liuh-80 4a12abf
Add new database for UT
liuh-80 92acd07
Fix empty file issue
liuh-80 9b60524
Merge remote-tracking branch 'origin' into dev/liuh/profile-provider
liuh-80 57b9f59
Improve UT config file
liuh-80 02af224
Fix build issue
liuh-80 c558e6b
Improve UT
liuh-80 9b0653d
Refactor getall method
liuh-80 508ed04
Merge branch 'dev/liuh/refact-getall' into dev/liuh/profile-provider
liuh-80 35b6774
Remove unecessary change
liuh-80 a2094ce
revert db config change.
liuh-80 eef426a
Fix DB seperator issue
liuh-80 4375c0a
Merge remote-tracking branch 'origin' into dev/liuh/profile-provider
liuh-80 c2a377e
Fix mode issue
liuh-80 448a0c4
Merge remote-tracking branch 'origin' into dev/liuh/profile-provider
liuh-80 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -244,24 +244,7 @@ void ConfigDBConnector_Native::mod_config(const map<string, map<string, map<stri | |
| map<string, map<string, map<string, string>>> ConfigDBConnector_Native::get_config() | ||
| { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. File change in configdb.cpp dbconnector.cpp and dbconnector.h are from another PR: |
||
| auto& client = get_redis_client(m_db_name); | ||
| auto const& keys = client.keys("*"); | ||
| map<string, map<string, map<string, string>>> data; | ||
| for (string key: keys) | ||
| { | ||
| size_t pos = key.find(m_table_name_separator); | ||
| if (pos == string::npos) { | ||
| continue; | ||
| } | ||
| string table_name = key.substr(0, pos); | ||
| string row = key.substr(pos + 1); | ||
| auto const& entry = client.hgetall<map<string, string>>(key); | ||
|
|
||
| if (!entry.empty()) | ||
| { | ||
| data[table_name][row] = entry; | ||
| } | ||
| } | ||
| return data; | ||
| return client.getall(); | ||
| } | ||
|
|
||
| std::string ConfigDBConnector_Native::getKeySeparator() const | ||
|
|
||
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.