Create a virtual environment python3 -m venv .venv, source it source .venv/bin/activate.
Then install the projects dependencies pip install -r requirements.txt.
Copy the .env.example to .env cp .env.example .env, and set your configuration.
Run the server python3 main.py.
You need to add a couple of custom fields in netbox on the device context:
- installed_image
- installed_image_version
And a couple of custom fields on the device type context:
- latest_image
- latest_image_version
- latest_image_checksum (optional)
You also need to add a few tags:
- config-needed
- configured
- image-needed
- image-updated
- install-image
You also need to configure option 43 on the DHCP server for the PnP network, this is how I've done mine.
5A1D;K4;B2;I<serverip>;J5000
Assign the device config-needed tag and it will (if your config doesn't contains errors, ask me how I know) update the running config of the switch.
If the device doesn't have the latest image (specified on the device type) it will automatically be tagged with image-needed tag. This is only for filtering purposes. If you however add the tag install-image the switch will update the image and reboot.
Upload the image to the images folder on the server, and reference the full filename on the Device type in netbox. Like this:
When the switch first starts up it will register with the custom fields added:
This project is based on dmfigol's cisco-pnp-server from the article at netboxlabs and Cisco day0 provisioning.

