diff --git a/sonic-ledd/scripts/ledd b/sonic-ledd/scripts/ledd index d69f59a26..6cf9775b1 100644 --- a/sonic-ledd/scripts/ledd +++ b/sonic-ledd/scripts/ledd @@ -76,7 +76,7 @@ class DaemonLedd(DaemonBase): sys.exit(LEDUTIL_LOAD_ERROR) # Open a handle to the Application database - appl_db = daemon_base.db_connect(swsscommon.APPL_DB) + appl_db = daemon_base.db_connect("APPL_DB") # Subscribe to PORT table notifications in the Application DB sel = swsscommon.Select() diff --git a/sonic-psud/scripts/psud b/sonic-psud/scripts/psud index bf74afc01..80393bfc6 100644 --- a/sonic-psud/scripts/psud +++ b/sonic-psud/scripts/psud @@ -235,7 +235,7 @@ class DaemonPsud(DaemonBase): sys.exit(PSUUTIL_LOAD_ERROR) # Connect to STATE_DB and create psu/chassis info tables - state_db = daemon_base.db_connect(swsscommon.STATE_DB) + state_db = daemon_base.db_connect("STATE_DB") chassis_tbl = swsscommon.Table(state_db, CHASSIS_INFO_TABLE) psu_tbl = swsscommon.Table(state_db, PSU_INFO_TABLE) diff --git a/sonic-syseepromd/scripts/syseepromd b/sonic-syseepromd/scripts/syseepromd index ba419d3ba..a2d373f5a 100644 --- a/sonic-syseepromd/scripts/syseepromd +++ b/sonic-syseepromd/scripts/syseepromd @@ -44,7 +44,7 @@ class DaemonSyseeprom(DaemonBase): self.stop_event = threading.Event() self.eeprom = None - state_db = daemon_base.db_connect(swsscommon.STATE_DB) + state_db = daemon_base.db_connect("STATE_DB") self.eeprom_tbl = swsscommon.Table(state_db, EEPROM_TABLE_NAME) self.eepromtbl_keys = [] diff --git a/sonic-thermalctld/scripts/thermalctld b/sonic-thermalctld/scripts/thermalctld index 19990af0f..411a97b2b 100644 --- a/sonic-thermalctld/scripts/thermalctld +++ b/sonic-thermalctld/scripts/thermalctld @@ -197,7 +197,7 @@ class FanUpdater(object): """ self.chassis = chassis self.fan_status_dict = {} - state_db = daemon_base.db_connect(swsscommon.STATE_DB) + state_db = daemon_base.db_connect("STATE_DB") self.table = swsscommon.Table(state_db, FanUpdater.FAN_INFO_TABLE_NAME) def deinit(self): @@ -458,7 +458,7 @@ class TemperatureUpdater(object): """ self.chassis = chassis self.temperature_status_dict = {} - state_db = daemon_base.db_connect(swsscommon.STATE_DB) + state_db = daemon_base.db_connect("STATE_DB") self.table = swsscommon.Table(state_db, TemperatureUpdater.TEMPER_INFO_TABLE_NAME) def deinit(self): diff --git a/sonic-xcvrd/scripts/xcvrd b/sonic-xcvrd/scripts/xcvrd index 7a06a6cbf..2ec03af08 100644 --- a/sonic-xcvrd/scripts/xcvrd +++ b/sonic-xcvrd/scripts/xcvrd @@ -381,11 +381,11 @@ def post_port_dom_info_to_db(logical_port_name, table, stop_event=threading.Even def post_port_sfp_dom_info_to_db(is_warm_start, stop_event=threading.Event()): # Connect to STATE_DB and create transceiver dom/sfp info tables transceiver_dict = {} - state_db = daemon_base.db_connect(swsscommon.STATE_DB) + state_db = daemon_base.db_connect("STATE_DB") int_tbl = swsscommon.Table(state_db, TRANSCEIVER_INFO_TABLE) dom_tbl = swsscommon.Table(state_db, TRANSCEIVER_DOM_SENSOR_TABLE) - appl_db = daemon_base.db_connect(swsscommon.APPL_DB) + appl_db = daemon_base.db_connect("APPL_DB") app_port_tbl = swsscommon.ProducerStateTable(appl_db, swsscommon.APP_PORT_TABLE_NAME) @@ -678,7 +678,7 @@ def detect_port_in_error_status(logical_port_name, status_tbl): # Init TRANSCEIVER_STATUS table def init_port_sfp_status_tbl(stop_event=threading.Event()): # Connect to STATE_DB and create transceiver status table - state_db = daemon_base.db_connect(swsscommon.STATE_DB) + state_db = daemon_base.db_connect("STATE_DB") status_tbl = swsscommon.Table(state_db, TRANSCEIVER_STATUS_TABLE) # Init TRANSCEIVER_STATUS table @@ -715,7 +715,7 @@ class dom_info_update_task: logger.log_info("Start DOM monitoring loop") # Connect to STATE_DB and create transceiver dom info table - state_db = daemon_base.db_connect(swsscommon.STATE_DB) + state_db = daemon_base.db_connect("STATE_DB") dom_tbl = swsscommon.Table(state_db, TRANSCEIVER_DOM_SENSOR_TABLE) status_tbl = swsscommon.Table(state_db, TRANSCEIVER_STATUS_TABLE) @@ -775,13 +775,13 @@ class sfp_state_update_task: transceiver_dict = {} # Connect to STATE_DB and create transceiver dom/sfp info tables - state_db = daemon_base.db_connect(swsscommon.STATE_DB) + state_db = daemon_base.db_connect("STATE_DB") int_tbl = swsscommon.Table(state_db, TRANSCEIVER_INFO_TABLE) dom_tbl = swsscommon.Table(state_db, TRANSCEIVER_DOM_SENSOR_TABLE) status_tbl = swsscommon.Table(state_db, TRANSCEIVER_STATUS_TABLE) # Connect to APPL_DB to notify Media notifications - appl_db = daemon_base.db_connect(swsscommon.APPL_DB) + appl_db = daemon_base.db_connect("APPL_DB") app_port_tbl = swsscommon.ProducerStateTable(appl_db, swsscommon.APP_PORT_TABLE_NAME) @@ -1017,7 +1017,7 @@ class DaemonXcvrd(DaemonBase): # Wait for port config is done def wait_for_port_config_done(self): # Connect to APPL_DB and subscribe to PORT table notifications - appl_db = daemon_base.db_connect(swsscommon.APPL_DB) + appl_db = daemon_base.db_connect("APPL_DB") sel = swsscommon.Select() sst = swsscommon.SubscriberStateTable(appl_db, swsscommon.APP_PORT_TABLE_NAME) @@ -1089,7 +1089,7 @@ class DaemonXcvrd(DaemonBase): sys.exit(PORT_CONFIG_LOAD_ERROR) # Connect to STATE_DB and create transceiver dom/sfp info tables - state_db = daemon_base.db_connect(swsscommon.STATE_DB) + state_db = daemon_base.db_connect("STATE_DB") self.int_tbl = swsscommon.Table(state_db, TRANSCEIVER_INFO_TABLE) self.dom_tbl = swsscommon.Table(state_db, TRANSCEIVER_DOM_SENSOR_TABLE) self.status_tbl = swsscommon.Table(state_db, TRANSCEIVER_STATUS_TABLE)