diff --git a/initializers/virtualization_interfaces.yml b/initializers/virtualization_interfaces.yml index 15a64ab..deff914 100644 --- a/initializers/virtualization_interfaces.yml +++ b/initializers/virtualization_interfaces.yml @@ -9,4 +9,4 @@ # mac_address: 00:55:55:55:55:55 # mtu: 1500 # name: Network Interface 2 -# virtual_machine: virtual_machine1 \ No newline at end of file +# virtual_machine: virtual_machine1 diff --git a/startup_scripts/210_vlans.py b/startup_scripts/210_vlans.py index c667354..e3a0ef1 100644 --- a/startup_scripts/210_vlans.py +++ b/startup_scripts/210_vlans.py @@ -39,6 +39,7 @@ with file.open('r') as stream: for vlan_status in VLAN_STATUS_CHOICES: if params['status'] in vlan_status: params['status'] = vlan_status[0] + break vlan, created = VLAN.objects.get_or_create(**params) diff --git a/startup_scripts/220_prefixes.py b/startup_scripts/220_prefixes.py index 69d78f2..a832c88 100644 --- a/startup_scripts/220_prefixes.py +++ b/startup_scripts/220_prefixes.py @@ -42,6 +42,7 @@ with file.open('r') as stream: for prefix_status in PREFIX_STATUS_CHOICES: if params['status'] in prefix_status: params['status'] = prefix_status[0] + break prefix, created = Prefix.objects.get_or_create(**params) diff --git a/startup_scripts/230_virtual_machines.py b/startup_scripts/230_virtual_machines.py index af30ee2..065b600 100644 --- a/startup_scripts/230_virtual_machines.py +++ b/startup_scripts/230_virtual_machines.py @@ -47,6 +47,7 @@ with file.open('r') as stream: for vm_status in VM_STATUS_CHOICES: if params['status'] in vm_status: params['status'] = vm_status[0] + break virtual_machine, created = VirtualMachine.objects.get_or_create(**params) diff --git a/startup_scripts/260_ip_addresses.py b/startup_scripts/260_ip_addresses.py index 589c5d3..f7f2bc7 100644 --- a/startup_scripts/260_ip_addresses.py +++ b/startup_scripts/260_ip_addresses.py @@ -53,6 +53,7 @@ with file.open('r') as stream: for ip_status in IPADDRESS_STATUS_CHOICES: if params['status'] in ip_status: params['status'] = ip_status[0] + break ip_address, created = IPAddress.objects.get_or_create(**params)