From 79ab6f54397005f8d6ca83c45e95f2a4ed716e4a Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Thu, 4 Jul 2019 16:26:12 +0930 Subject: [PATCH] add enum for VmState and add comments for info array Signed-off-by: Alexis Tyler --- app/graphql/schema/types/info/array.graphql | 2 ++ app/graphql/schema/types/vms/domain.graphql | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/graphql/schema/types/info/array.graphql b/app/graphql/schema/types/info/array.graphql index de146ea71..e7b14a542 100644 --- a/app/graphql/schema/types/info/array.graphql +++ b/app/graphql/schema/types/info/array.graphql @@ -3,7 +3,9 @@ type Info { } enum InfoArrayState { + """Array is started""" started + """Array is stopped""" stopped } diff --git a/app/graphql/schema/types/vms/domain.graphql b/app/graphql/schema/types/vms/domain.graphql index 2457d7707..b37068a15 100644 --- a/app/graphql/schema/types/vms/domain.graphql +++ b/app/graphql/schema/types/vms/domain.graphql @@ -2,6 +2,13 @@ type Vms { domains: [Domain] @func(module: "vms/get-domains", result: "json") } +enum VmState { + """Machine is stopped""" + shut_off + """Machine is running""" + running +} + """A virtual machine""" type Domain { uuid: ID! @@ -16,7 +23,7 @@ type Domain { securityLabel: SecurityLabel """A friendly name for the vm""" name: String - state: String + state: VmState memory: Int vcpus: Int cpuTime: Int