Revision 3771d104

b/htools/Ganeti/HTools/Types.hs
36 36
    , AllocPolicy(..)
37 37
    , allocPolicyFromRaw
38 38
    , allocPolicyToRaw
39
    , InstanceStatus(..)
40
    , instanceStatusFromRaw
41
    , instanceStatusToRaw
39 42
    , RSpec(..)
40 43
    , DynUtil(..)
41 44
    , zeroUtil
......
110 113
         ])
111 114
$(THH.makeJSONInstance ''AllocPolicy)
112 115

  
116
-- | The Instance real state type.
117
$(THH.declareSADT "InstanceStatus"
118
         [ ("AdminDown", 'C.inststAdmindown)
119
         , ("AdminOffline", 'C.inststAdminoffline)
120
         , ("ErrorDown", 'C.inststErrordown)
121
         , ("ErrorUp", 'C.inststErrorup)
122
         , ("NodeDown", 'C.inststNodedown)
123
         , ("NodeOffline", 'C.inststNodeoffline)
124
         , ("Running", 'C.inststRunning)
125
         , ("WrongNode", 'C.inststWrongnode)
126
         ])
127
$(THH.makeJSONInstance ''InstanceStatus)
128

  
113 129
-- | The resource spec type.
114 130
data RSpec = RSpec
115 131
    { rspecCpu  :: Int  -- ^ Requested VCPUs

Also available in: Unified diff