mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
#6732 - GraphQL support
This commit is contained in:
parent
8235b339ee
commit
0ad440fea5
@ -5,6 +5,9 @@ from .types import *
|
|||||||
|
|
||||||
|
|
||||||
class IPAMQuery(graphene.ObjectType):
|
class IPAMQuery(graphene.ObjectType):
|
||||||
|
asn = ObjectField(ASNType)
|
||||||
|
asn_list = ObjectListField(ASNType)
|
||||||
|
|
||||||
aggregate = ObjectField(AggregateType)
|
aggregate = ObjectField(AggregateType)
|
||||||
aggregate_list = ObjectListField(AggregateType)
|
aggregate_list = ObjectListField(AggregateType)
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ from ipam import filtersets, models
|
|||||||
from netbox.graphql.types import OrganizationalObjectType, PrimaryObjectType
|
from netbox.graphql.types import OrganizationalObjectType, PrimaryObjectType
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
|
'ASNType',
|
||||||
'AggregateType',
|
'AggregateType',
|
||||||
'IPAddressType',
|
'IPAddressType',
|
||||||
'IPRangeType',
|
'IPRangeType',
|
||||||
@ -16,6 +17,14 @@ __all__ = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class ASNType(PrimaryObjectType):
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
model = models.ASN
|
||||||
|
fields = '__all__'
|
||||||
|
filterset_class = filtersets.ASNFilterSet
|
||||||
|
|
||||||
|
|
||||||
class AggregateType(PrimaryObjectType):
|
class AggregateType(PrimaryObjectType):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
Loading…
Reference in New Issue
Block a user