We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45f7823 commit a9232e4Copy full SHA for a9232e4
startup_scripts/230_virtual_machines.py
@@ -1,4 +1,5 @@
1
from dcim.models import Site, Platform, DeviceRole
2
+from ipam.models import IPAddress
3
from virtualization.models import Cluster, VirtualMachine
4
from tenancy.models import Tenant
5
from extras.models import CustomField, CustomFieldValue
@@ -17,7 +18,9 @@
17
18
optional_assocs = {
19
'tenant': (Tenant, 'name'),
20
'platform': (Platform, 'name'),
- 'role': (DeviceRole, 'name')
21
+ 'role': (DeviceRole, 'name'),
22
+ 'primary_ip4': (IPAddress, 'address'),
23
+ 'primary_ip6': (IPAddress, 'address')
24
}
25
26
for params in virtual_machines:
0 commit comments