root / src / Ganeti / Storage / Lvm / Types.hs @ bdf51a05
History | View | Annotate | Download (2 kB)
1 |
{-# LANGUAGE TemplateHaskell #-} |
---|---|
2 |
{-| LVM data types |
3 |
|
4 |
This module holds the definition of the data types describing the status of the |
5 |
disks according to LVM (and particularly the lvs tool). |
6 |
|
7 |
-} |
8 |
{- |
9 |
|
10 |
Copyright (C) 2013 Google Inc. |
11 |
|
12 |
This program is free software; you can redistribute it and/or modify |
13 |
it under the terms of the GNU General Public License as published by |
14 |
the Free Software Foundation; either version 2 of the License, or |
15 |
(at your option) any later version. |
16 |
|
17 |
This program is distributed in the hope that it will be useful, but |
18 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
19 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
20 |
General Public License for more details. |
21 |
|
22 |
You should have received a copy of the GNU General Public License |
23 |
along with this program; if not, write to the Free Software |
24 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
25 |
02110-1301, USA. |
26 |
|
27 |
-} |
28 |
module Ganeti.Storage.Lvm.Types |
29 |
( LVInfo(..) |
30 |
) where |
31 |
|
32 |
import Ganeti.THH |
33 |
|
34 |
|
35 |
-- | This is the format of the report produced by each data collector. |
36 |
$(buildObject "LVInfo" "lvi" |
37 |
[ simpleField "uuid" [t| String |] |
38 |
, simpleField "name" [t| String |] |
39 |
, simpleField "attr" [t| String |] |
40 |
, simpleField "major" [t| Int |] |
41 |
, simpleField "minor" [t| Int |] |
42 |
, simpleField "kernel_major" [t| Int |] |
43 |
, simpleField "kernel_minor" [t| Int |] |
44 |
, simpleField "size" [t| Int |] |
45 |
, simpleField "seg_count" [t| Int |] |
46 |
, simpleField "tags" [t| String |] |
47 |
, simpleField "modules" [t| String |] |
48 |
, simpleField "vg_uuid" [t| String |] |
49 |
, simpleField "vg_name" [t| String |] |
50 |
, simpleField "segtype" [t| String |] |
51 |
, simpleField "seg_start" [t| Int |] |
52 |
, simpleField "seg_start_pe" [t| Int |] |
53 |
, simpleField "seg_size" [t| Int |] |
54 |
, simpleField "seg_tags" [t| String |] |
55 |
, simpleField "seg_pe_ranges" [t| String |] |
56 |
, simpleField "devices" [t| String |] |
57 |
]) |