-
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.
[DellEMC]: FanDrawer and get_high_critical_threshold Platform API imp…
…lementation for S6000, S6100, Z9100 and Z9264F
- Loading branch information
1 parent
70528f7
commit be03bbe
Showing
16 changed files
with
240 additions
and
38 deletions.
There are no files selected for viewing
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
2 changes: 1 addition & 1 deletion
2
platform/broadcom/sonic-platform-modules-dell/s6000/sonic_platform/__init__.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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
__all__ = ["platform", "chassis", "sfp", "psu", "thermal"] | ||
__all__ = ["platform", "chassis", "fan", "fan_drawer", "sfp", "psu", "thermal"] | ||
from sonic_platform import * |
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
34 changes: 34 additions & 0 deletions
34
platform/broadcom/sonic-platform-modules-dell/s6000/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,34 @@ | ||
#!/usr/bin/env python | ||
|
||
######################################################################## | ||
# DellEMC S6000 | ||
# | ||
# Module contains an implementation of SONiC Platform Base API and | ||
# provides the Fan-Drawers' information available in the platform. | ||
# | ||
######################################################################## | ||
|
||
try: | ||
from sonic_platform_base.fan_drawer_base import FanDrawerBase | ||
from sonic_platform.fan import Fan | ||
except ImportError as e: | ||
raise ImportError(str(e) + "- required module not found") | ||
|
||
|
||
class FanDrawer(FanDrawerBase): | ||
"""DellEMC Platform-specific Fan class""" | ||
|
||
def __init__(self, fantray_index): | ||
|
||
FanDrawerBase.__init__(self) | ||
# FanTray is 1-based in DellEMC platforms | ||
self.fantrayindex = fantray_index + 1 | ||
self._fan_list.append(Fan(fantray_index)) | ||
|
||
def get_name(self): | ||
""" | ||
Retrieves the fan drawer name | ||
Returns: | ||
string: The name of the device | ||
""" | ||
return "FanTray{}".format(self.fantrayindex) |
2 changes: 1 addition & 1 deletion
2
platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/__init__.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
__all__ = ["platform", "chassis", "module", "fan", "psu", "sfp", "thermal"] | ||
__all__ = ["platform", "chassis", "module", "fan", "fan_drawer", "psu", "sfp", "thermal"] | ||
from sonic_platform import * | ||
|
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
34 changes: 34 additions & 0 deletions
34
platform/broadcom/sonic-platform-modules-dell/s6100/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,34 @@ | ||
#!/usr/bin/env python | ||
|
||
######################################################################## | ||
# DellEMC S6100 | ||
# | ||
# Module contains an implementation of SONiC Platform Base API and | ||
# provides the Fan-Drawers' information available in the platform. | ||
# | ||
######################################################################## | ||
|
||
try: | ||
from sonic_platform_base.fan_drawer_base import FanDrawerBase | ||
from sonic_platform.fan import Fan | ||
except ImportError as e: | ||
raise ImportError(str(e) + "- required module not found") | ||
|
||
|
||
class FanDrawer(FanDrawerBase): | ||
"""DellEMC Platform-specific Fan class""" | ||
|
||
def __init__(self, fantray_index): | ||
|
||
FanDrawerBase.__init__(self) | ||
# FanTray is 1-based in DellEMC platforms | ||
self.fantrayindex = fantray_index + 1 | ||
self._fan_list.append(Fan(fantray_index)) | ||
|
||
def get_name(self): | ||
""" | ||
Retrieves the fan drawer name | ||
Returns: | ||
string: The name of the device | ||
""" | ||
return "FanTray{}".format(self.fantrayindex) |
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
2 changes: 1 addition & 1 deletion
2
platform/broadcom/sonic-platform-modules-dell/z9100/sonic_platform/__init__.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
__all__ = ["platform", "chassis", "fan", "psu", "sfp", "thermal"] | ||
__all__ = ["platform", "chassis", "fan", "fan_drawer", "psu", "sfp", "thermal"] | ||
from sonic_platform import * | ||
|
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
37 changes: 37 additions & 0 deletions
37
platform/broadcom/sonic-platform-modules-dell/z9100/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,37 @@ | ||
#!/usr/bin/env python | ||
|
||
######################################################################## | ||
# DellEMC Z9100 | ||
# | ||
# Module contains an implementation of SONiC Platform Base API and | ||
# provides the Fan-Drawers' information available in the platform. | ||
# | ||
######################################################################## | ||
|
||
try: | ||
from sonic_platform_base.fan_drawer_base import FanDrawerBase | ||
from sonic_platform.fan import Fan | ||
except ImportError as e: | ||
raise ImportError(str(e) + "- required module not found") | ||
|
||
Z9100_FANS_PER_FANTRAY = 2 | ||
|
||
|
||
class FanDrawer(FanDrawerBase): | ||
"""DellEMC Platform-specific Fan class""" | ||
|
||
def __init__(self, fantray_index): | ||
|
||
FanDrawerBase.__init__(self) | ||
# FanTray is 1-based in DellEMC platforms | ||
self.fantrayindex = fantray_index + 1 | ||
for i in range(Z9100_FANS_PER_FANTRAY): | ||
self._fan_list.append(Fan(fantray_index, i)) | ||
|
||
def get_name(self): | ||
""" | ||
Retrieves the fan drawer name | ||
Returns: | ||
string: The name of the device | ||
""" | ||
return "FanTray{}".format(self.fantrayindex) |
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
4 changes: 2 additions & 2 deletions
4
platform/broadcom/sonic-platform-modules-dell/z9264f/sonic_platform/__init__.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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
__all__ = ["platform", "chassis", "sfp", "eeprom", "component", "psu", "thermal", "fan"] | ||
from sonic_platform import * | ||
__all__ = ["platform", "chassis", "sfp", "eeprom", "component", "psu", "thermal", "fan", "fan_drawer"] | ||
from sonic_platform import * |
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
Oops, something went wrong.