Skip to content

Commit

Permalink
[vstest]VS test for VOQ System ports (sonic-net#5862)
Browse files Browse the repository at this point in the history
Changes for supporting vstest for VOQ system ports. The changes include:
(1)Use of chassis_db.json is avoided since the SYSTEM_PORT is made
available in virtual chassis linecard's default_config.json which will
be loaded during bootup
(2)Core port index map file is introduced and is copied from virtual chassis
directory to hwsku direcory by start.sh
(3)vs sai profile is modified to include core port index map file name

Signed-off-by: vedganes <[email protected]>
  • Loading branch information
vganesan-nokia authored Dec 2, 2020
1 parent e4ee07b commit 19b592b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 16 deletions.
1 change: 0 additions & 1 deletion platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ COPY ["port_breakout_config_db.json", "/etc/sonic/"]
COPY ["database_config.json", "/etc/default/sonic-db/"]
COPY ["hostname.j2", "/usr/share/sonic/templates/"]
COPY ["default_chassis_cfg.json", "/etc/default/sonic-db/"]
COPY ["chassis_db.py", "/usr/bin/"]

COPY ["platform.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/"]
COPY ["hwsku.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/Force10-S6000/"]
Expand Down
13 changes: 0 additions & 13 deletions platform/vs/docker-sonic-vs/chassis_db.py

This file was deleted.

2 changes: 1 addition & 1 deletion platform/vs/docker-sonic-vs/database_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"instance" : "redis"
},
"CHASSIS_APP_DB" : {
"id" : 11,
"id" : 12,
"separator": "|",
"instance" : "redis_chassis"
}
Expand Down
6 changes: 5 additions & 1 deletion platform/vs/docker-sonic-vs/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ supervisorctl start redis-server
start_chassis_db=`sonic-cfggen -v DEVICE_METADATA.localhost.start_chassis_db -y $chassisdb_cfg_file`
if [[ "$HOSTNAME" == *"supervisor"* ]] || [ "$start_chassis_db" == "1" ]; then
supervisorctl start redis-chassis
python /usr/bin/chassis_db.py
fi

conn_chassis_db=`sonic-cfggen -v DEVICE_METADATA.localhost.connect_to_chassis_db -y $chassisdb_cfg_file`
Expand All @@ -86,6 +85,11 @@ if [ "$start_chassis_db" != "1" ] && [ "$conn_chassis_db" != "1" ]; then
cp $db_cfg_file_tmp $db_cfg_file
fi

if [ "$conn_chassis_db" == "1" ]; then
if [ -f /usr/share/sonic/virtual_chassis/coreportindexmap.ini ]; then
cp /usr/share/sonic/virtual_chassis/coreportindexmap.ini /usr/share/sonic/hwsku/
fi
fi

/usr/bin/configdb-load.sh

Expand Down
1 change: 1 addition & 0 deletions src/sonic-device-data/src/sai.vs_profile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ SAI_WARM_BOOT_WRITE_FILE=/var/cache/sai_warmboot.bin
SAI_VS_SWITCH_TYPE=SAI_VS_SWITCH_TYPE_BCM56850
SAI_VS_HOSTIF_USE_TAP_DEVICE=true
SAI_VS_INTERFACE_LANE_MAP_FILE=/usr/share/sonic/hwsku/lanemap.ini
SAI_VS_CORE_PORT_INDEX_MAP_FILE=/usr/share/sonic/hwsku/coreportindexmap.ini

0 comments on commit 19b592b

Please sign in to comment.