From b066ec7fa9f58b7e8dec3c43c6fa30d2104da994 Mon Sep 17 00:00:00 2001 From: Nazarii Hnydyn Date: Fri, 24 Apr 2020 11:14:36 +0000 Subject: [PATCH] [component]: Extend docstrings for firmware management API. Signed-off-by: Nazarii Hnydyn --- sonic_platform_base/component_base.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sonic_platform_base/component_base.py b/sonic_platform_base/component_base.py index 93cf20366ced..7cbe478c1457 100644 --- a/sonic_platform_base/component_base.py +++ b/sonic_platform_base/component_base.py @@ -68,8 +68,13 @@ def get_firmware_update_notification(self, image_path): def install_firmware(self, image_path): """ Installs firmware to the component. - It's user's responsibility to complete firmware update - in case some extra steps are required (e.g., reboot, power cycle, etc.) + + This API performs firmware installation only: this may/may not be the same as firmware update. + In case platform component requires some extra steps (apart from calling Low Level Utility) + to load the installed firmware (e.g, reboot, power cycle, etc.) - this must be done manually by user. + + Note: in case immediate actions are required to complete the component firmware update + (e.g., reboot, power cycle, etc.) - will be done automatically by API and no return value provided Args: image_path: A string, path to firmware image @@ -82,8 +87,10 @@ def install_firmware(self, image_path): def update_firmware(self, image_path): """ Updates firmware of the component. - It's API's responsibility to complete firmware update - in case some extra steps are required (e.g., reboot, power cycle, etc.) + + This API performs firmware update: it assumes firmware installation and loading in a single call. + In case platform componet requires some extra steps (apart from calling Low Level Utility) + to load the installed firmware (e.g, reboot, power cycle, etc.) - this will be done automatically by API. Args: image_path: A string, path to firmware image