# V_3.17i
# Firmware update tool package:
# This tool is designed to support automated firmware(bootloader/bios/bmc/fpga/cpld) of nodes in a cluster.
# This package includes script and the latest firmwares for C4K, C5K, C6K, and C8K.
# All C4K/C5K/C6K/C8K node in a cluster will be updated with the firmware in this package.

# EXECUTION :
# This is python based plain script, so installation is not required.
# This script can be executed on Cohesity cluster environment,
# but firmware update only can be proceeded on C4K, C5K, C6K, and C8K.
# You shouldn't run this script with sudo permission.

# MAIN FUNCTION :
# list_node : list status of all nodes in cluster
# update_node : update firmwares of target node

# EXAMPLE :
# ./firmware_update_tool.py list_node  (this will display available information of all nodes)
# ./firmware_update_tool.py update_node all (update all nodes)
# ./firmware_udpate_tool.py update_node xxx.xx.x.x (update a target node which ip address is xxx.xx.x.x)
# ./firmware_update_tool.py update_node xxx.xx.x.x,yy.yyy.yy.yyy (update xxx.xx.x.x and yy.yyy.yy.yyy)
# If iris_cli username and password are changed, please add -u '[USERNAME]' -p '[PASSWORD]' option

# CONTACT :
# If you have any problems or questions, please contact nexus-hq

# Firmware version
# C4K: bios(3.04)/bmc(1.60)/BL(1.06)/fpga(1.32)/nvram(7.0)/cpld(1.08)
# C5K: bios(1.16)/bmc(1.26)/BL(1.00)/fpga(0.36)/nvram(30.0)/cpld(0.26)
# C6K: bios(3B20.01)/bmc(4.67)
# C8K: bios(3.15)/bmc(3.28)/bpcpld(0204)/cpld(fafa)

# release history
# v 3.17i : C6K BMC(4.67, Fan profile chage)
# v 3.17h : C6K BMC(4.66, disable ssh)
# v 3.17g : C8K BMC(3.28, disable ssh, disable TLS 1/1.1)
#           C5K BMC(1.26, fine tune fan speed control)
# v 3.17f : C4K BMC(1.60, disable ssh)
# v 3.17e : C5K BMC(1.24, disable ssh)
#           Increase upgrade done check timeout to 60s
# v 3.17d : C6K BMC(4.65)
# v 3.17c : C8K BMC(3.26)
# v 3.17b : use node_start.sh instead of node_restart.sh
# v 3.17a : C5K BMC(1.22)
# v 3.17  : C4K BMC(1.58)
#           C8K unassigned logger issue fix
# v 3.16b : Fix script hang issue (ENG-315605)
# v 3.15  : Improve C6K list_node processing speed
#           C4K BMC(1.56)
#           C5K FPGA(0.34)
# v 3.14  : C6K BIOS(3B20.01) and BMC(4.64)
# v 3.13  : C5K BIOS version change (v1.14 -> v1.16)
#           Handling multiple FW repository issue under /advantech
#           Fix script abort problem when product model isn't supported
#           Fix C6K remote node upgrade hang issue
# v 3.12  : Add C5K support
#           bios(1.14)/bmc(1.14)/BL(1.00)/FPGA(0.30)/BPCPLD(0.14)/NVRAM(30)
#           C6K BMC version up to 4.63
# v 3.11  : fix 'remote_ipmi_log' assignment error
# v 3.1   : Add 6.6.0c+ and 6.5.1f+ support
# v 3.0   : Add Quanta C6K support
#           Advantech phase 11 / Inventec R3.15 / Quanta 3.19
# v 2.5.4 : fix bugs (ENG-225751)
#           Advantech phase 10 / Inventec R3.15
# v 2.5.2 : support new iris_cli security policy changes in credential.
# v 2.5.1 : disable Quanta support temporarily.
#           minor bug fix for writing ipmitool logs.
# v 2.5   : Add Quanta support
# v 2.4   : Advantech pahse 10(V3.02) support
# v 2.3   : Inventec Denali R3.14
# v 2.2   : Advantech phase 8(V2.28) support
# v 2.1   : Add precheck existing fw update process in other nodes
# v 2.0   : Add Inventec support R3.13
# v 1.02  : Advantech new firmware release - bios(2.24), fpga(1.20), nvram(6.0)
# v 1.01  : Error handling enhancement, adding retry
# v 1.0   : initial release
