From d813df3dc8ece6206d37afbfe97d43541545e3b2 Mon Sep 17 00:00:00 2001 From: Nazarii Hnydyn Date: Tue, 24 Dec 2019 09:29:25 +0200 Subject: [PATCH] Added fwutil High Level Design (#463) * Added fwutil High Level Design. Signed-off-by: Nazarii Hnydyn * Updated fwutil HLD: rev 0.2. Signed-off-by: Nazarii Hnydyn * Updated fwutil HLD: rev 0.3. Signed-off-by: Nazarii Hnydyn * Updated fwutil HLD: rev 0.4. Signed-off-by: Nazarii Hnydyn * Updated fwutil HLD: rev 0.5. Signed-off-by: Nazarii Hnydyn --- doc/fwutil/fwutil.md | 462 +++++++++ doc/fwutil/images/fwutil_hld.svg | 609 +++++++++++ doc/fwutil/images/install_modular_flow.svg | 947 +++++++++++++++++ .../images/install_non_modular_flow.svg | 739 +++++++++++++ doc/fwutil/images/show_status_flow.svg | 970 ++++++++++++++++++ 5 files changed, 3727 insertions(+) create mode 100755 doc/fwutil/fwutil.md create mode 100755 doc/fwutil/images/fwutil_hld.svg create mode 100755 doc/fwutil/images/install_modular_flow.svg create mode 100755 doc/fwutil/images/install_non_modular_flow.svg create mode 100755 doc/fwutil/images/show_status_flow.svg diff --git a/doc/fwutil/fwutil.md b/doc/fwutil/fwutil.md new file mode 100755 index 0000000000..9f524880f3 --- /dev/null +++ b/doc/fwutil/fwutil.md @@ -0,0 +1,462 @@ +# SONiC FW utility + +## High Level Design document + +## Table of contents +- [About this manual](#about-this-manual) +- [Revision](#revision) +- [Abbreviations](#abbreviations) +- [1 Introduction](#1-introduction) + - [1.1 Feature overview](#11-feature-overview) + - [1.2 Requirements](#12-requirements) + - [1.2.1 Functionality](#121-functionality) + - [1.2.2 Command interface](#122-command-interface) + - [1.2.3 Error handling](#123-error-handling) + - [1.2.4 Event logging](#124-event-logging) +- [2 Design](#2-design) + - [2.1 Overview](#21-overview) + - [2.2 FW utility](#22-fw-utility) + - [2.2.1 Command structure](#221-command-structure) + - [2.2.2 Command interface](#222-command-interface) + - [2.2.2.1 Show commands](#2221-show-commands) + - [2.2.2.1.1 Overview](#22211-overview) + - [2.2.2.1.2 Description](#22212-description) + - [2.2.2.2 Install commands](#2222-install-commands) + - [2.2.2.2.1 Overview](#22221-overview) + - [2.2.2.2.2 Description](#22222-description) + - [2.2.2.3 Update commands](#2223-update-commands) + - [2.2.2.3.1 Overview](#22231-overview) + - [2.2.2.3.2 Description](#22232-description) +- [3 Flows](#3-flows) + - [3.1 Show components status](#31-show-components-status) + - [3.2 Install component FW](#32-install-component-fw) + - [3.2.1 Non modular chassis platform](#321-non-modular-chassis-platform) + - [3.2.2 Modular chassis platform](#322-modular-chassis-platform) +- [4 Tests](#4-tests) + - [4.1 Unit tests](#41-unit-tests) + +## About this manual + +This document provides general information about FW utility implementation in SONiC. + +## Revision + +| Rev | Date | Author | Description | +|:---:|:----------:|:--------------:|:----------------------------------| +| 0.1 | 21/08/2019 | Nazarii Hnydyn | Initial version | +| 0.2 | 10/09/2019 | Nazarii Hnydyn | Review feedback and other changes | +| 0.3 | 17/09/2019 | Nazarii Hnydyn | Align flows with the platform API | +| 0.4 | 18/12/2019 | Nazarii Hnydyn | CLI review feedback | + +## Abbreviations + +| Term | Meaning | +|:-------|:----------------------------------------------------| +| FW | Firmware | +| SONiC | Software for Open Networking in the Cloud | +| PSU | Power Supply Unit | +| QSFP | Quad Small Form-factor Pluggable | +| EEPROM | Electrically Erasable Programmable Read-Only Memory | +| I2C | Inter-Integrated Circuit | +| SPI | Serial Peripheral Interface | +| JTAG | Joint Test Action Group | +| BIOS | Basic Input/Output System | +| CPLD | Complex Programmable Logic Device | +| FPGA | Field-Programmable Gate Array | +| URL | Uniform Resource Locator | +| API | Application Programming Interface | +| N/A | Not Applicable/Not Available | + +## List of figures + +[Figure 1: FW utility High Level Design](#figure-1-fw-utility-high-level-design) +[Figure 2: Show components status flow](#figure-2-show-components-status-flow) +[Figure 3: FW install (non modular) flow](#figure-3-fw-install-non-modular-flow) +[Figure 4: FW install (modular) flow](#figure-4-fw-install-modular-flow) + +## List of tables + +[Table 1: Event logging](#table-1-event-logging) + +# 1 Introduction + +## 1.1 Feature overview + +A modern network switch is a sophisticated equipment which consists of many auxiliary components +which are responsible for managing different subsystems (e.g., PSU/FAN/QSFP/EEPROM/THERMAL) +and providing necessary interfaces (e.g., I2C/SPI/JTAG). + +Basically these components are complex programmable logic devices with it's own HW architecture +and software. The most important are BIOS/CPLD/FPGA etc. + +It is very important to always have the latest recommended software version to improve device stability, +security and performance. Also, software updates can add new features and remove outdated ones. + +In order to make software update as simple as possible and to provide a nice user frindly +interface for various maintenance operations (e.g., install a new FW or query current version) +we might need a dedicated FW utility. + +## 1.2 Requirements + +### 1.2.1 Functionality + +**This feature will support the following functionality:** +1. Manual FW installation for particular platform component +2. Automatic FW installation for all available platform components +3. Querying platform components and FW versions + +### 1.2.2 Command interface + +**This feature will support the following commands:** +1. show: display FW versions +2. install: manual FW installation +3. update: automatic FW installation + +### 1.2.3 Error handling + +**This feature will provide error handling for the next situations:** +1. Invalid input +2. Incompatible options/parameters +3. Invalid/nonexistent FW URL/path + +**Note:** FW binary validation (checksum, format, etc.) should be done by SONiC platform API + +### 1.2.4 Event logging + +**This feature will provide event logging for the next situations:** +1. FW binary downloading over URL: start/end +2. FW binary downloading over URL: error +3. FW binary installation: start/end +4. FW binary installation: error + +###### Table 1: Event logging + +| Event | Severity | +|:------------------------------------------|:---------| +| FW binary downloading over URL: start/end | NOTICE | +| FW binary downloading over URL: error | ERROR | +| FW binary installation: start/end | INFO | +| FW binary installation: error | ERROR | + +**Note:** Some extra information also will be logged: +1. Component location (e.g., Chassis1/Module1/BIOS) +2. Operation result (e.g., success/failure) + +# 2 Design + +## 2.1 Overview + +![FW utility High Level Design](images/fwutil_hld.svg "Figure 1: FW utility High Level Design") + +###### Figure 1: FW utility High Level Design + +In order to improve scalability and performance a modern network switches provide different architecture solutions: +1. Non modular chassis platforms +2. Modular chassis platforms + +Non modular chassis platforms may contain only one chassis. +A chassis may contain it's own set of components. + +Modular chassis platforms may contain only one chassis. +A chassis may contain one or more modules and it's own set of components. +Each module may contain it's own set of components. + +Basically each chassis/module may contain one or more components (e.g., BIOS/CPLD/FPGA). + +SONiC platform API provides an interface for FW maintenance operations for both modular and +non modular chassis platforms. Both modular and non modular chassis platforms share the same platform API, +but may have different implementation. + +SONiC FW utility uses platform API to interact with the various platform components. + +## 2.2 FW utility + +### 2.2.1 Command structure + +**User interface**: +``` +fwutil +|--- show +| |--- status +| |--- version +| +|--- install +| |--- chassis +| | |--- component +| | |--- fw -y|--yes +| | +| |--- module +| |--- component +| |--- fw -y|--yes +| +|--- update -y|--yes -f|--force -i|--image= +``` + +**Note:** can be absolute path or URL + +### 2.2.2 Command interface + +#### 2.2.2.1 Show commands + +##### 2.2.2.1.1 Overview + +The purpose of the show commands group is to provide an interface for: +1. FW utility related information query (version, etc.) +2. Platform components related information query (fw, etc.) + +##### 2.2.2.1.2 Description + +**The following command displays FW utility version:** +```bash +root@sonic:~# fwutil show version +fwutil version 1.0.0.0 +``` + +**The following command displays platform components and FW versions:** +1. Non modular chassis platform +```bash +root@sonic:~# fwutil show status +Chassis Module Component Version Description +-------- ------- ---------- ------------------ ------------ +Chassis1 N/A BIOS 0ACLH003_02.02.007 Chassis BIOS + CPLD 5 Chassis CPLD + FPGA 5 Chassis FPGA +``` + +2. Modular chassis platform +```bash +root@sonic:~# fwutil show status +Chassis Module Component Version Description +-------- ------- ---------- ------------------ ------------ +Chassis1 BIOS 0ACLH004_02.02.007 Chassis BIOS + CPLD 5 Chassis CPLD + FPGA 5 Chassis FPGA + Module1 CPLD 5 Module CPLD + FPGA 5 Module FPGA +``` + +#### 2.2.2.2 Install commands + +##### 2.2.2.2.1 Overview + +The purpose of the install commands group is to provide an interface +for manual FW update of various platform components. + +##### 2.2.2.2.2 Description + +**The following command installs FW:** +1. Non modular chassis platform +```bash +root@sonic:~# fwutil install chassis component BIOS fw --yes /bios.bin +... +FW update in progress ... +... +Warning: Cold reboot is required! +root@sonic:~# fwutil install chassis component CPLD fw --yes /cpld.bin +... +FW update in progress ... +... +Warning: Power cycle is required! +root@sonic:~# fwutil install chassis component FPGA fw --yes /fpga.bin +... +FW update in progress ... +... +Warning: Power cycle is required! +``` + +2. Modular chassis platform +```bash +root@sonic:~# fwutil install chassis component BIOS fw /bios.bin +New FW will be installed, continue? [y/N]: N +Aborted! +root@sonic:~# fwutil install chassis component CPLD fw /cpld.bin +New FW will be installed, continue? [y/N]: N +Aborted! +root@sonic:~# fwutil install chassis component FPGA fw /fpga.bin +New FW will be installed, continue? [y/N]: N +Aborted! +root@sonic:~# fwutil install module Module1 component CPLD fw /cpld.bin +New FW will be installed, continue? [y/N]: N +Aborted! +root@sonic:~# fwutil install module Module1 component FPGA fw /fpga.bin +New FW will be installed, continue? [y/N]: N +Aborted! +``` + +**Supported options:** +1. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively + +#### 2.2.2.3 Update commands + +##### 2.2.2.3.1 Overview + +The purpose of the update commands group is to provide an interface +for automatic FW update of all available platform components. + +Automatic FW update requires platform_components.json to be created and placed at: +_sonic-buildimage/device///platform_components.json_ + +**Example:** +1. Non modular chassis platform +```json +{ + "chassis": { + "Chassis1": { + "component": { + "BIOS": { + "firmware": "/etc//fw//chassis1/bios.bin", + "version": "0ACLH003_02.02.010", + "info": "Cold reboot is required" + }, + "CPLD": { + "firmware": "/etc//fw//chassis1/cpld.bin", + "version": "10", + "info": "Power cycle is required" + }, + "FPGA": { + "firmware": "/etc//fw//chassis1/fpga.bin", + "version": "5", + "info": "Power cycle is required" + } + } + } + } +} +``` + +2. Modular chassis platform +```json +{ + "chassis": { + "Chassis1": { + "component": { + "BIOS": { + "firmware": "/etc//fw//chassis1/bios.bin", + "version": "0ACLH003_02.02.010", + "info": "Cold reboot is required" + }, + "CPLD": { + "firmware": "/etc//fw//chassis1/cpld.bin", + "version": "10", + "info": "Power cycle is required" + }, + "FPGA": { + "firmware": "/etc//fw//chassis1/fpga.bin", + "version": "5", + "info": "Power cycle is required" + } + } + } + }, + "module": { + "Module1": { + "component": { + "CPLD": { + "firmware": "/etc//fw//module1/cpld.bin", + "version": "10", + "info": "Power cycle is required" + }, + "FPGA": { + "firmware": "/etc//fw//module1/fpga.bin", + "version": "5", + "info": "Power cycle is required" + } + } + } + } +} +``` + +**Note:** FW update will be skipped if component definition is not provided (e.g., 'BIOS': { }) + +##### 2.2.2.3.2 Description + +**The following command updates FW of all available platform components:** +1. Non modular chassis platform +```bash +root@sonic:~# fwutil update --image=next +Chassis Module Component Firmware Version Status Info +-------- ------- ---------- --------------------- --------------------------------------- ------------------ ----------------------- +Chassis1 N/A BIOS /bios.bin 0ACLH004_02.02.007 / 0ACLH004_02.02.010 update is required Cold reboot is required + CPLD /cpld.bin 5 / 10 update is required Power cycle is required + FPGA /fpga.bin 5 / 5 up-to-date Power cycle is required +New FW will be installed, continue? [y/N]: y + +... +FW update in progress ... +... + +Summary: + +Chassis Module Component Status +-------- ------- ---------- ---------- +Chassis1 N/A BIOS success + CPLD failure + FPGA up-to-date +``` + +2. Modular chassis platform +```bash +root@sonic:~# fwutil update --image=next +Chassis Module Component Firmware Version Status Info +-------- ------- ---------- --------------------- --------------------------------------- ------------------ ----------------------- +Chassis1 BIOS /bios.bin 0ACLH004_02.02.007 / 0ACLH004_02.02.010 update is required Cold reboot is required + CPLD /cpld.bin 5 / 10 update is required Power cycle is required + FPGA /fpga.bin 5 / 5 up-to-date Power cycle is required + Module1 CPLD /cpld.bin 5 / 10 update is required Power cycle is required + FPGA /fpga.bin 5 / 5 up-to-date Power cycle is required +New FW will be installed, continue? [y/N]: y + +... +FW update in progress ... +... + +Summary: + +Chassis Module Component Status +-------- ------- ---------- ---------- +Chassis1 BIOS success + CPLD success + FPGA up-to-date + Module1 CPLD failure + FPGA up-to-date +``` + +**Supported options:** +1. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively +2. -f|--force - install FW regardless the current version +3. -i|--image - update FW using current/next SONiC image + +**Note:** the default option is _--image=current_ + +# 3 Flows + +## 3.1 Show components status + +![Show components status flow](images/show_status_flow.svg "Figure 2: Show components status flow") + +###### Figure 2: Show components status flow + +## 3.2 Install component FW + +### 3.2.1 Non modular chassis platform + +![FW install (non modular) flow](images/install_non_modular_flow.svg "Figure 3: FW install (non modular) flow") + +###### Figure 3: FW install (non modular) flow + +### 3.2.2 Modular chassis platform + +![FW install (modular) flow](images/install_modular_flow.svg "Figure 4: FW install (modular) flow") + +###### Figure 4: FW install (modular) flow + +# 4 Tests + +## 4.1 Unit tests + +1. Show FW utility version +2. Show components status +3. Install new BIOS/CPLD/FPGA FW on non modular chassis +4. Install new BIOS/CPLD/FPGA FW on modular chassis +5. Update FW on all available platform components diff --git a/doc/fwutil/images/fwutil_hld.svg b/doc/fwutil/images/fwutil_hld.svg new file mode 100755 index 0000000000..7948300504 --- /dev/null +++ b/doc/fwutil/images/fwutil_hld.svg @@ -0,0 +1,609 @@ + + + + + fwutil hld + + + + + + + + + + + + + + Page-11 + + + Rectangle + + + + + + + Rounded Rectangle.42 + DEVICE API + + + + + + + + + + + + + + + + + + + + + + DEVICE API + + Rectangle.43 + get_name + + + + + + + get_name + + Rectangle.4 + get_presence + + + + + + + get_presence + + Rectangle.5 + get_model + + + + + + + get_model + + Rectangle.49 + get_serial + + + + + + + get_serial + + Rectangle.50 + get_status + + + + + + + get_status + + Rectangle.105 + FW Utility + + + + + + + FW Utility + + Simple Double Arrow.106 + + + + + + + + Rectangle.10 + + + + + + + Rectangle.11 + platform_base.py + + + + + + + platform_base.py + + Rounded Rectangle.52 + CHASSIS API + + + + + + + + + + + + + + + + + + + + + + CHASSIS API + + Rectangle.53 + get_chassis + + + + + + + get_chassis + + Rectangle.64 + + + + + + + Rounded Rectangle.70 + DEVICE API + + + + + + + + + + + + + + + + + + + + + + DEVICE API + + Rectangle.71 + get_name + + + + + + + get_name + + Rectangle.72 + get_presence + + + + + + + get_presence + + Rectangle.73 + get_model + + + + + + + get_model + + Rectangle.74 + get_serial + + + + + + + get_serial + + Rectangle.75 + get_status + + + + + + + get_status + + Rectangle.113 + chassis_base.py + + + + + + + chassis_base.py + + Rounded Rectangle.123 + COMPONENT API + + + + + + + + + + + + + + + + + + + + + + COMPONENT API + + Rectangle.124 + get_num_components + + + + + + + get_num_components + + Rectangle.125 + get_all_component + + + + + + + get_all_component + + Rectangle.126 + get_component + + + + + + + get_component + + Rectangle.127 + + + + + + + Rounded Rectangle.128 + API + + + + + + + + + + + + + + + + + + + + + + API + + Rectangle.129 + get_name + + + + + + + get_name + + Rectangle.130 + get_description + + + + + + + get_description + + Rectangle.131 + get_firmware_version + + + + + + + get_firmware_version + + Rectangle.132 + component_base.py + + + + + + + component_base.py + + Rectangle.134 + HW + + + + + + + HW + + Simple Double Arrow.138 + + + + + + + + Simple Double Arrow.139 + + + + + + + + Rectangle.143 + install_firmware + + + + + + + install_firmware + + Simple Double Arrow.154 + + + + + + + + Rounded Rectangle.155 + COMPONENT API + + + + + + + + + + + + + + + + + + + + + + COMPONENT API + + Rectangle.156 + get_num_components + + + + + + + get_num_components + + Rectangle.157 + get_all_component + + + + + + + get_all_component + + Rectangle.158 + get_component + + + + + + + get_component + + Simple Double Arrow.160 + + + + + + + + Simple Double Arrow.161 + + + + + + + + Rounded Rectangle.72 + MODULE API + + + + + + + + + + + + + + + + + + + + + + MODULE API + + Rectangle.16 + get_num_modules + + + + + + + get_num_modules + + Rectangle.17 + get_all_modules + + + + + + + get_all_modules + + Rectangle.18 + get_module + + + + + + + get_module + + Rectangle.65 + module_base.py + + + + + + + module_base.py + + diff --git a/doc/fwutil/images/install_modular_flow.svg b/doc/fwutil/images/install_modular_flow.svg new file mode 100755 index 0000000000..0ac6d3f780 --- /dev/null +++ b/doc/fwutil/images/install_modular_flow.svg @@ -0,0 +1,947 @@ + + + + + fwutil flows + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-4 + + + + + + + + + + + Actor lifeline.115 + FW Utility + + Sheet.2 + + + + Sheet.3 + + + + Sheet.4 + + + Sheet.5 + + + + + + + FW Utility + + + + + + + + + Object lifeline.120 + platform : PlatformBase<Object> + + Sheet.7 + + + + Sheet.8 + + + + Sheet.9 + + + Sheet.10 + + + + + + + platform : PlatformBase<Object> + + + + + + + + + Object lifeline.125 + chassis : ChassisBase<DeviceBase> + + Sheet.12 + + + + Sheet.13 + + + + Sheet.14 + + + Sheet.15 + + + + + + + chassis : ChassisBase<DeviceBase> + + + Activation.131 + + + + + + + + Message.133 + <platform>.get_chassis() + + + + + + + + + + + + <platform>.get_chassis() + + Return Message.134 + return <chassis> + + + + + + + + + + + + return <chassis> + + + + + + + + Object lifeline.138 + module : ModuleBase<DeviceBase> + + Sheet.20 + + + + Sheet.21 + + + + Sheet.22 + + + Sheet.23 + + + + + + + module : ModuleBase<DeviceBase> + + + Message.162 + <chassis>.get_name() + + + + + + + + + + + + <chassis>.get_name() + + Return Message.164 + return <chassis_name> + + + + + + + + + + + + return <chassis_name> + + Activation.168 + + + + + + + + Activation.169 + + + + + + + + Activation.170 + + + + + + + + Activation.255 + + + + + + + + Activation.256 + + + + + + + + Message.257 + <chassis>.get_all_modules() + + + + + + + + + + + + <chassis>.get_all_modules() + + Return Message.258 + return <module_list> + + + + + + + + + + + + return <module_list> + + + + + + Optional fragment.737 + + + + + Sheet.34 + opt + + + + + + + + + + + + + + + opt + + Sheet.35 + [ if <chassis_name> is found ] + + + + + + [ if <chassis_name> is found ] + + + + + + + Loop fragment.946 + + + + + Sheet.37 + loop + + + + + + + + + + + + + + + loop + + Sheet.38 + [ for module in <module_list> ] + + + + + + [ for module in <module_list> ] + + + Message.952 + <module>.get_name() + + + + + + + + + + + + <module>.get_name() + + Return Message.953 + return <module_name> + + + + + + + + + + + + return <module_name> + + Activation.954 + + + + + + + + Activation.955 + + + + + + + + + + + + Optional fragment.956 + + + + + Sheet.44 + opt + + + + + + + + + + + + + + + opt + + Sheet.45 + [ if <module_name> is found ] + + + + + + [ if <module_name> is found ] + + + Activation.961 + + + + + + + + Message.963 + <module>.get_all_components() + + + + + + + + + + + + <module>.get_all_components() + + Return Message.964 + return <component_list> + + + + + + + + + + + + return <component_list> + + + + + + Optional fragment.965 + + + + + Sheet.50 + opt + + + + + + + + + + + + + + + opt + + Sheet.51 + [ if <image_path> not exists ] ] + + + + + + [ if <image_path> not exists ] ] + + + Activation.968 + + + + + + + + Self Message.969 + handle_error() + + + + + + + + + + + + handle_error() + + Activation.970 + + + + + + + + Message.971 + <component>.install_firmware(<image_path>) + + + + + + + + + + + + <component>.install_firmware(<image_path>) + + Return Message.973 + return <result> + + + + + + + + + + + + return <result> + + Activation.974 + + + + + + + + Self Message.975 + show_result(<chassis_name>,<module_name>,<component_name>,<im... + + + + + + + + + + + + show_result(<chassis_name>,<module_name>,<component_name>,<image_path>,<result>) + + + + + + Optional fragment.980 + + + + + Sheet.60 + opt + + + + + + + + + + + + + + + opt + + Sheet.61 + [ if <chassis_name> is not found ] + + + + + + [ if <chassis_name> is not found ] + + + Activation.983 + + + + + + + + Self Message.984 + handle_error() + + + + + + + + + + + + handle_error() + + + + + + Optional fragment.985 + + + + + Sheet.65 + opt + + + + + + + + + + + + + + + opt + + Sheet.66 + [ if <module_name> is not found ] + + + + + + [ if <module_name> is not found ] + + + Activation.988 + + + + + + + + Self Message.989 + handle_error() + + + + + + + + + + + + handle_error() + + + + + + + + Object lifeline.1030 + сomponent : ComponentBase<Object> + + Sheet.70 + + + + Sheet.71 + + + + Sheet.72 + + + Sheet.73 + + + + + + + сomponent : ComponentBase<Object> + + + + + + + Loop fragment.1039 + + + + + Sheet.75 + loop + + + + + + + + + + + + + + + loop + + Sheet.76 + [ for component in <component_list> ] + + + + + + [ for component in <component_list> ] + + + + + + + Optional fragment.1044 + + + + + Sheet.78 + opt + + + + + + + + + + + + + + + opt + + Sheet.79 + [ if <component_name> is not found ] + + + + + + [ if <component_name> is not found ] + + + Activation.1047 + + + + + + + + Self Message.1048 + handle_error() + + + + + + + + + + + + handle_error() + + Activation.972 + + + + + + + + Activation.962 + + + + + + + + + + + + Optional fragment.1051 + + + + + Sheet.85 + opt + + + + + + + + + + + + + + + opt + + Sheet.86 + [ if <component_name> is found ] + + + + + + [ if <component_name> is found ] + + + diff --git a/doc/fwutil/images/install_non_modular_flow.svg b/doc/fwutil/images/install_non_modular_flow.svg new file mode 100755 index 0000000000..c0f25a64fc --- /dev/null +++ b/doc/fwutil/images/install_non_modular_flow.svg @@ -0,0 +1,739 @@ + + + + + fwutil flows + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-4 + + + + + + + + + + + Actor lifeline.474 + FW Utility + + Sheet.2 + + + + Sheet.3 + + + + Sheet.4 + + + Sheet.5 + + + + + + + FW Utility + + + + + + + + + Object lifeline.479 + platform : PlatformBase<Object> + + Sheet.7 + + + + Sheet.8 + + + + Sheet.9 + + + Sheet.10 + + + + + + + platform :PlatformBase<Object> + + + + + + + + + Object lifeline.484 + chassis : ChassisBase<DeviceBase> + + Sheet.12 + + + + Sheet.13 + + + + Sheet.14 + + + Sheet.15 + + + + + + + chassis :ChassisBase<DeviceBase> + + + Activation.489 + + + + + + + + Message.490 + <platform>.get_chassis() + + + + + + + + + + + + <platform>.get_chassis() + + Return Message.491 + return <chassis> + + + + + + + + + + + + return <chassis> + + Message.508 + <chassis>.get_name() + + + + + + + + + + + + <chassis>.get_name() + + Return Message.509 + return <chassis_name> + + + + + + + + + + + + return <chassis_name> + + Activation.510 + + + + + + + + Activation.511 + + + + + + + + Activation.512 + + + + + + + + + + + + Optional fragment.541 + + + + + Sheet.25 + opt + + + + + + + + + + + + + + + opt + + Sheet.26 + [ if <chassis_name> is found ] + + + + + + [ if <chassis_name> is found ] + + + Activation.928 + + + + + + + + Activation.929 + + + + + + + + Message.930 + <chassis>.get_all_components() + + + + + + + + + + + + <chassis>.get_all_components() + + Return Message.931 + return <component_list> + + + + + + + + + + + + return <component_list> + + + + + + Optional fragment.932 + + + + + Sheet.32 + opt + + + + + + + + + + + + + + + opt + + Sheet.33 + [ if <image_path> not exists ] ] + + + + + + [ if <image_path> not exists ] ] + + + Activation.935 + + + + + + + + Self Message.936 + handle_error() + + + + + + + + + + + + handle_error() + + Activation.937 + + + + + + + + Message.938 + <component>.install_firmware(<image_path>) + + + + + + + + + + + + <component>.install_firmware(<image_path>) + + Return Message.940 + return <result> + + + + + + + + + + + + return <result> + + + + + + Optional fragment.990 + + + + + Sheet.40 + opt + + + + + + + + + + + + + + + opt + + Sheet.41 + [ if <chassis_name> is not found ] + + + + + + [ if <chassis_name> is not found ] + + + Activation.993 + + + + + + + + Self Message.994 + handle_error() + + + + + + + + + + + + handle_error() + + Activation.995 + + + + + + + + Self Message.996 + show_result(<chassis_name>,<component_name>,<image_path>,<res... + + + + + + + + + + + + show_result(<chassis_name>,<component_name>,<image_path>,<result>) + + + + + + + + Object lifeline.999 + сomponent : ComponentBase<Object> + + Sheet.47 + + + + Sheet.48 + + + + Sheet.49 + + + Sheet.50 + + + + + + + сomponent : ComponentBase<Object> + + + + + + + Loop fragment.1006 + + + + + Sheet.52 + loop + + + + + + + + + + + + + + + loop + + Sheet.53 + [ for component in <component_list> ] + + + + + + [ for component in <component_list> ] + + + Message.1011 + <component>.get_name() + + + + + + + + + + + + <component>.get_name() + + Return Message.1012 + return <component_name> + + + + + + + + + + + + return <component_name> + + Activation.1013 + + + + + + + + Activation.1014 + + + + + + + + + + + + Optional fragment.1017 + + + + + Sheet.59 + opt + + + + + + + + + + + + + + + opt + + Sheet.60 + [ if <component_name> is found ] + + + + + + [ if <component_name> is found ] + + + + + + + Optional fragment.1024 + + + + + Sheet.62 + opt + + + + + + + + + + + + + + + opt + + Sheet.63 + [ if <component_name> is not found ] + + + + + + [ if <component_name> is not found ] + + + Activation.1027 + + + + + + + + Self Message.1028 + handle_error() + + + + + + + + + + + + handle_error() + + Activation.939 + + + + + + + + diff --git a/doc/fwutil/images/show_status_flow.svg b/doc/fwutil/images/show_status_flow.svg new file mode 100755 index 0000000000..3f355dfc37 --- /dev/null +++ b/doc/fwutil/images/show_status_flow.svg @@ -0,0 +1,970 @@ + + + + + fwutil flows + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-4 + + + + + + + + + + + Actor lifeline.764 + FW Utility + + Sheet.2 + + + + Sheet.3 + + + + Sheet.4 + + + Sheet.5 + + + + + + + FW Utility + + + + + + + + + Object lifeline.769 + platform : PlatformBase<Object> + + Sheet.7 + + + + Sheet.8 + + + + Sheet.9 + + + Sheet.10 + + + + + + + platform : PlatformBase<Object> + + + + + + + + + Object lifeline.774 + chassis : ChassisBase<DeviceBase> + + Sheet.12 + + + + Sheet.13 + + + + Sheet.14 + + + Sheet.15 + + + + + + + chassis : ChassisBase<DeviceBase> + + + Activation.779 + + + + + + + + Message.780 + <platform>.get_chassis() + + + + + + + + + + + + <platform>.get_chassis() + + Return Message.781 + return <chassis> + + + + + + + + + + + + return <chassis> + + + + + + + + Object lifeline.782 + module : ModuleBase<DeviceBase> + + Sheet.20 + + + + Sheet.21 + + + + Sheet.22 + + + Sheet.23 + + + + + + + module : ModuleBase<DeviceBase> + + + Activation.795 + + + + + + + + Message.845 + <chassis>.get_name() + + + + + + + + + + + + <chassis>.get_name() + + Return Message.846 + return <chassis_name> + + + + + + + + + + + + return <chassis_name> + + Activation.847 + + + + + + + + Activation.848 + + + + + + + + + + + + Loop fragment.851 + + + + + Sheet.30 + loop + + + + + + + + + + + + + + + loop + + Sheet.31 + [ for module in <module_list> ] + + + + + + [ for module in <module_list> ] + + + Message.856 + <module>.get_name() + + + + + + + + + + + + <module>.get_name() + + Return Message.857 + return <module_name> + + + + + + + + + + + + return <module_name> + + Activation.858 + + + + + + + + Activation.859 + + + + + + + + Activation.863 + + + + + + + + Activation.864 + + + + + + + + Message.865 + <module>.get_all_components() + + + + + + + + + + + + <module>.get_all_components() + + Return Message.866 + return <component_list> + + + + + + + + + + + + return <component_list> + + Activation.868 + + + + + + + + Self Message.869 + show_status(<chassis_component_map>,<module_component_map>) + + + + + + + + + + + + show_status(<chassis_component_map>,<module_component_map>) + + Activation.872 + + + + + + + + Activation.873 + + + + + + + + Message.874 + <chassis>.get_all_components() + + + + + + + + + + + + <chassis>.get_all_components() + + Return Message.875 + return <component_list> + + + + + + + + + + + + return <component_list> + + + + + + Loop fragment.877 + + + + + Sheet.47 + loop + + + + + + + + + + + + + + + loop + + Sheet.48 + [ for component in <component_list> ] + + + + + + [ for component in <component_list> ] + + + Activation.884 + + + + + + + + Self Message.885 + chassis_component_map[<chassis_name>][<component_name>] = (<f... + + + + + + + + + + + + chassis_component_map[<chassis_name>][<component_name>] = (<firmware_version>,<description>) + + Message.889 + <component>.get_firmware_version() + + + + + + + + + + + + <component>.get_firmware_version() + + Return Message.890 + return <firmware_version> + + + + + + + + + + + + return <firmware_version> + + Activation.891 + + + + + + + + Activation.898 + + + + + + + + Activation.899 + + + + + + + + Message.900 + <chassis>.get_all_modules() + + + + + + + + + + + + <chassis>.get_all_modules() + + Return Message.901 + return <module_list> + + + + + + + + + + + + return <module_list> + + + + + + + + Object lifeline.1062 + сomponent : ComponentBase<Object> + + Sheet.59 + + + + Sheet.60 + + + + Sheet.61 + + + Sheet.62 + + + + + + + сomponent : ComponentBase<Object> + + + Message.1072 + <component>.get_description() + + + + + + + + + + + + <component>.get_description() + + Return Message.1073 + return <description> + + + + + + + + + + + + return <description> + + Activation.1074 + + + + + + + + Activation.1075 + + + + + + + + Activation.892 + + + + + + + + Message.1078 + <component>.get_name() + + + + + + + + + + + + <component>.get_name() + + Return Message.1079 + return <component_name> + + + + + + + + + + + + return <component_name> + + Activation.1080 + + + + + + + + Activation.1081 + + + + + + + + + + + + Loop fragment.1083 + + + + + Sheet.73 + loop + + + + + + + + + + + + + + + loop + + Sheet.74 + [ for component in <component_list> ] + + + + + + [ for component in <component_list> ] + + + Activation.1086 + + + + + + + + Self Message.1087 + module_component_map[<chassis_name>][<module_name>][<componen... + + + + + + + + + + + + module_component_map[<chassis_name>][<module_name>][<component_name>] = (<firmware_version>,<description>) + + Message.1088 + <component>.get_firmware_version() + + + + + + + + + + + + <component>.get_firmware_version() + + Return Message.1089 + return <firmware_version> + + + + + + + + + + + + return <firmware_version> + + Activation.1090 + + + + + + + + Message.1091 + <component>.get_description() + + + + + + + + + + + + <component>.get_description() + + Return Message.1092 + return <description> + + + + + + + + + + + + return <description> + + Activation.1093 + + + + + + + + Activation.1094 + + + + + + + + Activation.1095 + + + + + + + + Message.1096 + <component>.get_name() + + + + + + + + + + + + <component>.get_name() + + Return Message.1097 + return <component_name> + + + + + + + + + + + + return <component_name> + + Activation.1098 + + + + + + + + Activation.1099 + + + + + + + +