Skip to content

fwutil update all incorrectly autocompletes to fwutil update auto #8925

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

Closed
alexrallen opened this issue Oct 8, 2021 · 1 comment
Closed
Assignees
Labels
Triaged this issue has been triaged

Comments

@alexrallen
Copy link
Contributor

Description

The click library uses the names of functions to assist in the generation of CLI auto-complete trees. In fwutil update the method for updating all available firmware is auto_update

See here: https://github.com/Azure/sonic-utilities/blob/1029c5487dd1190215dae6ca557d6feb96113c9d/fwutil/main.py#L406

# 'auto_update' group
@click.group()
@click.pass_context
def auto_update(ctx):
    """Auto-update platform firmware"""
    pass

This is causing click to mistakenly label the command as auto instead of all as defined lower in the file. Renaming this function to all_update resolves this problem.

Steps to reproduce the issue:

  1. Type fwutil update
  2. Hit tab

Describe the results you received:

root@r-qa-sw-eth-21101:/home/admin# fwutil update 
auto     chassis  module  

Describe the results you expected:

root@r-qa-sw-eth-21101:/home/admin# fwutil update 
all    chassis  module  
@dgsudharsan
Copy link
Collaborator

@sujinmkang FYI

@zhangyanzhao zhangyanzhao added the Triaged this issue has been triaged label Oct 13, 2021
qiluo-msft pushed a commit to sonic-net/sonic-utilities that referenced this issue Apr 29, 2022
…ot fw update (#2040)

sonic-net/sonic-buildimage#8928
sonic-net/sonic-buildimage#8926
sonic-net/sonic-buildimage#8925
sonic-net/sonic-buildimage#8924

#### What I did
Allow fwutil update all for other boot type if any previous fw update done for "none" boot type

#### How I did it
Allow fwutil update all for other boot type if any previous fw update done for "none" boot type

#### How to verify it
1. Run fwutil update all for boot_type="none"
2. Run fwutil update all for any other boot_type
3. Verify if the 2nd update is proceeded.
judyjoseph pushed a commit to sonic-net/sonic-utilities that referenced this issue May 2, 2022
…ot fw update (#2040)

sonic-net/sonic-buildimage#8928
sonic-net/sonic-buildimage#8926
sonic-net/sonic-buildimage#8925
sonic-net/sonic-buildimage#8924

#### What I did
Allow fwutil update all for other boot type if any previous fw update done for "none" boot type

#### How I did it
Allow fwutil update all for other boot type if any previous fw update done for "none" boot type

#### How to verify it
1. Run fwutil update all for boot_type="none"
2. Run fwutil update all for any other boot_type
3. Verify if the 2nd update is proceeded.
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this issue Aug 3, 2023
…ot fw update (#2040)

sonic-net/sonic-buildimage#8928
sonic-net/sonic-buildimage#8926
sonic-net/sonic-buildimage#8925
sonic-net/sonic-buildimage#8924

#### What I did
Allow fwutil update all for other boot type if any previous fw update done for "none" boot type

#### How I did it
Allow fwutil update all for other boot type if any previous fw update done for "none" boot type

#### How to verify it
1. Run fwutil update all for boot_type="none"
2. Run fwutil update all for any other boot_type
3. Verify if the 2nd update is proceeded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged this issue has been triaged
Projects
None yet
Development

No branches or pull requests

4 participants