Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (1.7 kB)

1 d7e9323b Michele Tartara
{-# LANGUAGE TemplateHaskell #-}
2 d7e9323b Michele Tartara
{-| Type declarations specific for the instance status data collector.
3 d7e9323b Michele Tartara
4 d7e9323b Michele Tartara
-}
5 d7e9323b Michele Tartara
6 d7e9323b Michele Tartara
{-
7 d7e9323b Michele Tartara
8 d7e9323b Michele Tartara
Copyright (C) 2013 Google Inc.
9 d7e9323b Michele Tartara
10 d7e9323b Michele Tartara
This program is free software; you can redistribute it and/or modify
11 d7e9323b Michele Tartara
it under the terms of the GNU General Public License as published by
12 d7e9323b Michele Tartara
the Free Software Foundation; either version 2 of the License, or
13 d7e9323b Michele Tartara
(at your option) any later version.
14 d7e9323b Michele Tartara
15 d7e9323b Michele Tartara
This program is distributed in the hope that it will be useful, but
16 d7e9323b Michele Tartara
WITHOUT ANY WARRANTY; without even the implied warranty of
17 d7e9323b Michele Tartara
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 d7e9323b Michele Tartara
General Public License for more details.
19 d7e9323b Michele Tartara
20 d7e9323b Michele Tartara
You should have received a copy of the GNU General Public License
21 d7e9323b Michele Tartara
along with this program; if not, write to the Free Software
22 d7e9323b Michele Tartara
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 d7e9323b Michele Tartara
02110-1301, USA.
24 d7e9323b Michele Tartara
25 d7e9323b Michele Tartara
-}
26 d7e9323b Michele Tartara
27 d7e9323b Michele Tartara
module Ganeti.DataCollectors.InstStatusTypes
28 d7e9323b Michele Tartara
  ( InstStatus(..)
29 79731e21 Michele Tartara
  , ReportData(..)
30 d7e9323b Michele Tartara
  ) where
31 d7e9323b Michele Tartara
32 d7e9323b Michele Tartara
33 fc4be2bf Michele Tartara
import Ganeti.DataCollectors.Types
34 d4de2ea8 Michele Tartara
import Ganeti.Hypervisor.Xen.Types
35 d7e9323b Michele Tartara
import Ganeti.Objects
36 d7e9323b Michele Tartara
import Ganeti.THH
37 17ae9cdb Michele Tartara
import Ganeti.Types
38 d7e9323b Michele Tartara
39 d7e9323b Michele Tartara
-- | Data type representing the status of an instance to be returned.
40 d7e9323b Michele Tartara
$(buildObject "InstStatus" "iStat"
41 d7e9323b Michele Tartara
  [ simpleField "name"         [t| String |]
42 d7e9323b Michele Tartara
  , simpleField "uuid"         [t| String |]
43 d7e9323b Michele Tartara
  , simpleField "adminState"   [t| AdminState |]
44 d4de2ea8 Michele Tartara
  , simpleField "actualState"  [t| ActualState |]
45 d7e9323b Michele Tartara
  , optionalNullSerField $
46 d7e9323b Michele Tartara
    simpleField "uptime"       [t| String |]
47 d7e9323b Michele Tartara
  , simpleField "mtime"        [t| Double |]
48 17ae9cdb Michele Tartara
  , simpleField "state_reason" [t| ReasonTrail |]
49 fc4be2bf Michele Tartara
  , simpleField "status"       [t| DCStatus |]
50 d7e9323b Michele Tartara
  ])
51 79731e21 Michele Tartara
52 79731e21 Michele Tartara
$(buildObject "ReportData" "rData"
53 79731e21 Michele Tartara
  [ simpleField "instances" [t| [InstStatus] |]
54 79731e21 Michele Tartara
  , simpleField "status"    [t| DCStatus |]
55 79731e21 Michele Tartara
  ])