mirror of
https://opendev.org/x/pyghmi
synced 2026-05-01 14:07:46 +00:00
Support led for ts460
https: //gitlab.icelab.lenovo.com/pygcon/pyghmi/commit/e7f254a39c6396b41a54c48cf6467ce9a6631d5a to fix defect 67045, add led info for ts460 in v121 Change-Id: Ie7212a8a53f216d932ecf14b9d41b37eba314f9b
This commit is contained in:
@@ -132,6 +132,15 @@ asrock_leds = {
|
||||
"LED_FAN_FAULT_3": 0x04
|
||||
}
|
||||
|
||||
ts460_leds = {
|
||||
"SYSTEM_EVENT": 0x00,
|
||||
"BMC_UID": 0x01,
|
||||
"LED_FAN_FAULT_1": 0x02,
|
||||
"LED_FAN_FAULT_2": 0x03,
|
||||
"LED_FAN_CPU": 0x04,
|
||||
"LED_FAN_REAR": 0x05
|
||||
}
|
||||
|
||||
asrock_led_status = {
|
||||
0x00: "Off",
|
||||
0x01: "On"
|
||||
@@ -441,6 +450,12 @@ class OEMHandler(generic.OEMHandler):
|
||||
return True
|
||||
return False
|
||||
|
||||
@property
|
||||
def isTS460(self):
|
||||
if self.oemid['product_id'] == 1184:
|
||||
return True
|
||||
return False
|
||||
|
||||
def get_oem_inventory_descriptions(self):
|
||||
if self.has_tsm or self.has_asrock:
|
||||
# Thinkserver with TSM
|
||||
@@ -602,7 +617,11 @@ class OEMHandler(generic.OEMHandler):
|
||||
asrock = self.has_asrock
|
||||
if asrock:
|
||||
cmd = 0x50
|
||||
led_set = asrock_leds
|
||||
# because rs160 has different led info with ts460
|
||||
if self.isTS460:
|
||||
led_set = ts460_leds
|
||||
else:
|
||||
led_set = asrock_leds
|
||||
led_set_status = asrock_led_status
|
||||
|
||||
for (name, id_) in led_set.items():
|
||||
|
||||
Reference in New Issue
Block a user