55
66from circuits .graphql .types import ProviderType
77from dcim .graphql .types import SiteType
8+ from extras .graphql .mixins import ContactsMixin
89from ipam import models
910from netbox .graphql .scalars import BigInt
1011from netbox .graphql .types import BaseObjectType , NetBoxObjectType , OrganizationalObjectType
@@ -83,7 +84,7 @@ class ASNRangeType(NetBoxObjectType):
8384 fields = '__all__' ,
8485 filters = AggregateFilter
8586)
86- class AggregateType (NetBoxObjectType , BaseIPAddressFamilyType ):
87+ class AggregateType (NetBoxObjectType , ContactsMixin , BaseIPAddressFamilyType ):
8788 prefix : str
8889 rir : Annotated ["RIRType" , strawberry .lazy ('ipam.graphql.types' )] | None
8990 tenant : Annotated ["TenantType" , strawberry .lazy ('tenancy.graphql.types' )] | None
@@ -120,7 +121,7 @@ def interface(self) -> Annotated[Union[
120121 exclude = ('assigned_object_type' , 'assigned_object_id' , 'address' ),
121122 filters = IPAddressFilter
122123)
123- class IPAddressType (NetBoxObjectType , BaseIPAddressFamilyType ):
124+ class IPAddressType (NetBoxObjectType , ContactsMixin , BaseIPAddressFamilyType ):
124125 address : str
125126 vrf : Annotated ["VRFType" , strawberry .lazy ('ipam.graphql.types' )] | None
126127 tenant : Annotated ["TenantType" , strawberry .lazy ('tenancy.graphql.types' )] | None
@@ -144,7 +145,7 @@ def assigned_object(self) -> Annotated[Union[
144145 fields = '__all__' ,
145146 filters = IPRangeFilter
146147)
147- class IPRangeType (NetBoxObjectType ):
148+ class IPRangeType (NetBoxObjectType , ContactsMixin ):
148149 start_address : str
149150 end_address : str
150151 vrf : Annotated ["VRFType" , strawberry .lazy ('ipam.graphql.types' )] | None
@@ -157,7 +158,7 @@ class IPRangeType(NetBoxObjectType):
157158 exclude = ('scope_type' , 'scope_id' , '_location' , '_region' , '_site' , '_site_group' ),
158159 filters = PrefixFilter
159160)
160- class PrefixType (NetBoxObjectType , BaseIPAddressFamilyType ):
161+ class PrefixType (NetBoxObjectType , ContactsMixin , BaseIPAddressFamilyType ):
161162 prefix : str
162163 vrf : Annotated ["VRFType" , strawberry .lazy ('ipam.graphql.types' )] | None
163164 tenant : Annotated ["TenantType" , strawberry .lazy ('tenancy.graphql.types' )] | None
@@ -217,7 +218,7 @@ class RouteTargetType(NetBoxObjectType):
217218 fields = '__all__' ,
218219 filters = ServiceFilter
219220)
220- class ServiceType (NetBoxObjectType ):
221+ class ServiceType (NetBoxObjectType , ContactsMixin ):
221222 ports : List [int ]
222223 device : Annotated ["DeviceType" , strawberry .lazy ('dcim.graphql.types' )] | None
223224 virtual_machine : Annotated ["VirtualMachineType" , strawberry .lazy ('virtualization.graphql.types' )] | None
0 commit comments