schema.py 658 B

123456789101112131415161718192021
  1. import graphene
  2. from netbox.graphql.fields import ObjectField, ObjectListField
  3. from .types import *
  4. class VirtualizationQuery(graphene.ObjectType):
  5. cluster = ObjectField(ClusterType)
  6. clusters = ObjectListField(ClusterType)
  7. cluster_group = ObjectField(ClusterGroupType)
  8. cluster_groups = ObjectListField(ClusterGroupType)
  9. cluster_type = ObjectField(ClusterTypeType)
  10. cluster_types = ObjectListField(ClusterTypeType)
  11. virtual_machine = ObjectField(VirtualMachineType)
  12. virtual_machines = ObjectListField(VirtualMachineType)
  13. vm_interface = ObjectField(VMInterfaceType)
  14. vm_interfaces = ObjectListField(VMInterfaceType)