schema.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import graphene
  2. from netbox.graphql.fields import ObjectField, ObjectListField
  3. from .types import *
  4. class IPAMQuery(graphene.ObjectType):
  5. asn = ObjectField(ASNType)
  6. asn_list = ObjectListField(ASNType)
  7. aggregate = ObjectField(AggregateType)
  8. aggregate_list = ObjectListField(AggregateType)
  9. ip_address = ObjectField(IPAddressType)
  10. ip_address_list = ObjectListField(IPAddressType)
  11. ip_range = ObjectField(IPRangeType)
  12. ip_range_list = ObjectListField(IPRangeType)
  13. prefix = ObjectField(PrefixType)
  14. prefix_list = ObjectListField(PrefixType)
  15. rir = ObjectField(RIRType)
  16. rir_list = ObjectListField(RIRType)
  17. role = ObjectField(RoleType)
  18. role_list = ObjectListField(RoleType)
  19. route_target = ObjectField(RouteTargetType)
  20. route_target_list = ObjectListField(RouteTargetType)
  21. service = ObjectField(ServiceType)
  22. service_list = ObjectListField(ServiceType)
  23. service_template = ObjectField(ServiceTemplateType)
  24. service_template_list = ObjectListField(ServiceTemplateType)
  25. fhrp_group = ObjectField(FHRPGroupType)
  26. fhrp_group_list = ObjectListField(FHRPGroupType)
  27. fhrp_group_assignment = ObjectField(FHRPGroupAssignmentType)
  28. fhrp_group_assignment_list = ObjectListField(FHRPGroupAssignmentType)
  29. vlan = ObjectField(VLANType)
  30. vlan_list = ObjectListField(VLANType)
  31. vlan_group = ObjectField(VLANGroupType)
  32. vlan_group_list = ObjectListField(VLANGroupType)
  33. vrf = ObjectField(VRFType)
  34. vrf_list = ObjectListField(VRFType)