schema.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import graphene
  2. from netbox.graphql.fields import ObjectField, ObjectListField
  3. from .types import *
  4. class IPAMQuery(graphene.ObjectType):
  5. aggregate = ObjectField(AggregateType)
  6. aggregate_list = ObjectListField(AggregateType)
  7. ip_address = ObjectField(IPAddressType)
  8. ip_address_list = ObjectListField(IPAddressType)
  9. ip_range = ObjectField(IPRangeType)
  10. ip_range_list = ObjectListField(IPRangeType)
  11. prefix = ObjectField(PrefixType)
  12. prefix_list = ObjectListField(PrefixType)
  13. rir = ObjectField(RIRType)
  14. rir_list = ObjectListField(RIRType)
  15. role = ObjectField(RoleType)
  16. role_list = ObjectListField(RoleType)
  17. route_target = ObjectField(RouteTargetType)
  18. route_target_list = ObjectListField(RouteTargetType)
  19. service = ObjectField(ServiceType)
  20. service_list = ObjectListField(ServiceType)
  21. vlan = ObjectField(VLANType)
  22. vlan_list = ObjectListField(VLANType)
  23. vlan_group = ObjectField(VLANGroupType)
  24. vlan_group_list = ObjectListField(VLANGroupType)
  25. vrf = ObjectField(VRFType)
  26. vrf_list = ObjectListField(VRFType)