- disk = case getIntElement "disk_usage" a of
- Bad _ -> let log_sz = liftM2 (+)
- (getIntElement "sda_size" a)
- (getIntElement "sdb_size" a)
- in liftM2 (+) log_sz (Ok $ drbdOverhead * 2)
- x@(Ok _) -> x
- bep = fromObj "beparams" a
+ disk = getIntElement "disk_usage" a
+ mem = getObjectElement "beparams" a >>= getIntElement "memory"