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

Implementation of System ports initialization, Interface & Neighbor Synchronization... #380

Merged
merged 12 commits into from
Oct 28, 2020
10 changes: 10 additions & 0 deletions common/database_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"hostname" : "127.0.0.1",
"port" : 6379,
"unix_socket_path" : "/var/run/redis/redis.sock"
},
"redis_chassis":{
"hostname" : "redis_chassis.server"
"port" : 6380,
"unix_socket_path" : "/var/run/redis/redis_chassis.sock"
Copy link
Contributor

@qiluo-msft qiluo-msft Aug 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move chassis specific configuration out of the default database_config.json. The file here is to maintain backward-compatibility to before multi-DB feature and minimal configuration for any sonic system.

For example, this file does not work with sonic-utilities.

If your use case need customization, just customize it and overwrite it in your use case only. Do not break others.

}
},
"DATABASES" : {
Expand Down Expand Up @@ -71,6 +76,11 @@
"id" : 11,
"separator": "|",
"instance" : "redis"
},
"CHASSIS_APP_DB" : {
"id" : 12,
"separator": "|",
"instance" : "redis_chassis"
}
},
"VERSION" : "1.0"
Expand Down
11 changes: 11 additions & 0 deletions common/schema.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace swss {
#define GB_ASIC_DB 9
#define GB_COUNTERS_DB 10
#define GB_FLEX_COUNTER_DB 11
#define CHASSIS_APP_DB 12

/***** APPLICATION DATABASE *****/

Expand Down Expand Up @@ -72,6 +73,8 @@ namespace swss {
#define APP_STP_FASTAGEING_FLUSH_TABLE_NAME "STP_FASTAGEING_FLUSH_TABLE"
#define APP_STP_BPDU_GUARD_TABLE_NAME "STP_BPDU_GUARD_TABLE"

#define APP_SYSTEM_PORT_TABLE_NAME "SYSTEM_PORT_TABLE"

/***** TO BE REMOVED *****/

#define APP_TC_TO_QUEUE_MAP_TABLE_NAME "TC_TO_QUEUE_MAP_TABLE"
Expand Down Expand Up @@ -268,6 +271,12 @@ namespace swss {
#define CFG_FG_NHG_PREFIX "FG_NHG_PREFIX"
#define CFG_FG_NHG_MEMBER "FG_NHG_MEMBER"

#define CFG_SYSTEM_PORT_TABLE_NAME "SYSTEM_PORT"
#define CFG_VOQ_INBAND_INTERFACE_TABLE_NAME "VOQ_INBAND_INTERFACE"

#define CHASSIS_APP_SYSTEM_INTERFACE_TABLE_NAME "SYSTEM_INTERFACE"
#define CHASSIS_APP_SYSTEM_NEIGH_TABLE_NAME "SYSTEM_NEIGH"

/***** STATE DATABASE *****/

#define STATE_SWITCH_CAPABILITY_TABLE_NAME "SWITCH_CAPABILITY_TABLE"
Expand Down Expand Up @@ -296,6 +305,8 @@ namespace swss {
#define STATE_COPP_GROUP_TABLE_NAME "COPP_GROUP_TABLE"
#define STATE_COPP_TRAP_TABLE_NAME "COPP_TRAP_TABLE"
#define STATE_FG_ROUTE_TABLE_NAME "FG_ROUTE_TABLE"

#define STATE_SYSTEM_NEIGH_TABLE_NAME "SYSTEM_NEIGH_TABLE"
/***** MISC *****/

#define IPV4_NAME "IPv4"
Expand Down
3 changes: 2 additions & 1 deletion common/table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ const TableNameSeparatorMap TableBase::tableNameSeparatorMap = {
{ RESTAPI_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 }
{ GB_FLEX_COUNTER_DB, TABLE_NAME_SEPARATOR_VBAR },
{ CHASSIS_APP_DB, TABLE_NAME_SEPARATOR_VBAR }
};

Table::Table(const DBConnector *db, const string &tableName)
Expand Down