Skip to content

[intfutil]: Fix python indentation#166

Merged
stcheng merged 1 commit intosonic-net:masterfrom
stcheng:intfsutil
Dec 8, 2017
Merged

[intfutil]: Fix python indentation#166
stcheng merged 1 commit intosonic-net:masterfrom
stcheng:intfsutil

Conversation

@stcheng
Copy link
Copy Markdown
Contributor

@stcheng stcheng commented Dec 8, 2017

Signed-off-by: Shu0T1an ChenG shuche@microsoft.com

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
@stcheng stcheng added the Bug label Dec 8, 2017
@stcheng
Copy link
Copy Markdown
Contributor Author

stcheng commented Dec 8, 2017

@rodnymolina please take a look

return "N/A"

if status_type == PORT_SPEED and status != "N/A":
if status_type == PORT_SPEED and status != "N/A":
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, no clue how that space got in there in the last second, this specific portion was tested several times.

@stcheng stcheng merged commit 1c680b4 into sonic-net:master Dec 8, 2017
@stcheng stcheng deleted the intfsutil branch December 8, 2017 07:49
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
a4f39ac580cdc4bc816b829adefa56626332b6d6 (HEAD -> 201911, origin/201911) [RouteUpdater]: Fix multi_asic mock function implementation and multi_asic variable name (sonic-net#186)
583265e521df440549d29fd2ef403c09f9e907ab [LLDP]: Update init_db to load global database config (sonic-net#166)
005cf2e14005220699b57b0165b00914d009a852 Fix: correctly handle that lldp_loc_man_addr contains only IPv6 address without IPv4 address (sonic-net#164)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
mihirpat1 pushed a commit to mihirpat1/sonic-utilities that referenced this pull request Sep 15, 2023
Call pip2/3 using sudo to ensure packages are installed globally.
nazariig pushed a commit to nazariig/sonic-utilities that referenced this pull request May 6, 2025
…ash drive is plugged in (sonic-net#166)

Fix `show platform ssdhealth` not showing expected output when a usb flash drive is plugged in.

<!--
 Please make sure you've read and understood our contributing guidelines:
 https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

 failure_prs.log skip_prs.log Make sure all your commits include a signature generated with `git commit -s` **

 If this is a bug fix, make sure your description includes "closes #xxxx",
 "fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related
 issue when the PR is merged.

 If you are adding/modifying/removing any command or utility script, please also
 make sure to add/modify/remove any unit tests from the tests
 directory as appropriate.

 If you are modifying or removing an existing 'show', 'config' or 'sonic-clear'
 subcommand, or you are adding a new subcommand, please make sure you also
 update the Command Line Reference Guide (doc/Command-Reference.md) to reflect
 your changes.

 Please provide the following information:
-->

#### What I did
When 'show platform ssdhealth' is not supplied with a device name and a usb flash drive is attached we show incorrect output as we deduce incorrect device name from 'lsblk' command and pass it to ssdutil. I removed this incorrect deduction of the device name.

#### How I did it

Instead of incorrectly deducing the device using the lsblk command we can instead not pass any device name as argument to the ssdutil and it will automatically choose the device on which /host partition is mounted which is the primary storage device in our case as per the PR: sonic-net#3399

#### How to verify it

Run `sudo show platform ssdhealth` without any arguments with a flash drive plugged into the sonic switch.

#### Previous command output (if the output of a command-line utility has changed)

```
root@qa-eth-vt19-1-4280:~# show platform ssdhealth
Disk Type : NVME
Device Model : N/A
Health : N/A
Temperature : N/A
```

#### New command output (if the output of a command-line utility has changed)

```
root@qa-eth-vt19-1-4280:/home/admin# show platform ssdhealth
Disk Type : NVME
Device Model : Virtium VTPM24CEXI080-BM110006
Health : 100.0%
Temperature : 51.0C
```

In the case where the user passes the device name as argument to the command (`show platform ssdhealth /dev/nvme0n1`) output remains the same and no changes have been made.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants