mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Merge pull request #4009 from netbox-community/4006-remove-fixtures
Closes #4006: remove test fixtures
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -2,6 +2,7 @@ from django.test import TestCase
|
||||
|
||||
from dcim.forms import *
|
||||
from dcim.models import *
|
||||
from virtualization.models import Cluster, ClusterGroup, ClusterType
|
||||
|
||||
|
||||
def get_id(model, slug):
|
||||
@ -10,83 +11,108 @@ def get_id(model, slug):
|
||||
|
||||
class DeviceTestCase(TestCase):
|
||||
|
||||
fixtures = ['dcim', 'ipam', 'virtualization']
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
|
||||
site = Site.objects.create(name='Site 1', slug='site-1')
|
||||
rack = Rack.objects.create(name='Rack 1', site=site)
|
||||
manufacturer = Manufacturer.objects.create(name='Manufacturer 1', slug='manufacturer-1')
|
||||
device_type = DeviceType.objects.create(
|
||||
manufacturer=manufacturer, model='Device Type 1', slug='device-type-1', u_height=1
|
||||
)
|
||||
device_role = DeviceRole.objects.create(
|
||||
name='Device Role 1', slug='device-role-1', color='ff0000'
|
||||
)
|
||||
Platform.objects.create(name='Platform 1', slug='platform-1')
|
||||
Device.objects.create(
|
||||
name='Device 1', device_type=device_type, device_role=device_role, site=site, rack=rack, position=1
|
||||
)
|
||||
cluster_type = ClusterType.objects.create(name='Cluster Type 1', slug='cluster-type-1')
|
||||
cluster_group = ClusterGroup.objects.create(name='Cluster Group 1', slug='cluster-group-1')
|
||||
Cluster.objects.create(name='Cluster 1', type=cluster_type, group=cluster_group)
|
||||
|
||||
def test_racked_device(self):
|
||||
test = DeviceForm(data={
|
||||
'name': 'test',
|
||||
'device_role': get_id(DeviceRole, 'leaf-switch'),
|
||||
form = DeviceForm(data={
|
||||
'name': 'New Device',
|
||||
'device_role': DeviceRole.objects.first().pk,
|
||||
'tenant': None,
|
||||
'manufacturer': get_id(Manufacturer, 'juniper'),
|
||||
'device_type': get_id(DeviceType, 'qfx5100-48s'),
|
||||
'site': get_id(Site, 'test1'),
|
||||
'rack': '1',
|
||||
'manufacturer': Manufacturer.objects.first().pk,
|
||||
'device_type': DeviceType.objects.first().pk,
|
||||
'site': Site.objects.first().pk,
|
||||
'rack': Rack.objects.first().pk,
|
||||
'face': DeviceFaceChoices.FACE_FRONT,
|
||||
'position': 41,
|
||||
'platform': get_id(Platform, 'juniper-junos'),
|
||||
'position': 2,
|
||||
'platform': Platform.objects.first().pk,
|
||||
'status': DeviceStatusChoices.STATUS_ACTIVE,
|
||||
})
|
||||
self.assertTrue(test.is_valid(), test.fields['position'].choices)
|
||||
self.assertTrue(test.save())
|
||||
self.assertTrue(form.is_valid())
|
||||
self.assertTrue(form.save())
|
||||
|
||||
def test_racked_device_occupied(self):
|
||||
test = DeviceForm(data={
|
||||
form = DeviceForm(data={
|
||||
'name': 'test',
|
||||
'device_role': get_id(DeviceRole, 'leaf-switch'),
|
||||
'device_role': DeviceRole.objects.first().pk,
|
||||
'tenant': None,
|
||||
'manufacturer': get_id(Manufacturer, 'juniper'),
|
||||
'device_type': get_id(DeviceType, 'qfx5100-48s'),
|
||||
'site': get_id(Site, 'test1'),
|
||||
'rack': '1',
|
||||
'manufacturer': Manufacturer.objects.first().pk,
|
||||
'device_type': DeviceType.objects.first().pk,
|
||||
'site': Site.objects.first().pk,
|
||||
'rack': Rack.objects.first().pk,
|
||||
'face': DeviceFaceChoices.FACE_FRONT,
|
||||
'position': 1,
|
||||
'platform': get_id(Platform, 'juniper-junos'),
|
||||
'platform': Platform.objects.first().pk,
|
||||
'status': DeviceStatusChoices.STATUS_ACTIVE,
|
||||
})
|
||||
self.assertFalse(test.is_valid())
|
||||
self.assertFalse(form.is_valid())
|
||||
self.assertIn('position', form.errors)
|
||||
|
||||
def test_non_racked_device(self):
|
||||
test = DeviceForm(data={
|
||||
'name': 'test',
|
||||
'device_role': get_id(DeviceRole, 'pdu'),
|
||||
form = DeviceForm(data={
|
||||
'name': 'New Device',
|
||||
'device_role': DeviceRole.objects.first().pk,
|
||||
'tenant': None,
|
||||
'manufacturer': get_id(Manufacturer, 'servertech'),
|
||||
'device_type': get_id(DeviceType, 'cwg-24vym415c9'),
|
||||
'site': get_id(Site, 'test1'),
|
||||
'rack': '1',
|
||||
'face': '',
|
||||
'manufacturer': Manufacturer.objects.first().pk,
|
||||
'device_type': DeviceType.objects.first().pk,
|
||||
'site': Site.objects.first().pk,
|
||||
'rack': None,
|
||||
'face': None,
|
||||
'position': None,
|
||||
'platform': None,
|
||||
'platform': Platform.objects.first().pk,
|
||||
'status': DeviceStatusChoices.STATUS_ACTIVE,
|
||||
})
|
||||
self.assertTrue(test.is_valid())
|
||||
self.assertTrue(test.save())
|
||||
self.assertTrue(form.is_valid())
|
||||
self.assertTrue(form.save())
|
||||
|
||||
def test_non_racked_device_with_face(self):
|
||||
test = DeviceForm(data={
|
||||
'name': 'test',
|
||||
'device_role': get_id(DeviceRole, 'pdu'),
|
||||
def test_non_racked_device_with_face_position(self):
|
||||
form = DeviceForm(data={
|
||||
'name': 'New Device',
|
||||
'device_role': DeviceRole.objects.first().pk,
|
||||
'tenant': None,
|
||||
'manufacturer': get_id(Manufacturer, 'servertech'),
|
||||
'device_type': get_id(DeviceType, 'cwg-24vym415c9'),
|
||||
'site': get_id(Site, 'test1'),
|
||||
'rack': '1',
|
||||
'manufacturer': Manufacturer.objects.first().pk,
|
||||
'device_type': DeviceType.objects.first().pk,
|
||||
'site': Site.objects.first().pk,
|
||||
'rack': None,
|
||||
'face': DeviceFaceChoices.FACE_REAR,
|
||||
'position': None,
|
||||
'position': 10,
|
||||
'platform': None,
|
||||
'status': DeviceStatusChoices.STATUS_ACTIVE,
|
||||
})
|
||||
self.assertTrue(test.is_valid())
|
||||
self.assertTrue(test.save())
|
||||
self.assertFalse(form.is_valid())
|
||||
self.assertIn('face', form.errors)
|
||||
self.assertIn('position', form.errors)
|
||||
|
||||
def test_cloned_cluster_device_initial_data(self):
|
||||
def test_initial_data_population(self):
|
||||
device_type = DeviceType.objects.first()
|
||||
cluster = Cluster.objects.first()
|
||||
test = DeviceForm(initial={
|
||||
'device_type': get_id(DeviceType, 'poweredge-r640'),
|
||||
'device_role': get_id(DeviceRole, 'server'),
|
||||
'device_type': device_type.pk,
|
||||
'device_role': DeviceRole.objects.first().pk,
|
||||
'status': DeviceStatusChoices.STATUS_ACTIVE,
|
||||
'site': get_id(Site, 'test1'),
|
||||
"cluster": Cluster.objects.get(id=4).id,
|
||||
'site': Site.objects.first().pk,
|
||||
'cluster': cluster.pk,
|
||||
})
|
||||
self.assertEqual(test.initial['manufacturer'], get_id(Manufacturer, 'dell'))
|
||||
self.assertIn('cluster_group', test.initial)
|
||||
self.assertEqual(test.initial['cluster_group'], get_id(ClusterGroup, 'vm-host'))
|
||||
|
||||
# Check that the initial value for the manufacturer is set automatically when assigning the device type
|
||||
self.assertEqual(test.initial['manufacturer'], device_type.manufacturer.pk)
|
||||
|
||||
# Check that the initial value for the cluster group is set automatically when assigning the cluster
|
||||
self.assertEqual(test.initial['cluster_group'], cluster.group.pk)
|
||||
|
@ -1,35 +0,0 @@
|
||||
[
|
||||
{
|
||||
"model": "extras.graph",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"type": 300,
|
||||
"weight": 1000,
|
||||
"name": "Site Test Graph",
|
||||
"source": "http://localhost/na.png",
|
||||
"link": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "extras.graph",
|
||||
"pk": 2,
|
||||
"fields": {
|
||||
"type": 200,
|
||||
"weight": 1000,
|
||||
"name": "Provider Test Graph",
|
||||
"source": "http://localhost/provider_graph.png",
|
||||
"link": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "extras.graph",
|
||||
"pk": 3,
|
||||
"fields": {
|
||||
"type": 100,
|
||||
"weight": 1000,
|
||||
"name": "Interface Test Graph",
|
||||
"source": "http://localhost/interface_graph.png",
|
||||
"link": ""
|
||||
}
|
||||
}
|
||||
]
|
@ -1,329 +0,0 @@
|
||||
[
|
||||
{
|
||||
"model": "ipam.rir",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"name": "RFC1918",
|
||||
"slug": "rfc1918"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.aggregate",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"prefix": "10.0.0.0/8",
|
||||
"rir": 1,
|
||||
"date_added": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.role",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"name": "Lab Network",
|
||||
"slug": "lab-network",
|
||||
"weight": 1000
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.prefix",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"prefix": "10.1.1.0/24",
|
||||
"site": 1,
|
||||
"vrf": null,
|
||||
"vlan": null,
|
||||
"status": "active",
|
||||
"role": 1,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.prefix",
|
||||
"pk": 2,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"prefix": "10.0.255.0/24",
|
||||
"site": 1,
|
||||
"vrf": null,
|
||||
"vlan": null,
|
||||
"status": "active",
|
||||
"role": 1,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "10.0.255.1/32",
|
||||
"vrf": null,
|
||||
"interface_id": 3,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 2,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "169.254.254.1/31",
|
||||
"vrf": null,
|
||||
"interface_id": 4,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 3,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "10.0.255.2/32",
|
||||
"vrf": null,
|
||||
"interface_id": 185,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 4,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "169.254.1.1/31",
|
||||
"vrf": null,
|
||||
"interface_id": 213,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 5,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "10.0.254.1/24",
|
||||
"vrf": null,
|
||||
"interface_id": 12,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 8,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "10.15.21.1/31",
|
||||
"vrf": null,
|
||||
"interface_id": 218,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 9,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "10.15.21.2/31",
|
||||
"vrf": null,
|
||||
"interface_id": 9,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 10,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "10.15.22.1/31",
|
||||
"vrf": null,
|
||||
"interface_id": 8,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 11,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "10.15.20.1/31",
|
||||
"vrf": null,
|
||||
"interface_id": 7,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 12,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "10.16.20.1/31",
|
||||
"vrf": null,
|
||||
"interface_id": 216,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 13,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "10.15.22.2/31",
|
||||
"vrf": null,
|
||||
"interface_id": 206,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 14,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "10.16.22.1/31",
|
||||
"vrf": null,
|
||||
"interface_id": 217,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 15,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "10.16.22.2/31",
|
||||
"vrf": null,
|
||||
"interface_id": 205,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 16,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "10.16.20.2/31",
|
||||
"vrf": null,
|
||||
"interface_id": 211,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 17,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "10.15.22.2/31",
|
||||
"vrf": null,
|
||||
"interface_id": 212,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 19,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "10.0.254.2/32",
|
||||
"vrf": null,
|
||||
"interface_id": 188,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 20,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "169.254.1.1/31",
|
||||
"vrf": null,
|
||||
"interface_id": 200,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.ipaddress",
|
||||
"pk": 21,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"family": 4,
|
||||
"address": "169.254.1.2/31",
|
||||
"vrf": null,
|
||||
"interface_id": 194,
|
||||
"nat_inside": null,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "ipam.vlan",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"created": "2016-06-23",
|
||||
"last_updated": "2016-06-23T03:19:56.521Z",
|
||||
"site": 1,
|
||||
"vid": 999,
|
||||
"name": "TEST",
|
||||
"status": "active",
|
||||
"role": 1
|
||||
}
|
||||
}
|
||||
]
|
@ -1,170 +0,0 @@
|
||||
[
|
||||
{
|
||||
"model": "virtualization.clustertype",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"created": "2016-08-01",
|
||||
"last_updated": "2016-08-01T15:22:42.289Z",
|
||||
"name": "Public Cloud",
|
||||
"slug": "public-cloud"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "virtualization.clustertype",
|
||||
"pk": 2,
|
||||
"fields": {
|
||||
"created": "2016-08-01",
|
||||
"last_updated": "2016-08-01T15:22:42.289Z",
|
||||
"name": "vSphere",
|
||||
"slug": "vsphere"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "virtualization.clustertype",
|
||||
"pk": 3,
|
||||
"fields": {
|
||||
"created": "2016-08-01",
|
||||
"last_updated": "2016-08-01T15:22:42.289Z",
|
||||
"name": "Hyper-V",
|
||||
"slug": "hyper-v"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "virtualization.clustertype",
|
||||
"pk": 4,
|
||||
"fields": {
|
||||
"created": "2016-08-01",
|
||||
"last_updated": "2016-08-01T15:22:42.289Z",
|
||||
"name": "libvirt",
|
||||
"slug": "libvirt"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "virtualization.clustertype",
|
||||
"pk": 5,
|
||||
"fields": {
|
||||
"created": "2016-08-01",
|
||||
"last_updated": "2016-08-01T15:22:42.289Z",
|
||||
"name": "LXD",
|
||||
"slug": "lxd"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "virtualization.clustertype",
|
||||
"pk": 6,
|
||||
"fields": {
|
||||
"created": "2016-08-01",
|
||||
"last_updated": "2016-08-01T15:22:42.289Z",
|
||||
"name": "Docker",
|
||||
"slug": "docker"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "virtualization.clustergroup",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"created": "2016-08-01",
|
||||
"last_updated": "2016-08-01T15:22:42.289Z",
|
||||
"name": "VM Host",
|
||||
"slug": "vm-host"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "virtualization.cluster",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"created": "2016-08-01",
|
||||
"last_updated": "2016-08-01T15:22:42.289Z",
|
||||
"name": "Digital Ocean",
|
||||
"type": 1,
|
||||
"group": 1,
|
||||
"tenant": null,
|
||||
"site": null,
|
||||
"comments": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "virtualization.cluster",
|
||||
"pk": 2,
|
||||
"fields": {
|
||||
"created": "2016-08-01",
|
||||
"last_updated": "2016-08-01T15:22:42.289Z",
|
||||
"name": "Amazon EC2",
|
||||
"type": 1,
|
||||
"group": 1,
|
||||
"tenant": null,
|
||||
"site": null,
|
||||
"comments": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "virtualization.cluster",
|
||||
"pk": 3,
|
||||
"fields": {
|
||||
"created": "2016-08-01",
|
||||
"last_updated": "2016-08-01T15:22:42.289Z",
|
||||
"name": "Microsoft Azure",
|
||||
"type": 1,
|
||||
"group": 1,
|
||||
"tenant": null,
|
||||
"site": null,
|
||||
"comments": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "virtualization.cluster",
|
||||
"pk": 4,
|
||||
"fields": {
|
||||
"created": "2016-08-01",
|
||||
"last_updated": "2016-08-01T15:22:42.289Z",
|
||||
"name": "vSphere Cluster",
|
||||
"type": 2,
|
||||
"group": 1,
|
||||
"tenant": null,
|
||||
"site": null,
|
||||
"comments": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "virtualization.virtualmachine",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"local_context_data": null,
|
||||
"created": "2019-12-19",
|
||||
"last_updated": "2019-12-19T05:24:19.146Z",
|
||||
"cluster": 2,
|
||||
"tenant": null,
|
||||
"platform": null,
|
||||
"name": "vm1",
|
||||
"status": "active",
|
||||
"role": null,
|
||||
"primary_ip4": null,
|
||||
"primary_ip6": null,
|
||||
"vcpus": null,
|
||||
"memory": null,
|
||||
"disk": null,
|
||||
"comments": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "virtualization.virtualmachine",
|
||||
"pk": 2,
|
||||
"fields": {
|
||||
"local_context_data": null,
|
||||
"created": "2019-12-19",
|
||||
"last_updated": "2019-12-19T05:24:41.478Z",
|
||||
"cluster": 1,
|
||||
"tenant": null,
|
||||
"platform": null,
|
||||
"name": "vm2",
|
||||
"status": "active",
|
||||
"role": null,
|
||||
"primary_ip4": null,
|
||||
"primary_ip6": null,
|
||||
"vcpus": null,
|
||||
"memory": null,
|
||||
"disk": null,
|
||||
"comments": ""
|
||||
}
|
||||
}
|
||||
]
|
Reference in New Issue
Block a user