Skip to content

Commit 68e0341

Browse files
authored
Remove LOGLEVEL DB since is no longer used (sonic-net#64)
This PR is part of the following HLD: Persistent loglevel HLD: sonic-net/SONiC#1041 **- What I did** Deleted the LOGLEVEL_DB. After the Logger tables moved from the LOGLEVEL_DB to the CONFIG_DB and the jinja2_cache was deleted the LOGLEVEL_DB is not in use. **- How I did it** Removed the LOGLEVEL_DB from the SONiC code **- How to verify it** All tests were passed
1 parent ec32690 commit 68e0341

File tree

8 files changed

+3
-27
lines changed

8 files changed

+3
-27
lines changed

cvl/cvl.go

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ const (
4343
APPL_DB uint8 = 0 + iota
4444
ASIC_DB
4545
COUNTERS_DB
46-
LOGLEVEL_DB
4746
CONFIG_DB
4847
PFC_WD_DB
4948
FLEX_COUNTER_DB = PFC_WD_DB

tools/test/database_config.json

-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
"separator": ":",
2222
"instance" : "redis"
2323
},
24-
"LOGLEVEL_DB" : {
25-
"id" : 3,
26-
"separator": ":",
27-
"instance" : "redis"
28-
},
2924
"CONFIG_DB" : {
3025
"id" : 4,
3126
"separator": "|",

translib/db/db.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const (
135135
ApplDB DBNum = iota // 0
136136
AsicDB // 1
137137
CountersDB // 2
138-
LogLevelDB // 3
138+
_ // We skip number 3 since the LOGLEVEL_DB that was deprecated
139139
ConfigDB // 4
140140
FlexCounterDB // 5
141141
StateDB // 6
@@ -307,8 +307,6 @@ func getDBInstName (dbNo DBNum) string {
307307
return "ASIC_DB"
308308
case CountersDB:
309309
return "COUNTERS_DB"
310-
case LogLevelDB:
311-
return "LOGLEVEL_DB"
312310
case ConfigDB:
313311
return "CONFIG_DB"
314312
case FlexCounterDB:

translib/db/db_test.go

-5
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,6 @@ var dbConfig = `
7777
"separator": ":",
7878
"instance" : "redis"
7979
},
80-
"LOGLEVEL_DB" : {
81-
"id" : 3,
82-
"separator": ":",
83-
"instance" : "redis"
84-
},
8580
"CONFIG_DB" : {
8681
"id" : 4,
8782
"separator": "|",

translib/transformer/xconst.go

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ const (
4242
REDIS_DB_TYPE_ASIC = "ASIC_DB"
4343
REDIS_DB_TYPE_CONFIG = "CONFIG_DB"
4444
REDIS_DB_TYPE_COUNTER = "COUNTERS_DB"
45-
REDIS_DB_TYPE_LOG_LVL = "LOGLEVEL_DB"
4645
REDIS_DB_TYPE_STATE = "STATE_DB"
4746
REDIS_DB_TYPE_FLX_COUNTER = "FLEX_COUNTER_DB"
4847

translib/transformer/xlate_utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ func getDBOptions(dbNo db.DBNum) db.Options {
532532
switch dbNo {
533533
case db.ApplDB, db.CountersDB:
534534
opt = getDBOptionsWithSeparator(dbNo, "", ":", ":")
535-
case db.FlexCounterDB, db.AsicDB, db.LogLevelDB, db.ConfigDB, db.StateDB, db.ErrorDB, db.UserDB:
535+
case db.FlexCounterDB, db.AsicDB, db.ConfigDB, db.StateDB, db.ErrorDB, db.UserDB:
536536
opt = getDBOptionsWithSeparator(dbNo, "", "|", "|")
537537
}
538538

translib/transformer/xspec.go

-2
Original file line numberDiff line numberDiff line change
@@ -679,8 +679,6 @@ func dbNameToIndex(dbName string) db.DBNum {
679679
dbIndex = db.AsicDB
680680
case "COUNTERS_DB" :
681681
dbIndex = db.CountersDB
682-
case "LOGLEVEL_DB" :
683-
dbIndex = db.LogLevelDB
684682
case "CONFIG_DB" :
685683
dbIndex = db.ConfigDB
686684
case "FLEX_COUNTER_DB" :

translib/translib.go

+1-9
Original file line numberDiff line numberDiff line change
@@ -1051,14 +1051,6 @@ func getAllDbs(isGetCase bool) ([db.MaxDB]*db.DB, error) {
10511051
return dbs, err
10521052
}
10531053

1054-
//Create Log Level DB connection
1055-
dbs[db.LogLevelDB], err = db.NewDB(getDBOptions(db.LogLevelDB, isWriteDisabled))
1056-
1057-
if err != nil {
1058-
closeAllDbs(dbs[:])
1059-
return dbs, err
1060-
}
1061-
10621054
isWriteDisabled = true
10631055

10641056
//Create Config DB connection
@@ -1121,7 +1113,7 @@ func getDBOptions(dbNo db.DBNum, isWriteDisabled bool) db.Options {
11211113
switch dbNo {
11221114
case db.ApplDB, db.CountersDB, db.AsicDB:
11231115
opt = getDBOptionsWithSeparator(dbNo, "", ":", ":", isWriteDisabled)
1124-
case db.FlexCounterDB, db.LogLevelDB, db.ConfigDB, db.StateDB:
1116+
case db.FlexCounterDB, db.ConfigDB, db.StateDB:
11251117
opt = getDBOptionsWithSeparator(dbNo, "", "|", "|", isWriteDisabled)
11261118
}
11271119

0 commit comments

Comments
 (0)