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

Support for Mellanox-SN2700 based SKU for docker-sonic-vs #15

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ COPY ["buffermgrd.sh", "/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/"]
COPY ["hwsku.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/"]
COPY ["hwsku.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/Mellanox-SN2700/"]

# Workaround the tcpdump issue
RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump
Expand Down
11 changes: 8 additions & 3 deletions platform/vs/docker-sonic-vs/orchagent.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#!/usr/bin/env bash

if [[ -z "$fake_platform" ]]; then
export platform=vs
else
#This is required since we have platform based checks in orchagent
#fakeplatform to be removed once swss migrates to hw-sku

if [ "$HWSKU" == "Mellanox-SN2700" ]; then
export platform="mellanox"
elif [ -n "$fake_platform" ]; then
export platform=$fake_platform
else
export platform=vs
fi

SWSS_VARS_FILE=/usr/share/sonic/templates/swss_vars.j2
Expand Down
5 changes: 5 additions & 0 deletions platform/vs/docker-sonic-vs/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ else
fi
sonic-cfggen -t /usr/share/sonic/templates/copp_cfg.j2 > /etc/sonic/copp_cfg.json

#To be removed once swss migrates to HWSKU
if [ "$fake_platform" == "mellanox" ]; then
cp /usr/share/sonic/hwsku/sai_mlnx.profile /usr/share/sonic/hwsku/sai.profile
fi

if [ "$HWSKU" == "Mellanox-SN2700" ]; then
cp /usr/share/sonic/hwsku/sai_mlnx.profile /usr/share/sonic/hwsku/sai.profile
fi

mkdir -p /etc/swss/config.d/

rm -f /var/run/rsyslogd.pid
Expand Down