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

Remove LOGLEVEL DB since is no longer used #64

Merged
merged 4 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion cvl/cvl.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const (
APPL_DB uint8 = 0 + iota
ASIC_DB
COUNTERS_DB
LOGLEVEL_DB
CONFIG_DB
PFC_WD_DB
FLEX_COUNTER_DB = PFC_WD_DB
Expand Down
5 changes: 0 additions & 5 deletions tools/test/database_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
"separator": ":",
"instance" : "redis"
},
"LOGLEVEL_DB" : {
"id" : 3,
"separator": ":",
"instance" : "redis"
},
"CONFIG_DB" : {
"id" : 4,
"separator": "|",
Expand Down
4 changes: 1 addition & 3 deletions translib/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const (
ApplDB DBNum = iota // 0
AsicDB // 1
CountersDB // 2
LogLevelDB // 3
_ // We skip number 3 since the LOGLEVEL_DB that was deprecated
ConfigDB // 4
FlexCounterDB // 5
StateDB // 6
Expand Down Expand Up @@ -307,8 +307,6 @@ func getDBInstName (dbNo DBNum) string {
return "ASIC_DB"
case CountersDB:
return "COUNTERS_DB"
case LogLevelDB:
return "LOGLEVEL_DB"
case ConfigDB:
return "CONFIG_DB"
case FlexCounterDB:
Expand Down
5 changes: 0 additions & 5 deletions translib/db/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ var dbConfig = `
"separator": ":",
"instance" : "redis"
},
"LOGLEVEL_DB" : {
"id" : 3,
"separator": ":",
"instance" : "redis"
},
"CONFIG_DB" : {
"id" : 4,
"separator": "|",
Expand Down
1 change: 0 additions & 1 deletion translib/transformer/xconst.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const (
REDIS_DB_TYPE_ASIC = "ASIC_DB"
REDIS_DB_TYPE_CONFIG = "CONFIG_DB"
REDIS_DB_TYPE_COUNTER = "COUNTERS_DB"
REDIS_DB_TYPE_LOG_LVL = "LOGLEVEL_DB"
REDIS_DB_TYPE_STATE = "STATE_DB"
REDIS_DB_TYPE_FLX_COUNTER = "FLEX_COUNTER_DB"

Expand Down
2 changes: 1 addition & 1 deletion translib/transformer/xlate_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ func getDBOptions(dbNo db.DBNum) db.Options {
switch dbNo {
case db.ApplDB, db.CountersDB:
opt = getDBOptionsWithSeparator(dbNo, "", ":", ":")
case db.FlexCounterDB, db.AsicDB, db.LogLevelDB, db.ConfigDB, db.StateDB, db.ErrorDB, db.UserDB:
case db.FlexCounterDB, db.AsicDB, db.ConfigDB, db.StateDB, db.ErrorDB, db.UserDB:
opt = getDBOptionsWithSeparator(dbNo, "", "|", "|")
}

Expand Down
2 changes: 0 additions & 2 deletions translib/transformer/xspec.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,6 @@ func dbNameToIndex(dbName string) db.DBNum {
dbIndex = db.AsicDB
case "COUNTERS_DB" :
dbIndex = db.CountersDB
case "LOGLEVEL_DB" :
dbIndex = db.LogLevelDB
case "CONFIG_DB" :
dbIndex = db.ConfigDB
case "FLEX_COUNTER_DB" :
Expand Down
10 changes: 1 addition & 9 deletions translib/translib.go
Original file line number Diff line number Diff line change
Expand Up @@ -1051,14 +1051,6 @@ func getAllDbs(isGetCase bool) ([db.MaxDB]*db.DB, error) {
return dbs, err
}

//Create Log Level DB connection
dbs[db.LogLevelDB], err = db.NewDB(getDBOptions(db.LogLevelDB, isWriteDisabled))

if err != nil {
closeAllDbs(dbs[:])
return dbs, err
}

isWriteDisabled = true

//Create Config DB connection
Expand Down Expand Up @@ -1121,7 +1113,7 @@ func getDBOptions(dbNo db.DBNum, isWriteDisabled bool) db.Options {
switch dbNo {
case db.ApplDB, db.CountersDB, db.AsicDB:
opt = getDBOptionsWithSeparator(dbNo, "", ":", ":", isWriteDisabled)
case db.FlexCounterDB, db.LogLevelDB, db.ConfigDB, db.StateDB:
case db.FlexCounterDB, db.ConfigDB, db.StateDB:
opt = getDBOptionsWithSeparator(dbNo, "", "|", "|", isWriteDisabled)
}

Expand Down