1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Allowed assigning an IP address to either a device or a VM

This commit is contained in:
Jeremy Stretch
2017-08-29 15:26:35 -04:00
parent e945aafd7b
commit fa95191792
9 changed files with 106 additions and 85 deletions

View File

@@ -1241,6 +1241,10 @@ class Interface(models.Model):
)
})
@property
def parent(self):
return self.device or self.virtual_machine
@property
def is_virtual(self):
return self.form_factor in VIRTUAL_IFACE_TYPES