[platform][barefoot] Add Psu.get_name (#7717)
#### Why I did it To fix the following: ``` # psuutil status Traceback (most recent call last): File "/usr/local/bin/psuutil", line 8, in <module> sys.exit(cli()) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/psuutil/main.py", line 93, in status psu_name = psu.get_name() File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/device_base.py", line 28, in get_name raise NotImplementedError NotImplementedError ``` #### How I did it Implemented get_name Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
This commit is contained in:
parent
3edb4f1ebe
commit
0fa024883d
@ -41,6 +41,9 @@ class Psu(PsuBase):
|
||||
"""
|
||||
return 2
|
||||
|
||||
def get_name(self):
|
||||
return f"psu-{self.__index}"
|
||||
|
||||
def get_powergood_status(self):
|
||||
"""
|
||||
Retrieves the oprational status of power supply unit (PSU) defined
|
||||
|
Reference in New Issue
Block a user