Skip to content

Commit

Permalink
Added Support for Dell EMC S5212f in SONiC
Browse files Browse the repository at this point in the history
  • Loading branch information
thaj-deen committed Sep 8, 2021
1 parent 6a6b12c commit 8fb6471
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# * PSU


import os
import sys
import logging
import commands
Expand Down Expand Up @@ -79,7 +78,7 @@ def get_switch_details():
if (partno in switch_sku): return switch_sku[partno]
return None

ret_status, ipmi_cmd_ret = commands.getstatusoutput('echo 0 > /sys/module/ipmi_si/parameters/kipmid_max_busy_us')
commands.getstatusoutput('echo 0 > /sys/module/ipmi_si/parameters/kipmid_max_busy_us')
print_temperature_sensors()

# Print the information for 1 Fan Tray
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

try:
import struct
import sys
from os import *
from mmap import *

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ install_python_api_package() {
}

remove_python_api_package() {
rv=$(pip show sonic-platform > /dev/null 2>/dev/null)
rv=$(pip3 show sonic-platform > /dev/null 2>/dev/null)
if [ $? -eq 0 ]; then
rv=$(pip3 uninstall -y sonic-platform > /dev/null 2>/dev/null)
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
try:
import os
import time
import select
import sys
import binascii
from sonic_platform_base.chassis_base import ChassisBase
from sonic_platform.sfp import Sfp
from sonic_platform.eeprom import Eeprom
Expand Down Expand Up @@ -132,7 +130,7 @@ def _get_register(self, reg_file):
try:
with os.fdopen(os.open(reg_file, os.O_RDONLY)) as fd:
retval = fd.read()
except:
except Exception:
pass
retval = retval.rstrip('\r\n')
retval = retval.lstrip(" ")
Expand Down Expand Up @@ -300,7 +298,7 @@ def get_reboot_cause(self):
try:
with open(self.REBOOT_CAUSE_PATH) as fd:
reboot_cause = int(fd.read(), 16)
except:
except Exception:
return (self.REBOOT_CAUSE_NON_HARDWARE, None)

if reboot_cause & 0x1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
########################################################################

try:
import os
import re
import subprocess
from sonic_platform_base.component_base import ComponentBase
import sonic_platform.hwaccess as hwaccess
Expand Down Expand Up @@ -59,8 +57,7 @@ class Component(ComponentBase):
],

['BMC',
'Platform management controller for on-board temperature '
'monitoring, in-chassis power, Fan and LED control',
'Platform management controller for on-board temperature monitoring, in-chassis power, Fan and LED control',
get_bmc_version
],

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
########################################################################

try:
import sys
import struct
import ctypes
import subprocess
import syslog
Expand Down Expand Up @@ -141,8 +139,6 @@ def arm(self, seconds):
self.timeout = seconds
return seconds

return -1

def disarm(self):
"""
Disarm the hardware watchdog
Expand Down

0 comments on commit 8fb6471

Please sign in to comment.