Skip to content

Commit 9fae2b0

Browse files
committed
Fixed VM interface creation for Netbox 2.9
1 parent 23c3240 commit 9fae2b0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

startup_scripts/240_virtualization_interfaces.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from dcim.models import Interface
2-
from virtualization.models import VirtualMachine
1+
from virtualization.models import VirtualMachine, VMInterface
32
from extras.models import CustomField, CustomFieldValue
43
from startup_script_utils import load_yaml
54
import sys
@@ -22,7 +21,7 @@
2221

2322
params[assoc] = model.objects.get(**query)
2423

25-
interface, created = Interface.objects.get_or_create(**params)
24+
interface, created = VMInterface.objects.get_or_create(**params)
2625

2726
if created:
2827
if custom_fields is not None:

0 commit comments

Comments
 (0)