Skip to content

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

Merged
prgeor merged 4 commits intosonic-net:masterfrom
sujinmkang:component_api_fail
Sep 14, 2022
Merged

Update the return of update_firmware for the image not exist case#306
prgeor merged 4 commits intosonic-net:masterfrom
sujinmkang:component_api_fail

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


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