Skip to content

Commit

Permalink
[201911] DellEMC: Skip thermalctld and thermal platform API changes (#…
Browse files Browse the repository at this point in the history
…4752)

**- Why I did it**

- Skip thermalctld in DellEMC S6000, S6100, Z9100 and Z9264 platforms.
- Change the return type of thermal Platform APIs in DellEMC S6000, S6100 and Z9100 platforms to 'float'.

**- How I did it**

- Add 'skip_thermalctld:true' in pmon_daemon_control.json for DellEMC S6000, S6100, Z9100 and Z9264 platforms.
- Made changes in thermal.py, for 'get_temperature', 'get_high_threshold' and 'get_low_threshold' to return 'float' value.

**- How to verify it**

- Check thermalctld is not running in 'pmon'.
- Wrote a python script to load Chassis class and then call the APIs accordingly and verify the return type.
  • Loading branch information
ArunSaravananBalachandran committed Jun 11, 2020
1 parent 0a70571 commit 093d773
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"skip_ledd": true
"skip_ledd": true,
"skip_thermalctld": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ def get_temperature(self):
thermal_temperature = self._read_sysfs_file(
self.thermal_temperature_file)
if (thermal_temperature != 'ERR'):
thermal_temperature = float(thermal_temperature) / 1000
thermal_temperature = float(thermal_temperature)
else:
thermal_temperature = 0

return "{:.3f}".format(thermal_temperature)
return thermal_temperature / 1000.0

def get_high_threshold(self):
"""
Expand All @@ -197,11 +197,11 @@ def get_high_threshold(self):
thermal_high_threshold = self._read_sysfs_file(
self.thermal_high_threshold_file)
if (thermal_high_threshold != 'ERR'):
thermal_high_threshold = float(thermal_high_threshold) / 1000
thermal_high_threshold = float(thermal_high_threshold)
else:
thermal_high_threshold = 0

return "{:.3f}".format(thermal_high_threshold)
return thermal_high_threshold / 1000.0

def get_low_threshold(self):
"""
Expand All @@ -215,11 +215,11 @@ def get_low_threshold(self):
thermal_low_threshold = self._read_sysfs_file(
self.thermal_low_threshold_file)
if (thermal_low_threshold != 'ERR'):
thermal_low_threshold = float(thermal_low_threshold) / 1000
thermal_low_threshold = float(thermal_low_threshold)
else:
thermal_low_threshold = 0

return "{:.3f}".format(thermal_low_threshold)
return thermal_low_threshold / 1000.0

def set_high_threshold(self, temperature):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ def get_temperature(self):
thermal_temperature = self._read_sysfs_file(
self.thermal_temperature_file)
if (thermal_temperature != 'ERR'):
thermal_temperature = float(thermal_temperature) / 1000
thermal_temperature = float(thermal_temperature)
else:
thermal_temperature = 0

return "{:.3f}".format(thermal_temperature)
return thermal_temperature / 1000.0

def get_high_threshold(self):
"""
Expand All @@ -156,11 +156,11 @@ def get_high_threshold(self):
thermal_high_threshold = self._read_sysfs_file(
self.thermal_high_threshold_file)
if (thermal_high_threshold != 'ERR'):
thermal_high_threshold = float(thermal_high_threshold) / 1000
thermal_high_threshold = float(thermal_high_threshold)
else:
thermal_high_threshold = 0

return "{:.3f}".format(thermal_high_threshold)
return thermal_high_threshold / 1000.0

def get_low_threshold(self):
"""
Expand All @@ -174,11 +174,11 @@ def get_low_threshold(self):
thermal_low_threshold = self._read_sysfs_file(
self.thermal_low_threshold_file)
if (thermal_low_threshold != 'ERR'):
thermal_low_threshold = float(thermal_low_threshold) / 1000
thermal_low_threshold = float(thermal_low_threshold)
else:
thermal_low_threshold = 0

return "{:.3f}".format(thermal_low_threshold)
return thermal_low_threshold / 1000.0

def set_high_threshold(self, temperature):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ def get_temperature(self):
thermal_temperature = self._read_sysfs_file(
self.thermal_temperature_file)
if (thermal_temperature != 'ERR'):
thermal_temperature = float(thermal_temperature) / 1000
thermal_temperature = float(thermal_temperature)
else:
thermal_temperature = 0

return "{:.3f}".format(thermal_temperature)
return thermal_temperature / 1000.0

def get_high_threshold(self):
"""
Expand All @@ -152,11 +152,11 @@ def get_high_threshold(self):
thermal_high_threshold = self._read_sysfs_file(
self.thermal_high_threshold_file)
if (thermal_high_threshold != 'ERR'):
thermal_high_threshold = float(thermal_high_threshold) / 1000
thermal_high_threshold = float(thermal_high_threshold)
else:
thermal_high_threshold = 0

return "{:.3f}".format(thermal_high_threshold)
return thermal_high_threshold / 1000.0

def get_low_threshold(self):
"""
Expand All @@ -170,11 +170,11 @@ def get_low_threshold(self):
thermal_low_threshold = self._read_sysfs_file(
self.thermal_low_threshold_file)
if (thermal_low_threshold != 'ERR'):
thermal_low_threshold = float(thermal_low_threshold) / 1000
thermal_low_threshold = float(thermal_low_threshold)
else:
thermal_low_threshold = 0

return "{:.3f}".format(thermal_low_threshold)
return thermal_low_threshold / 1000.0

def set_high_threshold(self, temperature):
"""
Expand Down

0 comments on commit 093d773

Please sign in to comment.