Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion netbox/circuits/graphql/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')]]
Expand Down
11 changes: 6 additions & 5 deletions netbox/ipam/graphql/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions netbox/tenancy/graphql/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')]]
Expand Down
4 changes: 2 additions & 2 deletions netbox/virtualization/graphql/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')]]

Expand Down
4 changes: 2 additions & 2 deletions netbox/vpn/graphql/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
fields='__all__',
filters=TunnelGroupFilter
)
class TunnelGroupType(OrganizationalObjectType):
class TunnelGroupType(ContactsMixin, OrganizationalObjectType):

tunnels: List[Annotated["TunnelType", strawberry.lazy('vpn.graphql.types')]]

Expand All @@ -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
Expand Down