diff --git a/common/database_config.json b/common/database_config.json index b86ae11bb..b65d0e794 100644 --- a/common/database_config.json +++ b/common/database_config.json @@ -51,6 +51,21 @@ "id" : 7, "separator": "|", "instance" : "redis" + }, + "GB_ASIC_DB" : { + "id" : 8, + "separator": "|", + "instance" : "redis" + }, + "GB_COUNTERS_DB" : { + "id" : 9, + "separator": "|", + "instance" : "redis" + }, + "GB_FLEX_COUNTER_DB" : { + "id" : 10, + "separator": "|", + "instance" : "redis" } }, "VERSION" : "1.0" diff --git a/common/schema.h b/common/schema.h index fde31c72e..7ce14e62e 100644 --- a/common/schema.h +++ b/common/schema.h @@ -14,10 +14,14 @@ namespace swss { #define FLEX_COUNTER_DB 5 #define STATE_DB 6 #define SNMP_OVERLAY_DB 7 +#define GB_ASIC_DB 8 +#define GB_COUNTERS_DB 9 +#define GB_FLEX_COUNTER_DB 10 /***** APPLICATION DATABASE *****/ #define APP_PORT_TABLE_NAME "PORT_TABLE" +#define APP_GEARBOX_TABLE_NAME "GEARBOX_TABLE" #define APP_VLAN_TABLE_NAME "VLAN_TABLE" #define APP_VLAN_MEMBER_TABLE_NAME "VLAN_MEMBER_TABLE" #define APP_LAG_TABLE_NAME "LAG_TABLE" @@ -152,6 +156,8 @@ namespace swss { #define CFG_PORT_TABLE_NAME "PORT" #define CFG_PORT_CABLE_LEN_TABLE_NAME "CABLE_LENGTH" +#define CFG_GEARBOX_TABLE_NAME "GEARBOX" + #define CFG_INTF_TABLE_NAME "INTERFACE" #define CFG_LOOPBACK_INTERFACE_TABLE_NAME "LOOPBACK_INTERFACE" #define CFG_MGMT_INTERFACE_TABLE_NAME "MGMT_INTERFACE" diff --git a/common/table.cpp b/common/table.cpp index b8f5797f9..7f4b11b7e 100644 --- a/common/table.cpp +++ b/common/table.cpp @@ -19,14 +19,17 @@ const std::string TableBase::TABLE_NAME_SEPARATOR_COLON = ":"; const std::string TableBase::TABLE_NAME_SEPARATOR_VBAR = "|"; const TableNameSeparatorMap TableBase::tableNameSeparatorMap = { - { APPL_DB, TABLE_NAME_SEPARATOR_COLON }, - { ASIC_DB, TABLE_NAME_SEPARATOR_COLON }, - { COUNTERS_DB, TABLE_NAME_SEPARATOR_COLON }, - { LOGLEVEL_DB, TABLE_NAME_SEPARATOR_COLON }, - { CONFIG_DB, TABLE_NAME_SEPARATOR_VBAR }, - { PFC_WD_DB, TABLE_NAME_SEPARATOR_COLON }, - { FLEX_COUNTER_DB, TABLE_NAME_SEPARATOR_COLON }, - { STATE_DB, TABLE_NAME_SEPARATOR_VBAR } + { APPL_DB, TABLE_NAME_SEPARATOR_COLON }, + { ASIC_DB, TABLE_NAME_SEPARATOR_COLON }, + { COUNTERS_DB, TABLE_NAME_SEPARATOR_COLON }, + { LOGLEVEL_DB, TABLE_NAME_SEPARATOR_COLON }, + { CONFIG_DB, TABLE_NAME_SEPARATOR_VBAR }, + { PFC_WD_DB, TABLE_NAME_SEPARATOR_COLON }, + { FLEX_COUNTER_DB, TABLE_NAME_SEPARATOR_COLON }, + { STATE_DB, TABLE_NAME_SEPARATOR_VBAR }, + { GB_ASIC_DB, TABLE_NAME_SEPARATOR_VBAR }, + { GB_COUNTERS_DB, TABLE_NAME_SEPARATOR_VBAR }, + { GB_FLEX_COUNTER_DB, TABLE_NAME_SEPARATOR_VBAR } }; Table::Table(const DBConnector *db, const string &tableName)