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

Adding SKU Mellanox-SN3800-D100C12S2 #16

Open
wants to merge 123 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
6367d4c
Adding SKU Mellanox-SN3800-D100C12S2
Jul 13, 2021
0afb348
added buffers dynamic json file
Jul 13, 2021
e013f26
[submodule] Update submodule pointer for swss (#8128)
Junchao-Mellanox Jul 13, 2021
c508a10
[submodule] Update sonic-snmpagent submodule (#7859)
raphaelt-nvidia Jul 13, 2021
f95f8ea
[Mellanox][master][SKU] sonic interface names are aligned to 4 instea…
vivekrnv Jul 14, 2021
f17ca11
[Arista] Update Arista submodules (#8047)
zzhiyuan Jul 14, 2021
ad3f861
[build]: Allow build-time specification of alternative docker registr…
jusherma Jul 14, 2021
2d83004
[AS4630-54PE] Modify util.py to python3 and remove code (#8033)
jostar-yang Jul 14, 2021
e439676
autorestart inside restapi docker is disabled (#8006)
vivekrnv Jul 14, 2021
3da6f12
[port_config] Introduce ad-hoc mport_config.json file (#8066)
Blueve Jul 15, 2021
11c40de
[sonic-platform-daemons] Update submodule (#8165)
DavidZagury Jul 15, 2021
5c0e4b2
[sonic-linux-kernel] submodule update (#8182)
rajkumar38 Jul 15, 2021
d4261a6
Define the Bullseye-based slave container
saiarcot895 Jun 22, 2021
a1fb1de
Update the makefiles to allow using Bullseye slave image
saiarcot895 Jun 30, 2021
24c90ce
Enable sonic-slave-bullseye in Azure pipelines build
saiarcot895 Jul 13, 2021
72947dc
Update XGS and DNX SAI to 5.0.0.4 and additional flags needed in saib…
judyjoseph Jul 15, 2021
b3b6938
[dhcp-relay] make DHCP relay an extension (#6531)
stepanblyschak Jul 15, 2021
c5dff0c
Revert "Revert "[Kubernetes]: The kube server could be used as http-p…
renukamanavalan Jul 16, 2021
604becd
[dhcp_relay] DHCP relay support for IPv6 (#7772)
shlomibitton Jul 16, 2021
62d3c24
[sonic-yang] Backlinks are none when there is 0 backlinks (#8187)
ghooo Jul 16, 2021
2a06e07
[accton]: Support LED (1G) on AS7326-56X (#8185)
chihhan123 Jul 16, 2021
1d81494
[AS7726-32X] Modify util.py to support python3 (#8166)
jostar-yang Jul 16, 2021
e7cec09
Updated SONIC buffer pool settings to accomodate SAI adjustment for A…
vmittal-msft Jul 16, 2021
aca80a6
[submodule]: Advance sonic-swss-common to pick up PBH changes. (#8188)
nazariig Jul 17, 2021
ec624e2
Replace swsssdk.ConfigDBConnector and SonicDBConfig with swsscommon i…
qiluo-msft Jul 17, 2021
4157ea9
[sonic-yang]: format test sonic yang json file (#8200)
lguohan Jul 17, 2021
c89b62e
[sonic-utilities] Update submodule (#8203)
Praveen-Brcm Jul 17, 2021
69ed441
[Mellanox] [master] Added D48C40 SKU for 4600C platform (#8201)
vivekrnv Jul 19, 2021
a328fd2
[WARM-REBOOT] fix issue of watchdog on simx when executing warm-reboo…
tomer-israel Jul 19, 2021
e362cab
[hostcfgd] differentiate between UnitFileState and UnitFilePreset (#8…
stepanblyschak Jul 19, 2021
91ff807
[pbh]: Add YANG model (#7461)
nazariig Jul 19, 2021
3a96eb9
Get Docker proxy info from config (#8205)
renukamanavalan Jul 20, 2021
950c24c
[PMON] [Mellanox] fix syseepromd issue on simx (#8131)
tomer-israel Jul 20, 2021
a31ee03
FRR patches to support IPv6 Link local enhancements. (#5584)
AkhileshSamineni Jul 20, 2021
de43c6a
Added retry to sonic-mgmt docker container (#7997)
slutati1536 Jul 20, 2021
c31c869
[sonic-utilities] Update submodule (#8237)
arlakshm Jul 21, 2021
dec8803
[sonic-platform-common] Update submodule (#8240)
DavidZagury Jul 22, 2021
6448757
[Mellanox] Update SAI to version 1.19.1 (#8245)
dprital Jul 22, 2021
f5d9df0
[sonic-swss-common] Update submodule (#8246)
qiluo-msft Jul 22, 2021
7698747
Update SDK\FW to version 4.4.3222\2008.3224 (#8247)
dprital Jul 23, 2021
4bf873b
[device/celestica]: Fix failed test cases of Haliburton platform API …
Jul 23, 2021
d37361b
[broadcom]: Broadcom SAI update to 5.0.0.6 (#8250)
judyjoseph Jul 23, 2021
5361794
[sonic-cfggen] remove lazy_re workaround due to many optimizations do…
stepanblyschak Jul 24, 2021
545c691
[Arista] Improve 7280CR3 platform configurations (#8234)
Staphylo Jul 24, 2021
f929c3b
[AS7816-64x] Modify util to support python3 (#8253)
jostar-yang Jul 24, 2021
aa59bfe
[PDE]: introduce the SONiC Platform Development Env (#7510)
geans-pin Jul 24, 2021
fed8957
[Accton] AS4630-54TE Support SystemHealthMonitor (#8183)
seanwu-ec Jul 24, 2021
3e7228d
[AS9716-32D]Support multi PSU SN in PDDF (#8214)
jostar-yang Jul 24, 2021
6b32f06
[DellEmc] Fix port lanes for 10G ports on alternative S5232 SKUs (#8208)
bluecmd Jul 24, 2021
2479898
[DellEMC] Buffer profile changes for S5232 and Z9264 (#8170)
aravindmani-1 Jul 24, 2021
a3a7944
[sonic-saidredis]: Advance submodule (#8153)
SuvarnaMeenakshi Jul 24, 2021
24cc827
[as4630-54pe] Modify to read correct psu SN and ID (#5389)
jostar-yang Jul 24, 2021
5e435e0
[Accton/PDDF] Add get_sfp() to chassis to handle port idx (#7980)
jostar-yang Jul 25, 2021
bef5477
[dhcp_relay] Enhance DHCP monitor application to support DHCPv6 (#8060)
shlomibitton Jul 26, 2021
67781ab
[Mellanox][pcied] Ignore bus on pcie.yaml for Mellanox switches (#8063)
DavidZagury Jul 26, 2021
8a48be9
Reduce route selection deferral timer for bgp graceful restart (#7533)
shi-su Jul 26, 2021
d78382b
[voq][minigraph] Add admin_status attribute for inband interface (#8050)
vganesan-nokia Jul 26, 2021
f923172
[multiasic][voq][bgpconf] Fix for the issue of same BGP router id in …
vganesan-nokia Jul 26, 2021
3fd6e8d
[systemd] ASIC status based service bringup on VOQ chassis (#7477)
mprabhu-nokia Jul 28, 2021
25b31e1
[bgpcfgd][voq] Fix for unit test failure in bgp config for voq switch…
vganesan-nokia Jul 29, 2021
b0620ee
[Mellanox] [SKU] Fix the shared headroom for 4600C-C64 SKU (#8242)
vivekrnv Jul 29, 2021
3127a6f
[AS9716-32D] Modify util to support python3 and remove extra code (#8…
jostar-yang Jul 29, 2021
9bf577a
[submodule]: update telemetry submodule (#8282)
abdosi Jul 29, 2021
6ae5e1d
[Arista] Update platform library submodules (#8281)
Staphylo Jul 31, 2021
2b5d3ab
[sonic-utilities] submodule update (#8279)
vdahiya12 Jul 31, 2021
5259af2
[mellanox] remove 2x40G and 4x40G breakout modes due to no hardware s…
alexrallen Aug 1, 2021
93e939b
Update default cable len to 0m for TD2 (#8298)
neethajohn Aug 2, 2021
4d92f94
[advance submodule] Update sonic-swss master head to latest (#8313)
vaibhavhd Aug 3, 2021
4984229
[pmon] create and mount firmware directory on PMON for firmware upgra…
vdahiya12 Aug 3, 2021
4268662
Revert "Update default cable len to 0m for TD2 (#8298)" (#8320)
neethajohn Aug 3, 2021
d26307d
[Mellanox][Pcie] Fix issue on pcied with an id that contains only dec…
DavidZagury Aug 3, 2021
82b6bcf
MCLAG enhacements ICCPd initial code commit (#4819)
Praveen-Brcm Aug 4, 2021
d294807
[baseimage]: add j2cli to sonic_debian_extension.j2 (#8019)
VenkatCisco Aug 4, 2021
0803f7b
[pmon]: add python3-jsonschema pmon (#8018)
VenkatCisco Aug 4, 2021
75afb13
[k8s]: disable http_proxy for docker by default (#8328)
lguohan Aug 4, 2021
e13f524
[build] Always use -j1 for libsnmp to avoid race condition (#8324)
jusherma Aug 4, 2021
6608964
[CI] lengthen time limit for arm platform (#8295)
liushilongbuaa Aug 4, 2021
b4dd416
[sonic-config] Include buffer templates in config dependency list (#8…
neethajohn Aug 4, 2021
08ffa01
[submodule]: Update submodule sonic-utilities (#8311)
renukamanavalan Aug 4, 2021
447f0c6
[pmon]: Enable Autorestart of the daemons in PMON for unexpected exit…
sujinmkang Aug 4, 2021
2bb9f0b
[build]: Fix changelong for systemd-sonic-generator (#8317)
raphaelt-nvidia Aug 4, 2021
81ab2f1
Dell S6100: Monitor serial-getty service (#8304)
aravindmani-1 Aug 4, 2021
e5a6446
[DellEMC] S6100 Reboot cause determining CPU reset in fast-reboot (#8…
santhosh-kt Aug 4, 2021
2fccf06
[gearbox] Add gbsyncd container for Credo gearbox chips (#8144)
byu343 Aug 4, 2021
1bc3fdb
Updating sonic-swss submodule (#8340)
Praveen-Brcm Aug 5, 2021
aa01315
[ARM] Fix issue whre the ping6 tool is missing from orchagent docker …
Blueve Aug 5, 2021
1270da8
[sonic-swss-common] Update submodule (#8344)
qiluo-msft Aug 5, 2021
c37f6ea
Dell Z9332 systems optimized MMU settings for T0/T1 topology (#8341)
vmittal-msft Aug 6, 2021
702e852
Platform/cisco-8000 module for sonic-buildimage (#8172)
VenkatCisco Aug 6, 2021
1fd09bb
[sonic-snmpagent] Update submodule (#8349)
qiluo-msft Aug 6, 2021
dc296bf
DellEMC: Add pcie.yaml for Z9332f (#8329)
ArunSaravananBalachandran Aug 6, 2021
948ba5b
[submodule]: update sonic-utilities (#8348)
bingwang-ms Aug 6, 2021
c4e795f
[sonic-utilities] Submodule update (#8338)
BasimShalata Aug 6, 2021
0cb578d
DellEMC: Z9332f platform API changes (#8258)
aravindmani-1 Aug 6, 2021
302f889
[multi-asic]: remove load_sonic_global_db_config calls (#8173)
arlakshm Aug 6, 2021
9a13200
SONiC Yang model for sFlow feature (#7473)
ArthiSivanantham Aug 6, 2021
9acf074
Revert "Revert "Update default cable len to 0m for TD2"" (#8354)
neethajohn Aug 6, 2021
6283716
[swss][arp_update] Send ipv6 pings over vlan sub interfaces (#8363)
lolyu Aug 7, 2021
0b155c0
[build]: Fix docker pull on armhf platform
lguohan Aug 7, 2021
6b4fe48
[utilities] advance utilities submodule head (#8356)
yxieca Aug 7, 2021
8608af7
caclmgrd: monitor state_db to update dhcp acl (#8222)
Aug 7, 2021
9c29458
[build]: add debug info for dpkg frontend lock (#8375)
lguohan Aug 9, 2021
cf73e22
[build]: add branch and release name in sonic_version.yml (#6356)
lguohan Aug 9, 2021
6234785
test dhcp acl (#8359)
Aug 9, 2021
4e0b275
[openssh]: move build dep installation to sonic-slave-buster (#8381)
lguohan Aug 9, 2021
fa9f8ee
DellEMC: Change PG values for S5232f,Z9264f (#7102)
aravindmani-1 Aug 9, 2021
105ef78
fix (#8393)
Aug 10, 2021
504de9f
Fix TH3 Warm-reboot failure due to Tunnel termination SAI failure (#8…
tjchadaga Aug 10, 2021
ab75260
Reproducible build add docker image debian* to white list. (#8330)
liushilongbuaa Aug 10, 2021
8275f29
[sonic-platform-common] submodule update (#8396)
vdahiya12 Aug 10, 2021
fff1756
[openssh]: add build dep installation to sonic-slave-bullseye
lguohan Aug 10, 2021
76d5223
[hostcfgd] Delay hostcfgd and aaastatsd for faster boot time (#7965)
shlomibitton Aug 10, 2021
abc998a
[build]: Update the make cache mode for opennsl-module-dnx (#8391)
judyjoseph Aug 10, 2021
14da7a1
[sonic_debian_extension.j2] export DOCKER_HOST so that clients can us…
stepanblyschak Aug 10, 2021
d6433d1
[reboot-cause] Fixed determine-reboot-cause.service failure. (#8210)
rajkumar38 Aug 10, 2021
8e903f4
BRCM Disable ACL Drop counted towards interface RX_DRP counters (#8382)
gechiang Aug 11, 2021
25416b2
DellEMC: S5232F support for show system-health command (#8334)
arunlk-dell Aug 11, 2021
ffaa0f8
[Nokia ixs7215] Watchdog timer support (#8377)
dflynn-Nokia Aug 11, 2021
ba7e50a
[build]: Enable the cache build for the platform ragile and ruijie. (…
sujinmkang Aug 11, 2021
7432e47
[sonic-device-data]: add port_type to OPTIONAL_PORT_ATTRIBUTES (#8370)
carl-nokia Aug 11, 2021
a53f01d
Updated PGHeadroom settings for 400G speed (DellEMC-Z9332f-M-O16C64 &…
vmittal-msft Aug 11, 2021
e01795c
resolved merge conflicts
Aug 11, 2021
536d6cb
resolved platform.json parsing error
Aug 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .azure-pipelines/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

- name: centec-arm64
pool: sonicbld_8c
timeoutInMinutes: 2160
timeoutInMinutes: 2880
variables:
PLATFORM_ARCH: arm64

Expand All @@ -79,7 +79,7 @@ jobs:

- name: marvell-armhf
pool: sonicbld_8c
timeoutInMinutes: 2160
timeoutInMinutes: 2880
variables:
PLATFORM_ARCH: armhf

Expand Down
2 changes: 2 additions & 0 deletions .azure-pipelines/docker-sonic-slave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pr:
- sonic-slave-jessie
- sonic-slave-stretch
- sonic-slave-buster
- sonic-slave-bullseye

parameters:
- name: 'arches'
Expand All @@ -33,6 +34,7 @@ parameters:
- name: 'dists'
type: object
default:
- bullseye
- buster
- stretch
- jessie
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ platform/broadcom/sonic-platform-modules-dell/s6100/modules/dell_s6100_lpc.c
platform/broadcom/sonic-platform-modules-dell/z9100/modules/dell_ich.c
platform/broadcom/sonic-platform-modules-dell/z9100/modules/dell_mailbox.c
platform/broadcom/sonic-platform-modules-dell/z9264f/sonic_platform/ipmihelper.py
platform/cisco-8000

# buildinfo
files/build/buildinfo
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
[submodule "src/sonic-platform-daemons"]
path = src/sonic-platform-daemons
url = https://github.com/Azure/sonic-platform-daemons
[submodule "src/sonic-platform-pde"]
path = src/sonic-platform-pde
url = https://github.com/Azure/sonic-platform-pdk-pde
[submodule "src/sonic-frr/frr"]
path = src/sonic-frr/frr
url = https://github.com/Azure/sonic-frr.git
Expand Down
63 changes: 55 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

NOJESSIE ?= 1
NOSTRETCH ?= 0
NOBUSTER ?= 0
NOBULLSEYE ?= 1

ifeq ($(NOJESSIE),0)
BUILD_JESSIE=1
endif

ifeq ($(NOSTRETCH),0)
BUILD_STRETCH=1
endif

ifeq ($(NOBUSTER),0)
BUILD_BUSTER=1
endif

ifeq ($(NOBULLSEYE),0)
BUILD_BULLSEYE=1
endif

PLATFORM_PATH := platform/$(if $(PLATFORM),$(PLATFORM),$(CONFIGURED_PLATFORM))
PLATFORM_CHECKOUT := platform/checkout
PLATFORM_CHECKOUT_FILE := $(PLATFORM_CHECKOUT)/$(PLATFORM).ini
PLATFORM_CHECKOUT_CMD := $(shell if [ -f $(PLATFORM_CHECKOUT_FILE) ]; then PLATFORM_PATH=$(PLATFORM_PATH) j2 $(PLATFORM_CHECKOUT)/template.j2 $(PLATFORM_CHECKOUT_FILE); fi)

%::
@echo "+++ --- Making $@ --- +++"
Expand All @@ -11,7 +34,12 @@ endif
ifeq ($(NOSTRETCH), 0)
EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=stretch make -f Makefile.work stretch
endif
ifeq ($(NOBUSTER), 0)
BLDENV=buster make -f Makefile.work $@
endif
ifeq ($(NOBULLSEYE), 0)
BLDENV=bullseye make -f Makefile.work $@
endif

jessie:
@echo "+++ Making $@ +++"
Expand All @@ -25,19 +53,38 @@ ifeq ($(NOSTRETCH), 0)
make -f Makefile.work stretch
endif

buster:
@echo "+++ Making $@ +++"
ifeq ($(NOBUSTER), 0)
make -f Makefile.work buster
endif

init:
@echo "+++ Making $@ +++"
make -f Makefile.work $@

clean configure reset showtag sonic-slave-build sonic-slave-bash :
#
# Function to invoke target $@ in Makefile.work with proper BLDENV
#
define make_work
@echo "+++ Making $@ +++"
ifeq ($(NOJESSIE), 0)
make -f Makefile.work $@
endif
ifeq ($(NOSTRETCH), 0)
BLDENV=stretch make -f Makefile.work $@
endif
BLDENV=buster make -f Makefile.work $@
$(if $(BUILD_JESSIE),make -f Makefile.work $@,)
$(if $(BUILD_STRETCH),BLDENV=stretch make -f Makefile.work $@,)
$(if $(BUILD_BUSTER),BLDENV=buster make -f Makefile.work $@,)
$(if $(BUILD_BULLSEYE),BLDENV=bullseye make -f Makefile.work $@,)
endef

.PHONY: $(PLATFORM_PATH)

$(PLATFORM_PATH):
@echo "+++ Cheking $@ +++"
$(PLATFORM_CHECKOUT_CMD)

configure : $(PLATFORM_PATH)
$(call make_work, $@)

clean reset showtag sonic-slave-build sonic-slave-bash :
$(call make_work, $@)

# Freeze the versions, see more detail options: scripts/versions_manager.py freeze -h
freeze:
Expand Down
6 changes: 5 additions & 1 deletion Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ ifeq ($(PLATFORM_ARCH),)
override PLATFORM_ARCH = $(CONFIGURED_ARCH)
endif

ifeq ($(BLDENV), buster)
ifeq ($(BLDENV), bullseye)
SLAVE_DIR = sonic-slave-bullseye
else ifeq ($(BLDENV), buster)
SLAVE_DIR = sonic-slave-buster
else ifeq ($(BLDENV), stretch)
SLAVE_DIR = sonic-slave-stretch
Expand Down Expand Up @@ -247,6 +249,7 @@ SONIC_BUILD_INSTRUCTION := make \
SONIC_IMAGE_VERSION=$(SONIC_IMAGE_VERSION) \
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \
ENABLE_ZTP=$(ENABLE_ZTP) \
INCLUDE_PDE=$(INCLUDE_PDE) \
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \
INCLUDE_KUBERNETES=$(INCLUDE_KUBERNETES) \
KUBERNETES_VERSION=$(KUBERNETES_VERSION) \
Expand All @@ -268,6 +271,7 @@ SONIC_BUILD_INSTRUCTION := make \
HTTPS_PROXY=$(https_proxy) \
NO_PROXY=$(no_proxy) \
SONIC_INCLUDE_SYSTEM_TELEMETRY=$(INCLUDE_SYSTEM_TELEMETRY) \
INCLUDE_DHCP_RELAY=$(INCLUDE_DHCP_RELAY) \
SONIC_INCLUDE_RESTAPI=$(INCLUDE_RESTAPI) \
TELEMETRY_WRITABLE=$(TELEMETRY_WRITABLE) \
EXTRA_DOCKER_TARGETS=$(EXTRA_DOCKER_TARGETS) \
Expand Down
6 changes: 5 additions & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ then
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install kubelet=${KUBERNETES_VERSION}-00
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install kubectl=${KUBERNETES_VERSION}-00
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install kubeadm=${KUBERNETES_VERSION}-00
# kubeadm package auto install kubelet & kubectl
else
echo '[INFO] Skipping Install kubernetes'
fi
Expand Down Expand Up @@ -473,11 +472,16 @@ fi

## Version file
sudo mkdir -p $FILESYSTEM_ROOT/etc/sonic
if [ -f files/image_config/sonic_release ]; then
sudo cp files/image_config/sonic_release $FILESYSTEM_ROOT/etc/sonic/
fi
export build_version="${SONIC_IMAGE_VERSION}"
export debian_version="$(cat $FILESYSTEM_ROOT/etc/debian_version)"
export kernel_version="${kversion}"
export asic_type="${sonic_asic_platform}"
export commit_id="$(git rev-parse --short HEAD)"
export branch="$(git rev-parse --abbrev-ref HEAD)"
export release="$(if [ -f $FILESYSTEM_ROOT/etc/sonic/sonic_release ]; then cat $FILESYSTEM_ROOT/etc/sonic/sonic_release; fi)"
export build_date="$(date -u)"
export build_number="${BUILD_NUMBER:-0}"
export built_by="$USER@$BUILD_HOSTNAME"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"skip_ledd": true,
"skip_thermalctld": true
"skip_pcied": true
}

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__all__ = ['chassis', 'eeprom', 'platform', 'psu', 'sfp', 'thermal', 'fan']
__all__ = [ "platform", "chassis", "sfp", "eeprom", "component", "psu", "thermal", "fan", "fan_drawer" ]
from . import platform
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
REBOOT_CAUSE_FILE = "reboot-cause.txt"
PREV_REBOOT_CAUSE_FILE = "previous-reboot-cause.txt"
HOST_CHK_CMD = "docker > /dev/null 2>&1"
SYSLED_FNODE = "/sys/class/leds/diag/brightness"
SYSLED_MODES = {
"0" : "STATUS_LED_COLOR_OFF",
"1" : "STATUS_LED_COLOR_GREEN",
"2" : "STATUS_LED_COLOR_AMBER",
"5" : "STATUS_LED_COLOR_GREEN_BLINK"
}


class Chassis(ChassisBase):
Expand Down Expand Up @@ -55,12 +62,11 @@ def __initialize_sfp(self):
self.sfp_module_initialized = True

def __initialize_fan(self):
from sonic_platform.fan import Fan
for fant_index in range(0, NUM_FAN_TRAY):
for fan_index in range(0, NUM_FAN):
fan = Fan(fant_index, fan_index)
self._fan_list.append(fan)

from sonic_platform.fan_drawer import FanDrawer
for fant_index in range(NUM_FAN_TRAY):
fandrawer = FanDrawer(fant_index)
self._fan_drawer_list.append(fandrawer)
self._fan_list.extend(fandrawer._fan_list)
def __initialize_psu(self):
from sonic_platform.psu import Psu
for index in range(0, NUM_PSU):
Expand Down Expand Up @@ -192,3 +198,39 @@ def get_sfp(self, index):
sys.stderr.write("SFP index {} out of range (1-{})\n".format(
index, len(self._sfp_list)))
return sfp

def get_position_in_parent(self):
"""
Retrieves 1-based relative physical position in parent device. If the agent cannot determine the parent-relative position
for some reason, or if the associated value of entPhysicalContainedIn is '0', then the value '-1' is returned
Returns:
integer: The 1-based relative physical position in parent device or -1 if cannot determine the position
"""
return -1

def is_replaceable(self):
"""
Indicate whether this device is replaceable.
Returns:
bool: True if it is replaceable.
"""
return False


def initizalize_system_led(self):
return True

def get_status_led(self):
val = self._api_helper.read_txt_file(SYSLED_FNODE)
return SYSLED_MODES[val] if val in SYSLED_MODES else "UNKNOWN"

def set_status_led(self, color):
mode = None
for key, val in SYSLED_MODES.items():
if val == color:
mode = key
break
if mode is None:
return False
else:
return self._api_helper.write_txt_file(SYSLED_FNODE, mode)
Loading