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:
@ -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)
|
||||
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user