Skip to content
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

CVL Changes #3: Multi-db instance support #20

Merged
merged 6 commits into from
Sep 30, 2020

Conversation

dutta-partha
Copy link
Contributor

Adding multi-db instance support based on db config file.
So, now instead of hardcoded DB endpoint, it is read from a configuration file.

//In absence of the file, it uses default config for CONFIG_DB
//so that CVL UT will pass in development environment.
func dbCfgInit() {
defaultDBConfig := `{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use sonic_db_config/db_config.go ?

We could move that to here and update as needed. So we can have all the APIs that parse and use this file, in one place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought of so, but wanted keep CVL as independent of telemetry package.

Are you suggesting to import "sonic-telemetry/dbconfig" in this file and create a wrapper layer for any additional logic ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to keep the common stuff in one place, so everyone shares the updated code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renuka, we cannot do that as telemetry code today is dependent on mgmt-common and CVL resides inside the mgmt-common. We need to do the other way around all the telemetry DB access stuff move to mgmt-common to make everything reside in a common place.

@renukamanavalan renukamanavalan merged commit 904ce18 into sonic-net:master Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants