mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-31 04:46:26 -06:00
7699 review changes
This commit is contained in:
parent
277b175f9f
commit
62358f6ead
@ -25,4 +25,4 @@ The cluster's operational status.
|
|||||||
|
|
||||||
### Scope
|
### Scope
|
||||||
|
|
||||||
The [region](../dcim/region.md), [site](../dcim/site.md) or [location](../dcim/location.md) with which this cluster is associated.
|
The [region](../dcim/region.md), [site](../dcim/site.md), [site group](../dcim/sitegroup.md) or [location](../dcim/location.md) with which this cluster is associated.
|
||||||
|
@ -461,6 +461,10 @@ class LocationType(VLANGroupsMixin, ImageAttachmentsMixin, ContactsMixin, Organi
|
|||||||
devices: List[Annotated["DeviceType", strawberry.lazy('dcim.graphql.types')]]
|
devices: List[Annotated["DeviceType", strawberry.lazy('dcim.graphql.types')]]
|
||||||
children: List[Annotated["LocationType", strawberry.lazy('dcim.graphql.types')]]
|
children: List[Annotated["LocationType", strawberry.lazy('dcim.graphql.types')]]
|
||||||
|
|
||||||
|
@strawberry_django.field
|
||||||
|
def clusters(self) -> List[Annotated["ClusterType", strawberry.lazy('virtualization.graphql.types')]]:
|
||||||
|
return self._clusters.all()
|
||||||
|
|
||||||
|
|
||||||
@strawberry_django.type(
|
@strawberry_django.type(
|
||||||
models.Manufacturer,
|
models.Manufacturer,
|
||||||
@ -704,6 +708,10 @@ class RegionType(VLANGroupsMixin, ContactsMixin, OrganizationalObjectType):
|
|||||||
def parent(self) -> Annotated["RegionType", strawberry.lazy('dcim.graphql.types')] | None:
|
def parent(self) -> Annotated["RegionType", strawberry.lazy('dcim.graphql.types')] | None:
|
||||||
return self.parent
|
return self.parent
|
||||||
|
|
||||||
|
@strawberry_django.field
|
||||||
|
def clusters(self) -> List[Annotated["ClusterType", strawberry.lazy('virtualization.graphql.types')]]:
|
||||||
|
return self._clusters.all()
|
||||||
|
|
||||||
|
|
||||||
@strawberry_django.type(
|
@strawberry_django.type(
|
||||||
models.Site,
|
models.Site,
|
||||||
@ -748,6 +756,10 @@ class SiteGroupType(VLANGroupsMixin, ContactsMixin, OrganizationalObjectType):
|
|||||||
def parent(self) -> Annotated["SiteGroupType", strawberry.lazy('dcim.graphql.types')] | None:
|
def parent(self) -> Annotated["SiteGroupType", strawberry.lazy('dcim.graphql.types')] | None:
|
||||||
return self.parent
|
return self.parent
|
||||||
|
|
||||||
|
@strawberry_django.field
|
||||||
|
def clusters(self) -> List[Annotated["ClusterType", strawberry.lazy('virtualization.graphql.types')]]:
|
||||||
|
return self._clusters.all()
|
||||||
|
|
||||||
|
|
||||||
@strawberry_django.type(
|
@strawberry_django.type(
|
||||||
models.VirtualChassis,
|
models.VirtualChassis,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# models values for ContentTypes which may be CircuitTermination scope types
|
# models values for ContentTypes which may be Cluster scope types
|
||||||
CLUSTER_SCOPE_TYPES = (
|
CLUSTER_SCOPE_TYPES = (
|
||||||
'region', 'sitegroup', 'site', 'location',
|
'region', 'sitegroup', 'site', 'location',
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user