Skip to content

Commit

Permalink
UT logs and sonic-mgmt test results
Browse files Browse the repository at this point in the history
  • Loading branch information
arun1355492 committed Sep 30, 2024
1 parent 2a03d84 commit 08e2c03
Show file tree
Hide file tree
Showing 59 changed files with 3,385 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
{
"i2c":
{
"valmap": { "F2B":"Intake", "B2F":"Exhaust" }
"valmap": { "F2B":"intake", "B2F":"exhaust" }
},
"bmc":
{
"valmap": { "1":"Exhaust", "2":"Intake" }
"valmap": { "1":"exhaust", "2":"intake" }
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
{
"i2c":
{
"valmap": { "F2B":"Intake", "B2F":"Exhaust" }
"valmap": { "F2B":"intake", "B2F":"exhaust" }
},
"bmc":
{
"valmap": { "0":"Exhaust", "1":"Intake" }
"valmap": { "0":"exhaust", "1":"intake" }
}
},

Expand All @@ -46,7 +46,7 @@
{
"bmc":
{
"valmap": {"0":"Exhaust", "1":"Intake"}
"valmap": {"0":"exhaust", "1":"intake"}
}
},
"present":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"num_fantrays":4,
"num_fans_pertray":2,
"num_ports":28,
"num_temps":6,
"num_temps":8,
"pddf_dev_types":
{
"description":"Below is the list of supported PDDF device types (chip names) for various components. If any component uses some other driver, we will create the client using 'echo <dev-address> <dev-type> > <path>/new_device' method",
Expand Down Expand Up @@ -441,7 +441,7 @@

"LOC_LED" :
{
"dev_info": { "device_type":"LED", "device_name":"SYS_LED" },
"dev_info": { "device_type":"LED", "device_name":"LOC_LED" },
"dev_attr": { "index":"0", "flag":"rw" },
"bmc":
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
{
"i2c":
{
"valmap": { "F2B":"Intake", "B2F":"Exhaust" }
"valmap": { "F2B":"intake", "B2F":"exhaust" }
},
"bmc":
{
"valmap": { "0":"Exhaust", "1":"Intake" }
"valmap": { "0":"exhaust", "1":"intake" }
}
},

Expand All @@ -46,7 +46,7 @@
{
"bmc":
{
"valmap": {"0":"Exhaust", "1":"Intake"}
"valmap": {"0":"exhaust", "1":"intake"}
}
},
"present":
Expand Down
18 changes: 9 additions & 9 deletions device/dell/x86_64-dellemc_s5232f_c3538-r0/pddf/pddf-device.json
Original file line number Diff line number Diff line change
Expand Up @@ -472,17 +472,17 @@
"LOC_LED" :
{
"dev_info": { "device_type":"LED", "device_name":"LOC_LED" },
"dev_attr": { "index":"0", "flag":"ro" },
"dev_attr": { "index":"0", "flag":"ro" },
"bmc":
{
"ipmitool" :
{
"attr_list":
[
{ "attr_name":"Off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 7 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 7 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"blinking_blue", "bmc_cmd":"ipmitool raw 0x3A 0x0B 7 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Blinking Blue", "value":"0x01" }
]
}
]
}
}
},
"SYS_LED" :
Expand Down Expand Up @@ -513,7 +513,7 @@
{
"attr_list":
[
{ "attr_name":"Off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 5 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 5 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"amber", "bmc_cmd":"ipmitool raw 0x3A 0x0B 5 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Amber", "value":"0x01" },
{ "attr_name":"green", "bmc_cmd":"ipmitool raw 0x3A 0x0B 5 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Green", "value":"0x02" },
{ "attr_name":"amber_blink", "bmc_cmd":"ipmitool raw 0x3A 0x0B 5 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Blinking Amber", "value":"0x03" }
Expand All @@ -531,7 +531,7 @@
{
"attr_list":
[
{ "attr_name":"Off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 1 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 1 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"amber", "bmc_cmd":"ipmitool raw 0x3A 0x0B 1 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Amber", "value":"0x01" },
{ "attr_name":"green", "bmc_cmd":"ipmitool raw 0x3A 0x0B 1 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Green", "value":"0x02" },
{ "attr_name":"amber_blink", "bmc_cmd":"ipmitool raw 0x3A 0x0B 1 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Blinking Amber", "value":"0x03" }
Expand All @@ -549,7 +549,7 @@
{
"attr_list":
[
{ "attr_name":"Off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 2 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 2 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"amber", "bmc_cmd":"ipmitool raw 0x3A 0x0B 2 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Amber", "value":"0x01" },
{ "attr_name":"green", "bmc_cmd":"ipmitool raw 0x3A 0x0B 2 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Green", "value":"0x02" },
{ "attr_name":"amber_blink", "bmc_cmd":"ipmitool raw 0x3A 0x0B 2 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Blinking Amber", "value":"0x03" }
Expand All @@ -567,7 +567,7 @@
{
"attr_list":
[
{ "attr_name":"Off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 3 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 3 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"amber", "bmc_cmd":"ipmitool raw 0x3A 0x0B 3 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Amber", "value":"0x01" },
{ "attr_name":"green", "bmc_cmd":"ipmitool raw 0x3A 0x0B 3 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Green", "value":"0x02" },
{ "attr_name":"amber_blink", "bmc_cmd":"ipmitool raw 0x3A 0x0B 3 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Blinking Amber", "value":"0x03" }
Expand All @@ -585,7 +585,7 @@
{
"attr_list":
[
{ "attr_name":"Off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 4 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 4 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"amber", "bmc_cmd":"ipmitool raw 0x3A 0x0B 4 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Amber", "value":"0x01" },
{ "attr_name":"green", "bmc_cmd":"ipmitool raw 0x3A 0x0B 4 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Green", "value":"0x02" },
{ "attr_name":"amber_blink", "bmc_cmd":"ipmitool raw 0x3A 0x0B 4 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Blinking Amber", "value":"0x03" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
{
"i2c":
{
"valmap": { "F2B":"Intake", "B2F":"Exhaust" }
"valmap": { "F2B":"intake", "B2F":"exhaust" }
},
"bmc":
{
"valmap": { "0":"Exhaust", "1":"Intake" }
"valmap": { "0":"exhaust", "1":"intake" }
}
},

Expand All @@ -46,7 +46,7 @@
{
"bmc":
{
"valmap": {"0":"Exhaust", "1":"Intake"}
"valmap": {"0":"exhaust", "1":"intake"}
}
},
"present":
Expand Down
12 changes: 6 additions & 6 deletions device/dell/x86_64-dellemc_s5248f_c3538-r0/pddf/pddf-device.json
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@

"LOC_LED" :
{
"dev_info": { "device_type":"LED", "device_name":"SYS_LED" },
"dev_info": { "device_type":"LED", "device_name":"LOC_LED" },
"dev_attr": { "index":"0", "flag":"rw" },
"bmc":
{
Expand Down Expand Up @@ -556,7 +556,7 @@
{
"attr_list":
[
{ "attr_name":"Off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 5 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 5 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"amber", "bmc_cmd":"ipmitool raw 0x3A 0x0B 5 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Amber", "value":"0x01" },
{ "attr_name":"green", "bmc_cmd":"ipmitool raw 0x3A 0x0B 5 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Green", "value":"0x02" },
{ "attr_name":"amber_blink", "bmc_cmd":"ipmitool raw 0x3A 0x0B 5 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Blinking Amber", "value":"0x03" }
Expand All @@ -574,7 +574,7 @@
{
"attr_list":
[
{ "attr_name":"Off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 1 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 1 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"amber", "bmc_cmd":"ipmitool raw 0x3A 0x0B 1 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Amber", "value":"0x01" },
{ "attr_name":"green", "bmc_cmd":"ipmitool raw 0x3A 0x0B 1 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Green", "value":"0x02" },
{ "attr_name":"amber_blink", "bmc_cmd":"ipmitool raw 0x3A 0x0B 1 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Blinking Amber", "value":"0x03" }
Expand All @@ -592,7 +592,7 @@
{
"attr_list":
[
{ "attr_name":"Off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 2 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 2 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"amber", "bmc_cmd":"ipmitool raw 0x3A 0x0B 2 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Amber", "value":"0x01" },
{ "attr_name":"green", "bmc_cmd":"ipmitool raw 0x3A 0x0B 2 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Green", "value":"0x02" },
{ "attr_name":"amber_blink", "bmc_cmd":"ipmitool raw 0x3A 0x0B 2 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Blinking Amber", "value":"0x03" }
Expand All @@ -610,7 +610,7 @@
{
"attr_list":
[
{ "attr_name":"Off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 3 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 3 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"amber", "bmc_cmd":"ipmitool raw 0x3A 0x0B 3 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Amber", "value":"0x01" },
{ "attr_name":"green", "bmc_cmd":"ipmitool raw 0x3A 0x0B 3 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Green", "value":"0x02" },
{ "attr_name":"amber_blink", "bmc_cmd":"ipmitool raw 0x3A 0x0B 3 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Blinking Amber", "value":"0x03" }
Expand All @@ -628,7 +628,7 @@
{
"attr_list":
[
{ "attr_name":"Off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 4 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"off", "bmc_cmd":"ipmitool raw 0x3A 0x0B 4 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Off", "value":"0x00" },
{ "attr_name":"amber", "bmc_cmd":"ipmitool raw 0x3A 0x0B 4 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Amber", "value":"0x01" },
{ "attr_name":"green", "bmc_cmd":"ipmitool raw 0x3A 0x0B 4 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Solid Green", "value":"0x02" },
{ "attr_name":"amber_blink", "bmc_cmd":"ipmitool raw 0x3A 0x0B 4 | awk '{print substr($0,3,1)}'", "raw":"1", "type":"mask", "mask":"0x3", "descr":"Blinking Amber", "value":"0x03" }
Expand Down
12 changes: 6 additions & 6 deletions device/dell/x86_64-dellemc_s5296f_c3538-r0/pddf/pd-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
"psu_fan_dir": {
"i2c": {
"valmap": {
"F2B": "Intake",
"B2F": "Exhaust"
"F2B": "intake",
"B2F": "exhaust"
}
},
"bmc": {
"valmap": {
"0": "Exhaust",
"1": "Intake"
"0": "exhaust",
"1": "intake"
}
}
},
Expand All @@ -48,8 +48,8 @@
"direction": {
"bmc": {
"valmap": {
"0": "Exhaust",
"1": "Intake"
"0": "exhaust",
"1": "intake"
}
}
},
Expand Down
12 changes: 6 additions & 6 deletions device/dell/x86_64-dellemc_s5296f_c3538-r0/pddf/pddf-device.json
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,7 @@
"ipmitool": {
"attr_list": [
{
"attr_name": "Off",
"attr_name": "off",
"bmc_cmd": "ipmitool raw 0x3A 0x0B 7 | awk '{print substr($0,3,1)}'",
"raw": "1",
"type": "mask",
Expand Down Expand Up @@ -1764,7 +1764,7 @@
"ipmitool": {
"attr_list": [
{
"attr_name": "Off",
"attr_name": "off",
"bmc_cmd": "ipmitool raw 0x3A 0x0B 5 | awk '{print substr($0,3,1)}'",
"raw": "1",
"type": "mask",
Expand Down Expand Up @@ -1816,7 +1816,7 @@
"ipmitool": {
"attr_list": [
{
"attr_name": "Off",
"attr_name": "off",
"bmc_cmd": "ipmitool raw 0x3A 0x0B 1 | awk '{print substr($0,3,1)}'",
"raw": "1",
"type": "mask",
Expand Down Expand Up @@ -1868,7 +1868,7 @@
"ipmitool": {
"attr_list": [
{
"attr_name": "Off",
"attr_name": "off",
"bmc_cmd": "ipmitool raw 0x3A 0x0B 2 | awk '{print substr($0,3,1)}'",
"raw": "1",
"type": "mask",
Expand Down Expand Up @@ -1920,7 +1920,7 @@
"ipmitool": {
"attr_list": [
{
"attr_name": "Off",
"attr_name": "off",
"bmc_cmd": "ipmitool raw 0x3A 0x0B 3 | awk '{print substr($0,3,1)}'",
"raw": "1",
"type": "mask",
Expand Down Expand Up @@ -1972,7 +1972,7 @@
"ipmitool": {
"attr_list": [
{
"attr_name": "Off",
"attr_name": "off",
"bmc_cmd": "ipmitool raw 0x3A 0x0B 4 | awk '{print substr($0,3,1)}'",
"raw": "1",
"type": "mask",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# All the derived classes for PDDF
__all__ = ["platform", "chassis", "sfp", "psu", "thermal"]
__all__ = ["platform", "chassis", "component", "sfp", "psu", "thermal", "fan", "fan_drawer"]
from sonic_platform import *
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
import sys
import time
from sonic_platform_pddf_base.pddf_chassis import PddfChassis
from sonic_platform.component import Component
except ImportError as e:
raise ImportError(str(e) + "- required module not found")

REBOOT_CAUSE_PATH = "/host/reboot-cause/platform/reboot_reason"
MAX_S5212F_COMPONENT = 5

class Chassis(PddfChassis):
"""
Expand All @@ -31,6 +33,10 @@ def __init__(self, pddf_data=None, pddf_plugin_data=None):
for index in range(self.PORT_START, self.PORT_END):
present = self.get_sfp(index).get_presence()
self._global_port_pres_dict[index] = '1' if present else '0'

for i in range(MAX_S5212F_COMPONENT):
component = Component(i)
self._component_list.append(component)

# Provide the functions/variables below for which implementation is to be overwritten
def get_sfp(self, index):
Expand Down Expand Up @@ -131,3 +137,41 @@ def get_revision(self):
A string containing the hardware revision for this chassis.
"""
return self._eeprom.revision_str().encode('utf-8').hex()

def get_position_in_parent(self):
"""
Retrieves 1-based relative physical position in parent device.
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 Chassis is replaceable.
Returns:
bool: True if it is replaceable.
"""
return False

def get_eeprom(self):
"""
Retrieves the Sys Eeprom instance for the chassis.
Returns :
The instance of the Sys Eeprom
"""
return self._eeprom

def get_watchdog(self):
"""
Retreives hardware watchdog device on this chassis
Returns:
An object derived from WatchdogBase representing the hardware
watchdog device
"""
if self._watchdog is None:
from sonic_platform.watchdog import Watchdog
self._watchdog = Watchdog()

return self._watchdog
Loading

0 comments on commit 08e2c03

Please sign in to comment.