Add psu_fan target speed
This commit is contained in:
parent
bc460f6e62
commit
dbe07a3989
@ -178,7 +178,7 @@
|
||||
"name": "MB_RearMAC_temp(0x48)"
|
||||
},
|
||||
{
|
||||
"name": "CPU Temp"
|
||||
"name": "coretemp-isa-0000"
|
||||
}
|
||||
],
|
||||
"sfps": [
|
||||
|
@ -3,9 +3,7 @@
|
||||
"devices_to_ignore": [
|
||||
"asic",
|
||||
"psu.voltage",
|
||||
"psu.temperature",
|
||||
"PSU-1 FAN-1.speed",
|
||||
"PSU-2 FAN-1.speed"
|
||||
"psu.temperature"
|
||||
],
|
||||
"user_defined_checkers": [],
|
||||
"polling_interval": 60,
|
||||
|
@ -85,7 +85,7 @@ class Chassis(PddfChassis):
|
||||
sys.stderr.write("SFP index {} out of range (1-{})\n".format(
|
||||
index, len(self._sfp_list)))
|
||||
return sfp
|
||||
|
||||
|
||||
def initizalize_system_led(self):
|
||||
return
|
||||
|
||||
@ -101,3 +101,32 @@ class Chassis(PddfChassis):
|
||||
return SfpBase.SFP_PORT_TYPE_BIT_QSFP | SfpBase.SFP_PORT_TYPE_BIT_QSFP_PLUS | SfpBase.SFP_PORT_TYPE_BIT_QSFP28
|
||||
else:
|
||||
return SfpBase.SFP_PORT_TYPE_BIT_SFP | SfpBase.SFP_PORT_TYPE_BIT_SFP_PLUS
|
||||
|
||||
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 get_revision(self):
|
||||
"""
|
||||
Retrieves the hardware revision of the device
|
||||
|
||||
Returns:
|
||||
string: Revision value of device
|
||||
"""
|
||||
return 'N/A'
|
@ -50,3 +50,16 @@ class Fan(PddfFan):
|
||||
string: Serial number of device
|
||||
"""
|
||||
return "N/A"
|
||||
|
||||
def get_target_speed(self):
|
||||
"""
|
||||
Retrieves the target (expected) speed of the fan
|
||||
|
||||
Returns:
|
||||
An integer, the percentage of full fan speed, in the range 0 (off)
|
||||
to 100 (full speed)
|
||||
"""
|
||||
if self.is_psu_fan:
|
||||
return super().get_speed()
|
||||
else:
|
||||
return super().get_target_speed()
|
||||
|
Reference in New Issue
Block a user