1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Merge branch 'feature' into 6732-asn-model

This commit is contained in:
Daniel Sheppard
2021-11-03 08:37:11 -05:00
committed by GitHub
40 changed files with 1137 additions and 19 deletions

View File

@@ -32,6 +32,12 @@ class IPAMQuery(graphene.ObjectType):
service = ObjectField(ServiceType)
service_list = ObjectListField(ServiceType)
fhrp_group = ObjectField(FHRPGroupType)
fhrp_group_list = ObjectListField(FHRPGroupType)
fhrp_group_assignment = ObjectField(FHRPGroupAssignmentType)
fhrp_group_assignment_list = ObjectListField(FHRPGroupAssignmentType)
vlan = ObjectField(VLANType)
vlan_list = ObjectListField(VLANType)

View File

@@ -7,6 +7,8 @@ from netbox.graphql.types import OrganizationalObjectType, PrimaryObjectType
__all__ = (
'ASNType',
'AggregateType',
'FHRPGroupType',
'FHRPGroupAssignmentType',
'IPAddressType',
'IPRangeType',
'PrefixType',
@@ -37,6 +39,25 @@ class AggregateType(PrimaryObjectType):
filterset_class = filtersets.AggregateFilterSet
class FHRPGroupType(PrimaryObjectType):
class Meta:
model = models.FHRPGroup
fields = '__all__'
filterset_class = filtersets.FHRPGroupFilterSet
def resolve_auth_type(self, info):
return self.auth_type or None
class FHRPGroupAssignmentType(PrimaryObjectType):
class Meta:
model = models.FHRPGroupAssignment
fields = '__all__'
filterset_class = filtersets.FHRPGroupAssignmentFilterSet
class IPAddressType(PrimaryObjectType):
class Meta: