diff --git a/netbox/circuits/graphql/types.py b/netbox/circuits/graphql/types.py index 564b5ed6f93..96fcaa14438 100644 --- a/netbox/circuits/graphql/types.py +++ b/netbox/circuits/graphql/types.py @@ -43,7 +43,7 @@ class ProviderType(NetBoxObjectType, ContactsMixin): fields='__all__', filters=ProviderAccountFilter ) -class ProviderAccountType(NetBoxObjectType): +class ProviderAccountType(ContactsMixin, NetBoxObjectType): provider: Annotated["ProviderType", strawberry.lazy('circuits.graphql.types')] circuits: List[Annotated["CircuitType", strawberry.lazy('circuits.graphql.types')]] diff --git a/netbox/ipam/graphql/types.py b/netbox/ipam/graphql/types.py index e6ecca984a9..54ce2fc742c 100644 --- a/netbox/ipam/graphql/types.py +++ b/netbox/ipam/graphql/types.py @@ -5,6 +5,7 @@ from circuits.graphql.types import ProviderType from dcim.graphql.types import SiteType +from extras.graphql.mixins import ContactsMixin from ipam import models from netbox.graphql.scalars import BigInt from netbox.graphql.types import BaseObjectType, NetBoxObjectType, OrganizationalObjectType @@ -83,7 +84,7 @@ class ASNRangeType(NetBoxObjectType): fields='__all__', filters=AggregateFilter ) -class AggregateType(NetBoxObjectType, BaseIPAddressFamilyType): +class AggregateType(NetBoxObjectType, ContactsMixin, BaseIPAddressFamilyType): prefix: str rir: Annotated["RIRType", strawberry.lazy('ipam.graphql.types')] | None tenant: Annotated["TenantType", strawberry.lazy('tenancy.graphql.types')] | None @@ -120,7 +121,7 @@ def interface(self) -> Annotated[Union[ exclude=('assigned_object_type', 'assigned_object_id', 'address'), filters=IPAddressFilter ) -class IPAddressType(NetBoxObjectType, BaseIPAddressFamilyType): +class IPAddressType(NetBoxObjectType, ContactsMixin, BaseIPAddressFamilyType): address: str vrf: Annotated["VRFType", strawberry.lazy('ipam.graphql.types')] | None tenant: Annotated["TenantType", strawberry.lazy('tenancy.graphql.types')] | None @@ -144,7 +145,7 @@ def assigned_object(self) -> Annotated[Union[ fields='__all__', filters=IPRangeFilter ) -class IPRangeType(NetBoxObjectType): +class IPRangeType(NetBoxObjectType, ContactsMixin): start_address: str end_address: str vrf: Annotated["VRFType", strawberry.lazy('ipam.graphql.types')] | None @@ -157,7 +158,7 @@ class IPRangeType(NetBoxObjectType): exclude=('scope_type', 'scope_id', '_location', '_region', '_site', '_site_group'), filters=PrefixFilter ) -class PrefixType(NetBoxObjectType, BaseIPAddressFamilyType): +class PrefixType(NetBoxObjectType, ContactsMixin, BaseIPAddressFamilyType): prefix: str vrf: Annotated["VRFType", strawberry.lazy('ipam.graphql.types')] | None tenant: Annotated["TenantType", strawberry.lazy('tenancy.graphql.types')] | None @@ -217,7 +218,7 @@ class RouteTargetType(NetBoxObjectType): fields='__all__', filters=ServiceFilter ) -class ServiceType(NetBoxObjectType): +class ServiceType(NetBoxObjectType, ContactsMixin): ports: List[int] device: Annotated["DeviceType", strawberry.lazy('dcim.graphql.types')] | None virtual_machine: Annotated["VirtualMachineType", strawberry.lazy('virtualization.graphql.types')] | None diff --git a/netbox/tenancy/graphql/types.py b/netbox/tenancy/graphql/types.py index 7baa136b37e..b07a14c80e1 100644 --- a/netbox/tenancy/graphql/types.py +++ b/netbox/tenancy/graphql/types.py @@ -3,7 +3,7 @@ import strawberry import strawberry_django -from extras.graphql.mixins import CustomFieldsMixin, TagsMixin +from extras.graphql.mixins import CustomFieldsMixin, TagsMixin, ContactsMixin from netbox.graphql.types import BaseObjectType, OrganizationalObjectType, NetBoxObjectType from tenancy import models from .mixins import ContactAssignmentsMixin @@ -28,7 +28,7 @@ fields='__all__', filters=TenantFilter ) -class TenantType(NetBoxObjectType): +class TenantType(ContactsMixin, NetBoxObjectType): group: Annotated["TenantGroupType", strawberry.lazy('tenancy.graphql.types')] | None asns: List[Annotated["ASNType", strawberry.lazy('ipam.graphql.types')]] diff --git a/netbox/virtualization/graphql/types.py b/netbox/virtualization/graphql/types.py index 33d6ce450b0..9b6e11dc27e 100644 --- a/netbox/virtualization/graphql/types.py +++ b/netbox/virtualization/graphql/types.py @@ -33,7 +33,7 @@ class ComponentType(NetBoxObjectType): exclude=('scope_type', 'scope_id', '_location', '_region', '_site', '_site_group'), filters=ClusterFilter ) -class ClusterType(VLANGroupsMixin, NetBoxObjectType): +class ClusterType(ContactsMixin, VLANGroupsMixin, NetBoxObjectType): type: Annotated["ClusterTypeType", strawberry.lazy('virtualization.graphql.types')] | None group: Annotated["ClusterGroupType", strawberry.lazy('virtualization.graphql.types')] | None tenant: Annotated["TenantType", strawberry.lazy('tenancy.graphql.types')] | None @@ -55,7 +55,7 @@ def scope(self) -> Annotated[Union[ fields='__all__', filters=ClusterGroupFilter ) -class ClusterGroupType(VLANGroupsMixin, OrganizationalObjectType): +class ClusterGroupType(ContactsMixin, VLANGroupsMixin, OrganizationalObjectType): clusters: List[Annotated["ClusterType", strawberry.lazy('virtualization.graphql.types')]] diff --git a/netbox/vpn/graphql/types.py b/netbox/vpn/graphql/types.py index 7940bd326ba..3fec6e79138 100644 --- a/netbox/vpn/graphql/types.py +++ b/netbox/vpn/graphql/types.py @@ -27,7 +27,7 @@ fields='__all__', filters=TunnelGroupFilter ) -class TunnelGroupType(OrganizationalObjectType): +class TunnelGroupType(ContactsMixin, OrganizationalObjectType): tunnels: List[Annotated["TunnelType", strawberry.lazy('vpn.graphql.types')]] @@ -48,7 +48,7 @@ class TunnelTerminationType(CustomFieldsMixin, TagsMixin, ObjectType): fields='__all__', filters=TunnelFilter ) -class TunnelType(NetBoxObjectType): +class TunnelType(ContactsMixin, NetBoxObjectType): group: Annotated["TunnelGroupType", strawberry.lazy('vpn.graphql.types')] | None ipsec_profile: Annotated["IPSecProfileType", strawberry.lazy('vpn.graphql.types')] | None tenant: Annotated["TenantType", strawberry.lazy('tenancy.graphql.types')] | None