Revision f94a9680 htools/Ganeti/Query/Common.hs
b/htools/Ganeti/Query/Common.hs | ||
---|---|---|
104 | 104 |
timeStampFields :: (TimeStampObject a) => FieldList a b |
105 | 105 |
timeStampFields = |
106 | 106 |
[ (FieldDefinition "ctime" "CTime" QFTTimestamp "Creation timestamp", |
107 |
FieldSimple (rsNormal . cTimeOf)) |
|
107 |
FieldSimple (rsNormal . cTimeOf), QffNormal)
|
|
108 | 108 |
, (FieldDefinition "mtime" "MTime" QFTTimestamp "Modification timestamp", |
109 |
FieldSimple (rsNormal . mTimeOf)) |
|
109 |
FieldSimple (rsNormal . mTimeOf), QffNormal)
|
|
110 | 110 |
] |
111 | 111 |
|
112 | 112 |
-- | The list of UUID fields. |
113 | 113 |
uuidFields :: (UuidObject a) => String -> FieldList a b |
114 | 114 |
uuidFields name = |
115 | 115 |
[ (FieldDefinition "uuid" "UUID" QFTText (name ++ " UUID"), |
116 |
FieldSimple (rsNormal . uuidOf)) ] |
|
116 |
FieldSimple (rsNormal . uuidOf), QffNormal) ]
|
|
117 | 117 |
|
118 | 118 |
-- | The list of serial number fields. |
119 | 119 |
serialFields :: (SerialNoObject a) => String -> FieldList a b |
120 | 120 |
serialFields name = |
121 | 121 |
[ (FieldDefinition "serial_no" "SerialNo" QFTNumber |
122 | 122 |
(name ++ " object serial number, incremented on each modification"), |
123 |
FieldSimple (rsNormal . serialOf)) ] |
|
123 |
FieldSimple (rsNormal . serialOf), QffNormal) ]
|
|
124 | 124 |
|
125 | 125 |
-- | The list of tag fields. |
126 | 126 |
tagsFields :: (TagsObject a) => FieldList a b |
127 | 127 |
tagsFields = |
128 | 128 |
[ (FieldDefinition "tags" "Tags" QFTOther "Tags", |
129 |
FieldSimple (rsNormal . tagsOf)) ] |
|
129 |
FieldSimple (rsNormal . tagsOf), QffNormal) ]
|
|
130 | 130 |
|
131 | 131 |
-- * Generic parameter functions |
132 | 132 |
|
... | ... | |
169 | 169 |
qft = fromMaybe QFTOther $ field `Map.lookup` ndParamTypes |
170 | 170 |
desc = "The \"" ++ field ++ "\" node parameter" |
171 | 171 |
in (FieldDefinition full_name title qft desc, |
172 |
FieldConfig (ndParamGetter field)) |
|
172 |
FieldConfig (ndParamGetter field), QffNormal) |
Also available in: Unified diff