ZTP Boot File
The boot file is written in YAML and contains switch models, and under each switch model are several fields that instruct the ZTP process. The boot file may contain up to four fields under each switch model:
Image - This instructs ZTP to update the switch firmware image to the specified image and configure it as the next boot image on the switch
Configuration - This instructs ZTP to copy the specified configuration file from the TFTP (or HTTP) server and use it as the startup configuration file on the switch. The file should be renamed to iscli_db.cfg
Script - This instructs ZTP to copy the script file and execute it on the switch
Reboot - This instructs whether to reboot the switch after ZTP
ZTP checks the boot file for the switch model and executes it according to the fields under the correct switch model. ZTP supports the execution of Python scripts, If there is a script field under the switch model in the boot file, that field has a higher priority than the other two fields (image and configuration), thus ZTP executes it first. ZTP downloads the Python script file to the switch and executes it. The script can also contain instructions to download and install a switch firmware image and a configuration file. Users can leave some of the fields empty, ZTP will just skip the corresponding options.
The platform or hardware model should be taken from the “show platform summary”
The following example shows a boot file for a TFTP server:
The following example shows a boot file for an HTTP server: