|
18 | 18 | from ipam.validators import DNSValidator |
19 | 19 | from netbox.config import get_config |
20 | 20 | from netbox.models import OrganizationalModel, PrimaryModel |
| 21 | +from netbox.models.features import ContactsMixin |
21 | 22 |
|
22 | 23 | __all__ = ( |
23 | 24 | 'Aggregate', |
@@ -74,7 +75,7 @@ def get_absolute_url(self): |
74 | 75 | return reverse('ipam:rir', args=[self.pk]) |
75 | 76 |
|
76 | 77 |
|
77 | | -class Aggregate(GetAvailablePrefixesMixin, PrimaryModel): |
| 78 | +class Aggregate(ContactsMixin, GetAvailablePrefixesMixin, PrimaryModel): |
78 | 79 | """ |
79 | 80 | An aggregate exists at the root level of the IP address space hierarchy in NetBox. Aggregates are used to organize |
80 | 81 | the hierarchy and track the overall utilization of available address space. Each Aggregate is assigned to a RIR. |
@@ -206,7 +207,7 @@ def get_absolute_url(self): |
206 | 207 | return reverse('ipam:role', args=[self.pk]) |
207 | 208 |
|
208 | 209 |
|
209 | | -class Prefix(GetAvailablePrefixesMixin, PrimaryModel): |
| 210 | +class Prefix(ContactsMixin, GetAvailablePrefixesMixin, PrimaryModel): |
210 | 211 | """ |
211 | 212 | A Prefix represents an IPv4 or IPv6 network, including mask length. Prefixes can optionally be assigned to Sites and |
212 | 213 | VRFs. A Prefix must be assigned a status and may optionally be assigned a used-define Role. A Prefix can also be |
@@ -486,7 +487,7 @@ def get_utilization(self): |
486 | 487 | return min(utilization, 100) |
487 | 488 |
|
488 | 489 |
|
489 | | -class IPRange(PrimaryModel): |
| 490 | +class IPRange(ContactsMixin, PrimaryModel): |
490 | 491 | """ |
491 | 492 | A range of IP addresses, defined by start and end addresses. |
492 | 493 | """ |
@@ -695,7 +696,7 @@ def utilization(self): |
695 | 696 | return min(float(child_count) / self.size * 100, 100) |
696 | 697 |
|
697 | 698 |
|
698 | | -class IPAddress(PrimaryModel): |
| 699 | +class IPAddress(ContactsMixin, PrimaryModel): |
699 | 700 | """ |
700 | 701 | An IPAddress represents an individual IPv4 or IPv6 address and its mask. The mask length should match what is |
701 | 702 | configured in the real world. (Typically, only loopback interfaces are configured with /32 or /128 masks.) Like |
|
0 commit comments