handleCall cdata QueryClusterInfo =
let cluster = configCluster cdata
hypervisors = clusterEnabledHypervisors cluster
+ diskTemplates = clusterEnabledDiskTemplates cluster
def_hv = case hypervisors of
x:_ -> showJSON x
[] -> JSNull
, ("reserved_lvs", showJSON $ clusterReservedLvs cluster)
, ("primary_ip_version",
showJSON . ipFamilyToVersion $ clusterPrimaryIpFamily cluster)
- , ("prealloc_wipe_disks",
- showJSON $ clusterPreallocWipeDisks cluster)
- , ("hidden_os", showJSON $ clusterHiddenOs cluster)
- , ("blacklisted_os", showJSON $ clusterBlacklistedOs cluster)
+ , ("prealloc_wipe_disks",
+ showJSON $ clusterPreallocWipeDisks cluster)
+ , ("hidden_os", showJSON $ clusterHiddenOs cluster)
+ , ("blacklisted_os", showJSON $ clusterBlacklistedOs cluster)
+ , ("enabled_disk_templates", showJSON diskTemplates)
]
in return . Ok . J.makeObj $ obj
Ok args -> handleClientMsg client creader args
-- | Main client loop: runs one loop of 'handleClient', and if that
--- doesn't repot a finished (closed) connection, restarts itself.
+-- doesn't report a finished (closed) connection, restarts itself.
clientLoop :: Client -> ConfigReader -> IO ()
clientLoop client creader = do
result <- handleClient client creader