Script which build automatically all elements in Netbox using API request and Python language
Tested with:
- Netbox v2.9.2
- Python 3.6.8
- check diagram folder for topology example
- check 'config/variables.yaml' file to set what you need
- edit variables (you can add additional parameters from API syntax)
- run:
bash# cd /opt/python-netbox-onboarding
bash# python3 configure_netbox.py -h
usage: configure_netbox.py [-h] [-c CONFIG]
optional arguments:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
YAML File with configuration (default='config/variables.yaml')
YAML Config example: https://github.com/azdolinski/python-netbox-onboarding/blob/master/config/variables.yaml
Include predefined device types (like: , , etc.) from official repo:
To sync this project with netbox-comunity devicetype-library:
yum install -y unzip
cd /opt/python-netbox-onboarding/config/devicetypes
wget https://github.com/netbox-community/devicetype-library/archive/master.zip -O /tmp/master.zip
unzip /tmp/master.zip -d /tmp/
cp -R /tmp/devicetype-library-master/device-types/* /opt/python-netbox-onboarding/config/devicetypes