def readConfigDB(self): ''' Read the config in Config DB. Assign it in self.configdbJsonIn. Parameters: (void) Returns: (void) ''' self.sysLog(doPrint=True, msg='Reading data from Redis configDb') # Read from config DB on sonic switch data = dict() configdb = ConfigDBConnector() configdb.connect() deep_update(data, FormatConverter.db_to_output(configdb.get_config())) self.configdbJsonIn = FormatConverter.to_serialized(data) self.sysLog(syslog.LOG_DEBUG, 'Reading Input from ConfigDB {}'.\ format(self.configdbJsonIn)) return
def read_config_db(cfgdb): data = dict() deep_update(data, FormatConverter.db_to_output(cfgdb.get_config())) return FormatConverter.to_serialized(data)