Removed DB specific get api's from Selectable class#378
Merged
abdosi merged 3 commits intosonic-net:masterfrom Sep 2, 2020
Merged
Removed DB specific get api's from Selectable class#378abdosi merged 3 commits intosonic-net:masterfrom
abdosi merged 3 commits intosonic-net:masterfrom
Conversation
sonic-net#376 to remove DB specific API from selectable class which is generic. However to access to the Derviced Class Redis Select API via python we need to downcast the the Selectable Object. Added Helpfer function to do same. Ref: http://www.swig.org/Doc3.0/Python.html Signed-off-by: Abhishek Dosi <[email protected]>
Signed-off-by: Abhishek Dosi <[email protected]>
qiluo-msft
reviewed
Sep 1, 2020
common/redisselect.h
Outdated
| int getDbConnectorId() override; | ||
| std::string getDbNamespace() override; | ||
| int getDbConnectorId(); | ||
| std::string getDbNamespace(); |
Contributor
There was a problem hiding this comment.
Suggest add only one function const DBConnector* getDbConnector() const, and caller could call ret->getNamespace(), or any other member functions. #Closed
Contributor
Author
There was a problem hiding this comment.
Since the DBConnector is unique_ptr return the reference to the contained object, or a non owning pointer Signed-off-by: Abhishek Dosi <[email protected]>
qiluo-msft
approved these changes
Sep 2, 2020
Contributor
Author
|
@judyjoseph Please update sonic-py-common client accordingly. |
Collaborator
sure will take care of updating the pmon application ..Thanks for this change ! |
abdosi
added a commit
that referenced
this pull request
Sep 3, 2020
* Address Review comments #376 to remove DB specific API from selectable class which is generic. However to access to the Derviced Class Redis Select API via python we need to downcast the the Selectable Object. Added Helpfer function to do same. Ref: http://www.swig.org/Doc3.0/Python.html Signed-off-by: Abhishek Dosi <[email protected]> * Align the code properly Signed-off-by: Abhishek Dosi <[email protected]> * Address Review Comments. Return the DBConnector Pointer. Since the DBConnector is unique_ptr return the reference to the contained object, or a non owning pointer Signed-off-by: Abhishek Dosi <[email protected]>
prgeor
pushed a commit
to prgeor/sonic-swss-common
that referenced
this pull request
Feb 27, 2025
* Update consts.py Include DPTxTurnOnDuration and DPTxTurnOffDuration * Update txturnon and txturnoff duration * update txturnon and txturnoff duration apis
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.
Why/What I did:-
Change 1:
As per review comments on #376
removed DB specific API from selectable class
to keep it generic.
Change 2:
However to access to the Dervied Class Redis Select
DB API's via python we need to downcast the the Selectable Object
to RedisSelect object.
To do this added Helper function in swig .i file Ref: http://www.swig.org/Doc3.0/Python.html
How I verify:
After this change updated client caclmgrd to call new downcast API and verified we are getting correct information.
Sample Client Side code after this change -