For most vendors it is possible to do a firmware upgrade at initial boot/ZTP so that every switch that is added to the network will have a certain baseline of firmware and features that you can use in templates.

Arista

For Arista devices this is accomplished by pointing the DHCP options to a simple script instead of a plain text config file.

This is an example dhcp-init-script:

#!/usr/bin/Cli -p2
enable
copy http://<nms-ip>templates/eos/dhcp-init.j2 flash:startup-config
copy https://<front-ip>/firmware/EOS-stable.swi flash:EOS-stable.swi
config
boot system flash:EOS-stable.swi

This script should be saved as "eos/dhcp-init-script" in the templates repository. Make sure eos/dhcp-init.j2 in the script matches your plain text initial config file.

After you commit and push this script, make sure that you restart the cnaas_httpd container so that it will refresh the templates.

You will also need to create a symlink for "EOS-stable.swi" pointing to some EOS version of your preference in the cnaas_httpd container:

docker exec -ti cnaas_cnaas_httpd_1 bash
cd /opt/cnaas/www/firmware/
ln -s EOS-4.25.2F.swi EOS-stable.swi

Next you have to change in the dhcpd/dhcpd.conf file in the etc reposity, it should now point to dhcp-init-script instead of dhcp-init.j2:

  option bootfile-name "http://<nms-ip>/templates/eos/dhcp-init-script";

And remember to also restart the cnaas_dhcpd container after you commit and push so that it will use the new dhcpd.config file.

Cisco

Separate DHCP option?

Juniper

?