Statistics
| Branch: | Tag: | Revision:

root / src / Ganeti / DataCollectors / InstStatusTypes.hs @ fc4be2bf

History | View | Annotate | Download (1.4 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

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