Increase order prefix to 3 digits

This commit is contained in:
Aleksandar Radunovic 2018-10-16 13:26:13 +02:00
parent 7e6edd1bf5
commit 97477556e0
11 changed files with 18 additions and 16 deletions

View file

@ -0,0 +1,14 @@
from dcim.models import Manufacturer
from ruamel.yaml import YAML
with open('/opt/netbox/initializers/manufacturers.yml', 'r') as stream:
yaml = YAML(typ='safe')
manufacturers = yaml.load(stream)
if manufacturers is not None:
for params in manufacturers:
manufacturer, created = Manufacturer.objects.get_or_create(**params)
if created:
print("Created Manufacturer", manufacturer.name)