Revision cd79cd83 htools/Ganeti/HTools/Types.hs
b/htools/Ganeti/HTools/Types.hs | ||
---|---|---|
173 | 173 |
|
174 | 174 |
-- | Instance specification type. |
175 | 175 |
$(THH.buildObject "ISpec" "iSpec" |
176 |
[ THH.renameField "MemorySize" $ THH.simpleField "memory-size" [t| Int |]
|
|
177 |
, THH.renameField "CpuCount" $ THH.simpleField "cpu-count" [t| Int |]
|
|
178 |
, THH.renameField "DiskSize" $ THH.simpleField "disk-size" [t| Int |]
|
|
179 |
, THH.renameField "DiskCount" $ THH.simpleField "disk-count" [t| Int |]
|
|
180 |
, THH.renameField "NicCount" $ THH.simpleField "nic-count" [t| Int |]
|
|
176 |
[ THH.renameField "MemorySize" $ THH.simpleField C.ispecMemSize [t| Int |]
|
|
177 |
, THH.renameField "CpuCount" $ THH.simpleField C.ispecCpuCount [t| Int |]
|
|
178 |
, THH.renameField "DiskSize" $ THH.simpleField C.ispecDiskSize [t| Int |]
|
|
179 |
, THH.renameField "DiskCount" $ THH.simpleField C.ispecDiskCount [t| Int |]
|
|
180 |
, THH.renameField "NicCount" $ THH.simpleField C.ispecNicCount [t| Int |]
|
|
181 | 181 |
]) |
182 | 182 |
|
183 | 183 |
-- | The default minimum ispec. |
... | ... | |
209 | 209 |
|
210 | 210 |
-- | Instance policy type. |
211 | 211 |
$(THH.buildObject "IPolicy" "iPolicy" |
212 |
[ THH.renameField "StdSpec" $ THH.simpleField "std" [t| ISpec |]
|
|
213 |
, THH.renameField "MinSpec" $ THH.simpleField "min" [t| ISpec |]
|
|
214 |
, THH.renameField "MaxSpec" $ THH.simpleField "max" [t| ISpec |]
|
|
212 |
[ THH.renameField "StdSpec" $ THH.simpleField C.ispecsStd [t| ISpec |]
|
|
213 |
, THH.renameField "MinSpec" $ THH.simpleField C.ispecsMin [t| ISpec |]
|
|
214 |
, THH.renameField "MaxSpec" $ THH.simpleField C.ispecsMax [t| ISpec |]
|
|
215 | 215 |
, THH.renameField "DiskTemplates" $ |
216 |
THH.simpleField "disk_templates" [t| [DiskTemplate] |]
|
|
216 |
THH.simpleField C.ipolicyDts [t| [DiskTemplate] |]
|
|
217 | 217 |
, THH.renameField "VcpuRatio" $ |
218 |
THH.simpleField "vcpu_ratio" [t| Double |]
|
|
218 |
THH.simpleField C.ipolicyVcpuRatio [t| Double |]
|
|
219 | 219 |
]) |
220 | 220 |
|
221 | 221 |
-- | Converts an ISpec type to a RSpec one. |
Also available in: Unified diff