Platform monitor changes in daemon_base for multi_asic (#4932)
Adding namespace support for db connect API.
This commit is contained in:
parent
834a29cb66
commit
394aa5f75f
@ -13,13 +13,16 @@ REDIS_TIMEOUT_MSECS = 0
|
||||
EEPROM_MODULE_NAME = 'eeprom'
|
||||
EEPROM_CLASS_NAME = 'board'
|
||||
|
||||
# The empty namespace refers to linux host namespace.
|
||||
EMPTY_NAMESPACE = ''
|
||||
|
||||
#
|
||||
# Helper functions =============================================================
|
||||
#
|
||||
|
||||
def db_connect(db_name):
|
||||
def db_connect(db_name, namespace=EMPTY_NAMESPACE):
|
||||
from swsscommon import swsscommon
|
||||
return swsscommon.DBConnector(db_name, REDIS_TIMEOUT_MSECS, True)
|
||||
return swsscommon.DBConnector(db_name, REDIS_TIMEOUT_MSECS, True, namespace)
|
||||
|
||||
#
|
||||
# DaemonBase ===================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user