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

Initial work on #6235

This commit is contained in:
jeremystretch
2021-11-01 16:14:44 -04:00
parent e0230ed104
commit bb4f3e1789
33 changed files with 959 additions and 17 deletions

View File

@ -29,6 +29,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

@ -3,6 +3,8 @@ from netbox.graphql.types import OrganizationalObjectType, PrimaryObjectType
__all__ = (
'AggregateType',
'FHRPGroupType',
'FHRPGroupAssignmentType',
'IPAddressType',
'IPRangeType',
'PrefixType',
@ -24,6 +26,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: