-
Notifications
You must be signed in to change notification settings - Fork 274
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
Improve decorator to support profile config. #684
base: master
Are you sure you want to change the base?
Conversation
This PR depends on 3 other PRs merge first to pass build validation:
|
…gin' into dev/liuh/add-decorator
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
std::shared_ptr<DefaultValueProvider> m_defaultValueProvider; | ||
|
||
/* Handle SubscriberStateTable unknown pattern */ | ||
void onPopUnknownPattern(RedisMessage& message, std::deque<KeyOpFieldsValuesTuple> &vkco) override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -26,6 +26,31 @@ class DecoratorTable : public Table | |||
/* Get an entry field-value from the table */ | |||
bool hget(const std::string &key, const std::string &field, std::string &value) override; | |||
|
|||
/* Get all the keys from the table */ | |||
void getKeys(std::vector<std::string> &keys) override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const std::string &op = "", | ||
const std::string &prefix = EMPTY_PREFIX) override; | ||
|
||
/* Unhide override 'set' methods in base class */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -25,6 +25,9 @@ class SubscriberStateTable : public ConsumerTableBase | |||
return !m_buffer.empty(); | |||
} | |||
|
|||
protected: | |||
virtual void onPopUnknownPattern(RedisMessage& message, std::deque<KeyOpFieldsValuesTuple> &vkco); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -245,7 +245,30 @@ class ConfigDBConnector_Native : public SonicV2Connector_Native | |||
def __init__(self, config_db_connector): | |||
self.connector = config_db_connector | |||
self.default_value_provider = DefaultValueProvider() | |||
# helper methods for append default values to result. | |||
# helper methods for append profile and default values to result. | |||
def _append_profile(self, result): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why I did it
Support sonic-swss-common read profile config.
How I did it
Improve decorator to support profile config.
How to verify it
Add new UT to cover new decorate code.
Pass all UT and E2E test cases.
Which release branch to backport (provide reason below if selected)
Description for the changelog
Improve decorator to support profile config.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)