Commit 4aa512c
authored
[sfputil] Firmware download/upgrade CLI support for QSFP-DD (sonic-net#1947) (sonic-net#2349)
* [sfputil] Firmware download/upgrade CLI support for QSFP-DD (sonic-net#1947)
- Description
Checking that the running image is switched or not after CDB_run during firmware upgrade process.
- Motivation and Context
CDB_run will maybe cause several seconds NACK or stretching on i2c bus which depend on the implementation of module vendor, checking the status after CDB_run for compatible with different implementation.
* Update unit tests for sfputil.
Test : Creating "is_fw_switch_done" test, this function expected to return 1 when 'status' == True and running image('result'[1, 5]) different with committed('result'[2, 6]) one, otherwise return -1.
* [sfputil] Firmware download/upgrade CLI support for QSFP-DD (sonic-net#1947)
- Description
Adding error judgements in "is_fw_switch_done" function.
Update unit tests for "is_fw_switch_done".
- Motivation and Context
Checking status of images to avoid committing image with a wrong status.
* [sfputil] Firmware download/upgrade CLI support for QSFP-DD (sonic-net#1947)
Fixing : Comparing error code with a wrong variable.
Refactor : Renaming variables for more suitable its purpose.
Refactor : Removing if case which is low correlation with function.
Feat : Adding "echo" to display detail result.
* Update unit tests for sfputil.
* [sfputil] Firmware download/upgrade CLI support for QSFP-DD (sonic-net#1947)
Feat : Reducing frequency of check during "is_fw_switch_done".
Refactor : Removing a repeated line.1 parent f63ef9a commit 4aa512c
2 files changed
+81
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1244 | 1244 | | |
1245 | 1245 | | |
1246 | 1246 | | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
1247 | 1300 | | |
1248 | 1301 | | |
1249 | 1302 | | |
| |||
1412 | 1465 | | |
1413 | 1466 | | |
1414 | 1467 | | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
1415 | 1472 | | |
1416 | 1473 | | |
1417 | 1474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
706 | 706 | | |
707 | 707 | | |
708 | 708 | | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
709 | 733 | | |
710 | 734 | | |
711 | 735 | | |
| |||
0 commit comments