Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLI][show][platform] Added ASIC count in the output. #1185

Merged
merged 4 commits into from
Oct 26, 2020

Conversation

smaheshm
Copy link
Contributor

@smaheshm smaheshm commented Oct 22, 2020

- What I did

Added platform ASIC count output to platform summary. Also added option for JSON output.

- How I did it

Added ASIC count in hardware info.

- How to verify it

Manual CLI verification.

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

admin@str-s6000-acs-9:~$ show platform summary 
Platform: x86_64-dell_s6000_s1220-r0
HwSKU: Force10-S6000
ASIC: broadcom

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

admin@str-s6000-acs-9:~$ show platform summary 
Platform: x86_64-dell_s6000_s1220-r0
HwSKU: Force10-S6000
ASIC: broadcom
ASIC Count: 1
admin@str-s6000-acs-9:~$ show platform summary --json
{
  "asic_count": 1, 
  "asic_type": "broadcom", 
  "hwsku": "Force10-S6000", 
  "platform": "x86_64-dell_s6000_s1220-r0"
}

show/main.py Outdated
Comment on lines 1021 to 1022
if verbose:
click.echo("ASIC Count: {}".format(hw_info_dict['asic_count']))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it may be better to always display this line without the need for a --verbose flag. Just need to check the rest of the SONiC codebase to see if this output is parsed anywhere and make sure it is smart enough to handle an additional line.

Does anyone disagree?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At this point it may seem redundant for most cases, but I prefer that too - show by default.

@smaheshm
Copy link
Contributor Author

retest this please

@smaheshm smaheshm changed the title [CLI][show][platform] Added ASIC count output in 'verbose' option [CLI][show][platform] Added ASIC count in the output. Oct 22, 2020
show/main.py Outdated Show resolved Hide resolved
@smaheshm
Copy link
Contributor Author

@jleveque @abdosi Does this look OK. My next PR depends on this so would like commit this. Thanks!

@abdosi
Copy link
Contributor

abdosi commented Oct 26, 2020

LGTM

@abdosi
Copy link
Contributor

abdosi commented Oct 30, 2020

@smaheshm Create PR for 201911

smaheshm added a commit to smaheshm/sonic-utilities that referenced this pull request Nov 10, 2020
@smaheshm smaheshm deleted the plat-cmd branch February 26, 2021 22:33
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
c0df635 (HEAD -> 201911, origin/201911) Updates to bgp config and show commands with BGP_INTERNAL_NEIGHBOR table (sonic-net#1224) (sonic-net#1237)
d683bb4 [CLI][show][platform] Added ASIC count in the output. (sonic-net#1185) (sonic-net#1227)
4585be1 [show] Fix 'show int neigh expected' (sonic-net#1189)
29e4469 [201911][fwutil]: Use logger from sonic-py-common (sonic-net#1190)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants