Skip to content

Commit c619cb6

Browse files
author
Jostar Yang
committed
Fix get_position_in_parent in fan and thermal
1 parent 5f73ac5 commit c619cb6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

device/accton/x86_64-accton_as4630_54pe-r0/sonic_platform/fan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def get_position_in_parent(self):
271271
integer: The 1-based relative physical position in parent device
272272
or -1 if cannot determine the position
273273
"""
274-
return (self.fan_tray_index+1) \
274+
return (self.fan_index+1) \
275275
if not self.is_psu_fan else (self.psu_index+1)
276276

277277
def is_replaceable(self):

device/accton/x86_64-accton_as4630_54pe-r0/sonic_platform/thermal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def get_position_in_parent(self):
225225
Returns:
226226
integer: The 1-based relative physical position in parent device or -1 if cannot determine the position
227227
"""
228-
return -1
228+
return self.index+1
229229

230230
def is_replaceable(self):
231231
"""

0 commit comments

Comments
 (0)