Statistics
| Branch: | Tag: | Revision:

root / src / Ganeti / DataCollectors / InstStatusTypes.hs @ 17ae9cdb

History | View | Annotate | Download (1.5 kB)

1
{-# LANGUAGE TemplateHaskell #-}
2
{-| Type declarations specific for the instance status data collector.
3

    
4
-}
5

    
6
{-
7

    
8
Copyright (C) 2013 Google Inc.
9

    
10
This program is free software; you can redistribute it and/or modify
11
it under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 2 of the License, or
13
(at your option) any later version.
14

    
15
This program is distributed in the hope that it will be useful, but
16
WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18
General Public License for more details.
19

    
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23
02110-1301, USA.
24

    
25
-}
26

    
27
module Ganeti.DataCollectors.InstStatusTypes
28
  ( InstStatus(..)
29
  ) where
30

    
31

    
32
import Ganeti.DataCollectors.Types
33
import Ganeti.Hypervisor.Xen.Types
34
import Ganeti.Objects
35
import Ganeti.THH
36
import Ganeti.Types
37

    
38
-- | Data type representing the status of an instance to be returned.
39
$(buildObject "InstStatus" "iStat"
40
  [ simpleField "name"         [t| String |]
41
  , simpleField "uuid"         [t| String |]
42
  , simpleField "adminState"   [t| AdminState |]
43
  , simpleField "actualState"  [t| ActualState |]
44
  , optionalNullSerField $
45
    simpleField "uptime"       [t| String |]
46
  , simpleField "mtime"        [t| Double |]
47
  , simpleField "state_reason" [t| ReasonTrail |]
48
  , simpleField "status"       [t| DCStatus |]
49
  ])