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

[sonic-package-manager] do not modify config_db.json #76

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions sonic_package_manager/service_creator/sonic_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from sonic_package_manager.service_creator.utils import in_chroot

CONFIG_DB = 'CONFIG_DB'
CONFIG_DB_JSON = os.path.join(ETC_SONIC_PATH, 'config_db.json')
INIT_CFG_JSON = os.path.join(ETC_SONIC_PATH, 'init_cfg.json')


Expand Down Expand Up @@ -99,12 +98,9 @@ def get_connectors(cls):
""" Yields available DBs connectors. """

initial_db_conn = cls.get_initial_db_connector()
persistent_db_conn = cls.get_persistent_db_connector()
running_db_conn = cls.get_running_db_connector()

yield initial_db_conn
if persistent_db_conn is not None:
yield persistent_db_conn
if running_db_conn is not None:
yield running_db_conn

Expand All @@ -127,15 +123,6 @@ def get_running_db_connector(cls):

return cls._running_db_conn

@classmethod
def get_persistent_db_connector(cls):
""" Returns persistent DB connector. """

if not os.path.exists(CONFIG_DB_JSON):
return None

return PersistentConfigDbConnector(CONFIG_DB_JSON)

@classmethod
def get_initial_db_connector(cls):
""" Returns initial DB connector. """
Expand Down
Loading