mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2025-08-09 00:04:46 +02:00
Fixed further requirements.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
from dcim.models import Site
|
||||
from ipam.models import VLAN, VLANGroup, Role
|
||||
from ipam.constants import VLAN_STATUS_CHOICES
|
||||
from tenancy.models import Tenant, TenantGroup
|
||||
from extras.models import CustomField, CustomFieldValue
|
||||
from ruamel.yaml import YAML
|
||||
@ -34,6 +35,11 @@ with file.open('r') as stream:
|
||||
|
||||
params[assoc] = model.objects.get(**query)
|
||||
|
||||
if 'status' in params:
|
||||
for vlan_status in VLAN_STATUS_CHOICES:
|
||||
if params['status'] in vlan_status:
|
||||
params['status'] = vlan_status[0]
|
||||
|
||||
vlan, created = VLAN.objects.get_or_create(**params)
|
||||
|
||||
if created:
|
||||
|
Reference in New Issue
Block a user