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

Update the return of update_firmware for the image not exist case #306

Merged
merged 4 commits into from
Sep 14, 2022

Conversation

sujinmkang
Copy link
Contributor

@sujinmkang sujinmkang commented Aug 31, 2022

Description

issue : sonic-net/sonic-mgmt#4564

Motivation and Context

When the image file path doesn't exit, returns False instead of throwing error.

How Has This Been Tested?

Additional Information (Optional)

@sujinmkang sujinmkang requested a review from prgeor September 1, 2022 20:31
Comment on lines 111 to 113
Returns:
False if image not found.

Copy link
Collaborator

Choose a reason for hiding this comment

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

can we have return 'False' for any failure. see the definition of install_firmware()?

  Returns:
            A boolean, True if install was successful, False if not

@@ -108,6 +108,10 @@ def update_firmware(self, image_path):
Args:
image_path: A string, path to firmware image

Returns:
Boolean False if image_path doesn't exist instead of throwing an exception error
None when the update is successful
Copy link
Collaborator

Choose a reason for hiding this comment

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

how is 'None' returned if update_firmware() results in reboot?

@prgeor prgeor merged commit 95c3aec into sonic-net:master Sep 14, 2022
qiluo-msft pushed a commit that referenced this pull request Oct 12, 2022
* update the return for update_firmware api's failure case when the image file doesn't exist

* update comments

* update comment

* update comment
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Oct 30, 2022
Update sonic-platform-common submodule pointer to include the following:
* a2164f6 [202012] Fix issue: sff8436 does not support decoding power class 5~7 ([sonic-net#317](sonic-net/sonic-platform-common#317))
* 6722b4e Update the return of update_firmware for the image not exist case ([sonic-net#306](sonic-net/sonic-platform-common#306))

Signed-off-by: dprital <[email protected]>
liat-grozovik pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Oct 30, 2022
Update sonic-platform-common submodule pointer to include the following:
* a2164f6 [202012] Fix issue: sff8436 does not support decoding power class 5~7 ([#317](sonic-net/sonic-platform-common#317))
* 6722b4e Update the return of update_firmware for the image not exist case ([#306](sonic-net/sonic-platform-common#306))

Signed-off-by: dprital <[email protected]>
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-platform-common that referenced this pull request Oct 25, 2024
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.

3 participants