We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b71783c + b2c9c46 commit 6e511a7Copy full SHA for 6e511a7
platform/broadcom/sonic-platform-modules-accton/as4630-54pe/sonic_platform/psu.py
@@ -110,3 +110,22 @@ def get_power(self):
110
return 0.0
111
112
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