[Mellanox] Adjust PSU fan name to align with sysfs file name (#7490)

Change PSU fan name from psu_{psu_index}fan{fan_index} to psu{psu_index}_fan{fan_index}
This commit is contained in:
Junchao-Mellanox 2021-05-02 23:14:56 +08:00 committed by GitHub
parent be4cf09b5d
commit d9cdf9d14f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ class Fan(FanBase):
else:
self.fan_speed_get_path = "psu{}_fan1_speed_get".format(self.index)
self.fan_presence_path = "psu{}_fan1_speed_get".format(self.index)
self._name = 'psu_{}_fan_{}'.format(self.index, 1)
self._name = 'psu{}_fan{}'.format(self.index, 1)
self.fan_max_speed_path = os.path.join(CONFIG_PATH, "psu_fan_max")
self.fan_min_speed_path = os.path.join(CONFIG_PATH, "psu_fan_min")
self.psu_i2c_bus_path = os.path.join(CONFIG_PATH, 'psu{0}_i2c_bus'.format(self.index))