Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in fan and psu base classes (1.0 platform API) related to pddf_2.0 #92

Merged
merged 1 commit into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions sonic_fan/fan_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,14 @@ def get_direction(self, index):

def get_speed(self, index):
"""
Retrieves the speed of a Front FAN in the tray in revolutions per minute defined
Retrieves the speed of a FAN in the tray in revolutions per minute defined
by 1-based index <index>

:param index: An integer, 1-based index of the FAN of which to query speed
:return: integer, denoting front FAN speed
"""
return 0

def get_speed_rear(self, index):
"""
Retrieves the speed of a rear FAN in the tray (applicable only for 2-fan tray)
in revolutions per minute defined by 1-based index <index>

:param index: An integer, 1-based index of the FAN of which to query speed
:return: integer, denoting rear FAN speed
"""
return 0

def set_speed(self, val):
"""
Sets the speed of all the FANs to a value denoted by the duty-cycle percentage val
Expand Down
14 changes: 7 additions & 7 deletions sonic_psu/psu_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,29 +88,29 @@ def get_output_voltage(self, idx):
Retrieves the ouput volatage in milli volts of a power supply unit (PSU) defined
by 1-based index <idx>
:param idx: An integer, 1-based index of the PSU of which to query o/p volatge
:return: An integer, value of o/p voltage in mV if PSU is good, else zero
:return: A float, value of o/p voltage in Volts if PSU is good, else zero
"""
return 0
return 0.0

def get_output_current(self, idx):
"""
Retrieves the output current in milli amperes of a power supply unit (PSU) defined
by 1-based index <idx>
:param idx: An integer, 1-based index of the PSU of which to query o/p current
:return: An integer, value of o/p current in mA if PSU is good, else zero
:return: A float, value of o/p current in Amps if PSU is good, else zero
"""
return 0
return 0.0

def get_output_power(self, idx):
"""
Retrieves the output power in micro watts of a power supply unit (PSU) defined
by 1-based index <idx>
:param idx: An integer, 1-based index of the PSU of which to query o/p power
:return: An integer, value of o/p power in micro Watts if PSU is good, else zero
:return: A float, value of o/p power in Watts if PSU is good, else zero
"""
return 0
return 0.0

def get_fan_speed(self, idx, fan_idx):
def get_fan_rpm(self, idx, fan_idx):
"""
Retrieves the speed of fan, in rpm, denoted by 1-based <fan_idx> of a power
supply unit (PSU) defined by 1-based index <idx>
Expand Down