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

swss-common: Changes to support SONiC Gearbox Manager #347

Merged
merged 6 commits into from
Jun 16, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions common/database_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions common/schema.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
19 changes: 11 additions & 8 deletions common/table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down