Diode is a NetBox data ingestion service that greatly simplifies and enhances the process to add and update network data in NetBox, ensuring your network source of truth is always accurate and can be trusted to power your network automation pipelines. Our guiding principle in designing Diode has been to make it as easy as possible to get data into NetBox, removing as much burden as possible from the user while shifting that effort to technology.
See the main Diode project page to find more details and additional resources.
To use the examples in this repository, you'll need to install the Diode SDK.
Pre-requisites:
- Python >= 3.10
- Create a virtual environment and activate it:
python3 -m venv venv
source venv/bin/activate
- Upgrade pip:
python3 -m pip install --upgrade pip
- Install the Diode SDK:
pip install netboxlabs-diode-sdk
- Set the following environment variables:
export DIODE_API_KEY=<generated when configuring your Diode plugin>
All scripts have an optional flags:
--target TARGET the target address of the Diode server (default: grpc://localhost:8080/diode)
--apply apply the changes (default: False)
Parses a CSV file and extracts information about the device and ingests it into NetBox using the Diode SDK.
python3 examples/csv/main.py [--target TARGET] [--apply]
Parses a Containerlab configuration file and extracts information about the device and its interfaces, including IP addresses and ingests it into NetBox using the Diode SDK.
python3 examples/containerlab/main.py [--target TARGET] [--apply]
Parses Cisco IOS configuration file and extracts information about the device and its interfaces, including IP addresses and ingests it into NetBox using the Diode SDK.
Requires additional dependencies:
pip install ciscoconfparse2
python3 examples/cisco_ios/main.py [--target TARGET] [--apply]