mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-20 20:32:25 -06:00
#9816: Add TunnelGroup
This commit is contained in:
@@ -56,6 +56,12 @@ class VPNQuery(graphene.ObjectType):
|
||||
def resolve_tunnel_list(root, info, **kwargs):
|
||||
return gql_query_optimizer(models.Tunnel.objects.all(), info)
|
||||
|
||||
tunnel_group = ObjectField(TunnelGroupType)
|
||||
tunnel_group_list = ObjectListField(TunnelGroupType)
|
||||
|
||||
def resolve_tunnel_group_list(root, info, **kwargs):
|
||||
return gql_query_optimizer(models.TunnelGroup.objects.all(), info)
|
||||
|
||||
tunnel_termination = ObjectField(TunnelTerminationType)
|
||||
tunnel_termination_list = ObjectListField(TunnelTerminationType)
|
||||
|
||||
|
||||
@@ -12,11 +12,20 @@ __all__ = (
|
||||
'IPSecProposalType',
|
||||
'L2VPNType',
|
||||
'L2VPNTerminationType',
|
||||
'TunnelGroupType',
|
||||
'TunnelTerminationType',
|
||||
'TunnelType',
|
||||
)
|
||||
|
||||
|
||||
class TunnelGroupType(OrganizationalObjectType):
|
||||
|
||||
class Meta:
|
||||
model = models.TunnelGroup
|
||||
fields = '__all__'
|
||||
filterset_class = filtersets.TunnelGroupFilterSet
|
||||
|
||||
|
||||
class TunnelTerminationType(CustomFieldsMixin, TagsMixin, ObjectType):
|
||||
|
||||
class Meta:
|
||||
|
||||
Reference in New Issue
Block a user