-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Accton/PDDF] Support show cmd for psu-temp and fan (#10215)
Why I did it Support for show platform temp/fan for psu-temp and fan. Original code doesn't has fan_drawer to support these information. How I did it Support for show platform temp/fan for psu-temp and fan. Add fan_drawer.py and update thermal.py to add needed code. It need PDDF common code to support . (Refer to #10213) How to verify it Test show platform temp and show platform fan. root@as7726-32x-2:~# show platform fan Drawer LED FAN Speed Direction Presence Status Timestamp Fantray1 green Fantray1_1 38% EXHAUST Present OK 20220311 08:13:04 Fantray1 green Fantray1_2 38% EXHAUST Present OK 20220311 08:13:04 Fantray2 green Fantray2_1 38% EXHAUST Present OK 20220311 08:13:04 Fantray2 green Fantray2_2 38% EXHAUST Present OK 20220311 08:13:04 Fantray3 green Fantray3_1 38% EXHAUST Present OK 20220311 08:13:04 Fantray3 green Fantray3_2 38% EXHAUST Present OK 20220311 08:13:04 Fantray4 green Fantray4_1 38% EXHAUST Present OK 20220311 08:13:04 Fantray4 green Fantray4_2 38% EXHAUST Present OK 20220311 08:13:04 Fantray5 green Fantray5_1 38% EXHAUST Present OK 20220311 08:13:04 Fantray5 green Fantray5_2 38% EXHAUST Present OK 20220311 08:13:04 Fantray6 green Fantray6_1 38% EXHAUST Present OK 20220311 08:13:04 Fantray6 green Fantray6_2 38% EXHAUST Present OK 20220311 08:13:04 N/A green PSU1_FAN1 23% EXHAUST Present OK 20220311 08:13:04 N/A green PSU2_FAN1 22% EXHAUST Present OK 20220311 08:13:04 root@as7726-32x-2:~# show platform temp Sensor Temperature High TH Low TH Crit High TH Crit Low TH Warning Timestamp PSU1_TEMP1 28 N/A N/A N/A N/A False 20220311 08:13:04 PSU2_TEMP1 25 N/A N/A N/A N/A False 20220311 08:13:04 TEMP1 23.5 80.0 N/A N/A N/A False 20220311 08:13:04 TEMP2 27 80.0 N/A N/A N/A False 20220311 08:13:04 TEMP3 24 80.0 N/A N/A N/A False 20220311 08:13:04 TEMP4 27 80.0 N/A N/A N/A False 20220311 08:13:04 TEMP5 24 80.0 N/A N/A N/A False 20220311 08:13:04 Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
- Loading branch information
1 parent
7debcff
commit ab3053b
Showing
12 changed files
with
114 additions
and
12 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
platform/broadcom/sonic-platform-modules-accton/as4630-54pe/sonic_platform/fan_drawer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env python | ||
|
||
|
||
try: | ||
from sonic_platform_pddf_base.pddf_fan_drawer import PddfFanDrawer | ||
except ImportError as e: | ||
raise ImportError(str(e) + "- required module not found") | ||
|
||
|
||
class FanDrawer(PddfFanDrawer): | ||
"""PDDF Platform-Specific Fan-Drawer class""" | ||
|
||
def __init__(self, tray_idx, pddf_data=None, pddf_plugin_data=None): | ||
# idx is 0-based | ||
PddfFanDrawer.__init__(self, tray_idx, pddf_data, pddf_plugin_data) | ||
|
||
# Provide the functions/variables below for which implementation is to be overwritten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
platform/broadcom/sonic-platform-modules-accton/as7326-56x/sonic_platform/fan_drawer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env python | ||
|
||
|
||
try: | ||
from sonic_platform_pddf_base.pddf_fan_drawer import PddfFanDrawer | ||
except ImportError as e: | ||
raise ImportError(str(e) + "- required module not found") | ||
|
||
|
||
class FanDrawer(PddfFanDrawer): | ||
"""PDDF Platform-Specific Fan-Drawer class""" | ||
|
||
def __init__(self, tray_idx, pddf_data=None, pddf_plugin_data=None): | ||
# idx is 0-based | ||
PddfFanDrawer.__init__(self, tray_idx, pddf_data, pddf_plugin_data) | ||
|
||
# Provide the functions/variables below for which implementation is to be overwritten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
platform/broadcom/sonic-platform-modules-accton/as7712-32x/sonic_platform/fan_drawer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env python | ||
|
||
|
||
try: | ||
from sonic_platform_pddf_base.pddf_fan_drawer import PddfFanDrawer | ||
except ImportError as e: | ||
raise ImportError(str(e) + "- required module not found") | ||
|
||
|
||
class FanDrawer(PddfFanDrawer): | ||
"""PDDF Platform-Specific Fan-Drawer class""" | ||
|
||
def __init__(self, tray_idx, pddf_data=None, pddf_plugin_data=None): | ||
# idx is 0-based | ||
PddfFanDrawer.__init__(self, tray_idx, pddf_data, pddf_plugin_data) | ||
|
||
# Provide the functions/variables below for which implementation is to be overwritten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
platform/broadcom/sonic-platform-modules-accton/as7726-32x/sonic_platform/fan_drawer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env python | ||
|
||
|
||
try: | ||
from sonic_platform_pddf_base.pddf_fan_drawer import PddfFanDrawer | ||
except ImportError as e: | ||
raise ImportError(str(e) + "- required module not found") | ||
|
||
|
||
class FanDrawer(PddfFanDrawer): | ||
"""PDDF Platform-Specific Fan-Drawer class""" | ||
|
||
def __init__(self, tray_idx, pddf_data=None, pddf_plugin_data=None): | ||
# idx is 0-based | ||
PddfFanDrawer.__init__(self, tray_idx, pddf_data, pddf_plugin_data) | ||
|
||
# Provide the functions/variables below for which implementation is to be overwritten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
platform/broadcom/sonic-platform-modules-accton/as7816-64x/sonic_platform/fan_drawer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env python | ||
|
||
|
||
try: | ||
from sonic_platform_pddf_base.pddf_fan_drawer import PddfFanDrawer | ||
except ImportError as e: | ||
raise ImportError(str(e) + "- required module not found") | ||
|
||
|
||
class FanDrawer(PddfFanDrawer): | ||
"""PDDF Platform-Specific Fan-Drawer class""" | ||
|
||
def __init__(self, tray_idx, pddf_data=None, pddf_plugin_data=None): | ||
# idx is 0-based | ||
PddfFanDrawer.__init__(self, tray_idx, pddf_data, pddf_plugin_data) | ||
|
||
# Provide the functions/variables below for which implementation is to be overwritten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
platform/broadcom/sonic-platform-modules-accton/as9716-32d/sonic_platform/fan_drawer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env python | ||
|
||
|
||
try: | ||
from sonic_platform_pddf_base.pddf_fan_drawer import PddfFanDrawer | ||
except ImportError as e: | ||
raise ImportError(str(e) + "- required module not found") | ||
|
||
|
||
class FanDrawer(PddfFanDrawer): | ||
"""PDDF Platform-Specific Fan-Drawer class""" | ||
|
||
def __init__(self, tray_idx, pddf_data=None, pddf_plugin_data=None): | ||
# idx is 0-based | ||
PddfFanDrawer.__init__(self, tray_idx, pddf_data, pddf_plugin_data) | ||
|
||
# Provide the functions/variables below for which implementation is to be overwritten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters