root / src / Ganeti / DataCollectors / InstStatusTypes.hs @ 17ae9cdb
History | View | Annotate | Download (1.5 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 | d7e9323b | Michele Tartara | ) where |
30 | d7e9323b | Michele Tartara | |
31 | d7e9323b | Michele Tartara | |
32 | fc4be2bf | Michele Tartara | import Ganeti.DataCollectors.Types |
33 | d4de2ea8 | Michele Tartara | import Ganeti.Hypervisor.Xen.Types |
34 | d7e9323b | Michele Tartara | import Ganeti.Objects |
35 | d7e9323b | Michele Tartara | import Ganeti.THH |
36 | 17ae9cdb | Michele Tartara | import Ganeti.Types |
37 | d7e9323b | Michele Tartara | |
38 | d7e9323b | Michele Tartara | -- | Data type representing the status of an instance to be returned. |
39 | d7e9323b | Michele Tartara | $(buildObject "InstStatus" "iStat" |
40 | d7e9323b | Michele Tartara | [ simpleField "name" [t| String |] |
41 | d7e9323b | Michele Tartara | , simpleField "uuid" [t| String |] |
42 | d7e9323b | Michele Tartara | , simpleField "adminState" [t| AdminState |] |
43 | d4de2ea8 | Michele Tartara | , simpleField "actualState" [t| ActualState |] |
44 | d7e9323b | Michele Tartara | , optionalNullSerField $ |
45 | d7e9323b | Michele Tartara | simpleField "uptime" [t| String |] |
46 | d7e9323b | Michele Tartara | , simpleField "mtime" [t| Double |] |
47 | 17ae9cdb | Michele Tartara | , simpleField "state_reason" [t| ReasonTrail |] |
48 | fc4be2bf | Michele Tartara | , simpleField "status" [t| DCStatus |] |
49 | d7e9323b | Michele Tartara | ]) |