Skip to content

Added PSU CLI#152

Merged
jleveque merged 3 commits intosonic-net:masterfrom
andrii-savka:psu_cli
Nov 28, 2017
Merged

Added PSU CLI#152
jleveque merged 3 commits intosonic-net:masterfrom
andrii-savka:psu_cli

Conversation

@andrii-savka
Copy link

No description provided.

psuutil/main.py Outdated

SYSLOG_IDENTIFIER = "psuutil"
PLATFORM_SPECIFIC_MODULE_NAME = "psuutil"
PLATFORM_SPECIFIC_CLASS_NAME = "PSUutil"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest changing case of class name to PsuUtil to match CamelCase of SfpUtil

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to "PsuUtil"

psuutil/main.py Outdated
# 'numpsus' subcommand
@cli.command()
def numpsus():
"number of supported PSU in the device"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest "Display number of supported PSU in the device"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

by index <index>

:param index: An integer, index of the PSU of which to query status
:return: Boolean, True if PSU is operating properly, False if PSU is faulty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also please add more detail to my description here to reflect what we have discussed as "faulty" (e.g., if the PSU is present but powered off, it is considered a fault, and should return false.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More details has been added

Retrieves the operational status of power supply unit (PSU) defined
by index <index>

:param index: An integer, index of the PSU of which to query status
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it zero-based index? I think this info should be here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added more details

@jleveque jleveque merged commit fb48cdf into sonic-net:master Nov 28, 2017
vdahiya12 pushed a commit to vdahiya12/sonic-utilities that referenced this pull request Jul 23, 2021
sonic-net/sonic-buildimage#6768 change the kvm artifact name from kvm to vs

Signed-off-by: Guohan Lu <lguohan@gmail.com>
mihirpat1 pushed a commit to mihirpat1/sonic-utilities that referenced this pull request Sep 15, 2023
Fix errors like below:
```
admin@sonic:~$ show version 

SONiC Software Version: SONiC.master.0-dirty-20201204.005739
Distribution: Debian 10.6
Kernel: 4.19.0-9-2-amd64
Build commit: 873fb969
Build date: Fri Dec  4 09:02:43 UTC 2020
Built by: user@sonic-build

Platform: x86_64-accton_wedge100bf_32x-r0
HwSKU: montara
ASIC: barefoot
Traceback (most recent call last):
  File "/usr/local/bin/decode-syseeprom", line 171, in <module>
    exit(main())
  File "/usr/local/bin/decode-syseeprom", line 47, in main
    t = class_('board', '','','')
  File "/usr/share/sonic/device/x86_64-accton_wedge100bf_32x-r0/plugins/eeprom.py", line 113, in __init__
    if self.eeprom_init():
  File "/usr/share/sonic/device/x86_64-accton_wedge100bf_32x-r0/plugins/eeprom.py", line 180, in eeprom_init
    self, "", [eeprom_params])
  File "/usr/local/lib/python3.7/dist-packages/sonic_eeprom/eeprom_tlvinfo.py", line 178, in set_eeprom
    new_tlvs += new_tlv
TypeError: can't concat str to bytearray
```
Junchao-Mellanox pushed a commit to Junchao-Mellanox/sonic-utilities that referenced this pull request Mar 31, 2025
sonic-net#152)

```<br>* e45cc495 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-14) [Sonic Automation]
* b197a61 - (origin/202411) [db_migrator] Migrate tunnel table (sonic-net#3806) (2025-03-14) [mssonicbld]
* 5b765f3 - [GCU] Add data acl table and rule check (sonic-net#3807) (2025-03-14) [mssonicbld]
* 04bc01d - [Techsupport]Add show route-map command to frr dumps in techsupport (sonic-net#3803) (2025-03-13) [mssonicbld]
* 7a3f4ad - Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld]
* 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld]
* 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld]
* c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld]
* 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld]
* 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak]
* 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld]
* 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld]
* bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants