Commit 37248170 authored by Jose A. Lopes's avatar Jose A. Lopes
Browse files

Hs2Py constants: add storage fields



Add storage fields constants to the Haskell to Python constant
generation.  These constants fetch their values from the Haskell data
type 'StorageField'.
Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent ccf17aa3
...@@ -882,6 +882,32 @@ stRados = Types.storageTypeToRaw StorageRados ...@@ -882,6 +882,32 @@ stRados = Types.storageTypeToRaw StorageRados
storageTypes :: FrozenSet String storageTypes :: FrozenSet String
storageTypes = ConstantUtils.mkSet $ map Types.storageTypeToRaw [minBound..] storageTypes = ConstantUtils.mkSet $ map Types.storageTypeToRaw [minBound..]
-- * Storage fields
-- ** First two are valid in LU context only, not passed to backend
sfNode :: String
sfNode = "node"
sfType :: String
sfType = "type"
-- ** and the rest are valid in backend
sfAllocatable :: String
sfAllocatable = Types.storageFieldToRaw SFAllocatable
sfFree :: String
sfFree = Types.storageFieldToRaw SFFree
sfName :: String
sfName = Types.storageFieldToRaw SFName
sfSize :: String
sfSize = Types.storageFieldToRaw SFSize
sfUsed :: String
sfUsed = Types.storageFieldToRaw SFUsed
-- * Disk template types -- * Disk template types
dtDiskless :: String dtDiskless :: String
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment