mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2025-12-10 13:52:38 +00:00
14 lines
377 B
Python
14 lines
377 B
Python
from dcim.models import Manufacturer
|
|
from startup_script_utils import load_yaml
|
|
import sys
|
|
|
|
manufacturers = load_yaml('/opt/netbox/initializers/manufacturers.yml')
|
|
|
|
if not manufacturers is None:
|
|
|
|
for params in manufacturers:
|
|
manufacturer, created = Manufacturer.objects.get_or_create(**params)
|
|
|
|
if created:
|
|
print("🏭 Created Manufacturer", manufacturer.name)
|