Added device type interface startup script and sample YAML initializer
Renumber startup scripts to place platform initialization before the devices to enable platform specification during device creation
This commit is contained in:
parent
61a3afbb3b
commit
036d3f881e
23 changed files with 45 additions and 0 deletions
15
startup_scripts/260_rirs.py
Normal file
15
startup_scripts/260_rirs.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
import sys
|
||||
|
||||
from ipam.models import RIR
|
||||
from startup_script_utils import load_yaml
|
||||
|
||||
rirs = load_yaml("/opt/netbox/initializers/rirs.yml")
|
||||
|
||||
if rirs is None:
|
||||
sys.exit()
|
||||
|
||||
for params in rirs:
|
||||
rir, created = RIR.objects.get_or_create(**params)
|
||||
|
||||
if created:
|
||||
print("🗺️ Created RIR", rir.name)
|
Loading…
Add table
Add a link
Reference in a new issue