.. to include optional values returned by KVM and XEN hypervisors. Signed-off-by: Petr Pudlak <[email protected]> --- src/Ganeti/Rpc.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/Ganeti/Rpc.hs b/src/Ganeti/Rpc.hs index c6e3ed8..2dcf724 100644 --- a/src/Ganeti/Rpc.hs +++ b/src/Ganeti/Rpc.hs @@ -510,11 +510,14 @@ $(buildObject "StorageInfo" "storageInfo" , optionalField $ simpleField "storage_size" [t| Int |] ]) --- | We only provide common fields as described in hv_base.py. +-- | Common fields (as described in hv_base.py) are mandatory, +-- other fields are optional. $(buildObject "HvInfo" "hvInfo" - [ simpleField "memory_total" [t| Int |] + [ optionalField $ simpleField C.hvNodeinfoKeyVersion [t| [Int] |] + , simpleField "memory_total" [t| Int |] , simpleField "memory_free" [t| Int |] , simpleField "memory_dom0" [t| Int |] + , optionalField $ simpleField "memory_hv" [t| Int |] , simpleField "cpu_total" [t| Int |] , simpleField "cpu_nodes" [t| Int |] , simpleField "cpu_sockets" [t| Int |] -- 2.0.0.526.g5318336
