mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 01:06:11 -06:00
add GenericRelation for ipam.IPAddressFunction
This commit is contained in:
parent
3c82920870
commit
1167a0473e
@ -645,6 +645,9 @@ class Device(PrimaryModel, ConfigContextModel):
|
|||||||
images = GenericRelation(
|
images = GenericRelation(
|
||||||
to='extras.ImageAttachment'
|
to='extras.ImageAttachment'
|
||||||
)
|
)
|
||||||
|
ipaddressfunctions = GenericRelation(
|
||||||
|
to='ipam.IPAddressFunction'
|
||||||
|
)
|
||||||
|
|
||||||
objects = ConfigContextModelQuerySet.as_manager()
|
objects = ConfigContextModelQuerySet.as_manager()
|
||||||
|
|
||||||
@ -1231,6 +1234,11 @@ class VirtualDeviceContext(PrimaryModel):
|
|||||||
blank=True
|
blank=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Generic relation
|
||||||
|
ipaddressfunctions = GenericRelation(
|
||||||
|
to='ipam.IPAddressFunction'
|
||||||
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ['name']
|
ordering = ['name']
|
||||||
constraints = (
|
constraints = (
|
||||||
|
@ -124,6 +124,9 @@ class VirtualMachine(PrimaryModel, ConfigContextModel):
|
|||||||
contacts = GenericRelation(
|
contacts = GenericRelation(
|
||||||
to='tenancy.ContactAssignment'
|
to='tenancy.ContactAssignment'
|
||||||
)
|
)
|
||||||
|
ipaddressfunctions = GenericRelation(
|
||||||
|
to='ipam.IPAddressFunction'
|
||||||
|
)
|
||||||
|
|
||||||
objects = ConfigContextModelQuerySet.as_manager()
|
objects = ConfigContextModelQuerySet.as_manager()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user