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

Merge branch '150-interface-vlans' into develop-2.3

This commit is contained in:
Jeremy Stretch
2017-11-14 15:22:40 -05:00
parent 5c13382071
commit ba42ad2115
12 changed files with 469 additions and 59 deletions

View File

@@ -267,3 +267,8 @@ class VirtualMachine(CreatedUpdatedModel, CustomFieldModel):
return self.primary_ip4
else:
return None
def site(self):
# used when a child compent (eg Interface) needs to know its parent's site but
# the parent could be either a device or a virtual machine
return self.cluster.site