Skip to content

Commit 6e511a7

Browse files
authored
Merge pull request #14 from ec-michael-shih/02_20231206_202211_0_fixed_pytest_as4630-54-pe
[AS4630-54PE] Add the file: hwsku.json, psu.py support show pout max
2 parents b71783c + b2c9c46 commit 6e511a7

File tree

1 file changed

+19
-0
lines changed
  • platform/broadcom/sonic-platform-modules-accton/as4630-54pe/sonic_platform

1 file changed

+19
-0
lines changed

platform/broadcom/sonic-platform-modules-accton/as4630-54pe/sonic_platform/psu.py

+19
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,22 @@ def get_power(self):
110110
return 0.0
111111

112112
return super().get_power()
113+
114+
def get_maximum_supplied_power(self):
115+
"""
116+
Retrieves current energy supplied by PSU
117+
118+
Returns:
119+
A float number, the power in watts,
120+
e.g. 302.6
121+
"""
122+
device = "PSU{}".format(self.psu_index)
123+
output = self.pddf_obj.get_attr_name_output(device, "psu_p_out_max")
124+
if not output:
125+
return 0.0
126+
127+
p_out = output['status']
128+
129+
# power is returned in micro watts
130+
return float(p_out)/1000
131+

0 commit comments

Comments
 (0)