Commit a2160e57 authored by Iustin Pop's avatar Iustin Pop
Browse files

Complete and enable the haskell QueryClusterInfo call



Since we have now access to all cluster parameters, we can "fill" the
parameters, and can finally enable it in CLI/RAPI.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarAgata Murawska <agatamurawska@google.com>
parent b09cce64
......@@ -66,8 +66,6 @@ handleCall cdata QueryClusterInfo =
hypervisors = clusterEnabledHypervisors cluster
bits = show (bitSize (0::Int)) ++ "bits"
arch_tuple = [bits, arch]
-- FIXME: this is for the missing *params fields
empty_params = showJSON $ J.makeObj ([]::[(String, JSValue)])
obj = [ ("software_version", showJSON $ C.releaseVersion)
, ("protocol_version", showJSON $ C.protocolVersion)
, ("config_version", showJSON $ C.configVersion)
......@@ -78,15 +76,14 @@ handleCall cdata QueryClusterInfo =
, ("master", showJSON $ clusterMasterNode cluster)
, ("default_hypervisor", showJSON $ head hypervisors)
, ("enabled_hypervisors", showJSON $ hypervisors)
-- FIXME: *params missing
, ("hvparams", empty_params)
, ("os_hvp", empty_params)
, ("hvparams", showJSON $ clusterHvparams cluster)
, ("os_hvp", showJSON $ clusterOsHvp cluster)
, ("beparams", showJSON $ clusterBeparams cluster)
, ("osparams", showJSON $ clusterOsparams cluster)
, ("ipolicy", showJSON $ clusterIpolicy cluster)
, ("nicparams", showJSON $ clusterNicparams cluster)
, ("ndparams", showJSON $ clusterNdparams cluster)
, ("diskparams", empty_params)
, ("diskparams", showJSON $ clusterDiskparams cluster)
, ("candidate_pool_size",
showJSON $ clusterCandidatePoolSize cluster)
, ("master_netdev", showJSON $ clusterMasterNetdev cluster)
......
......@@ -389,7 +389,7 @@ def ShowClusterConfig(opts, args):
@return: the desired exit code
"""
cl = GetClient()
cl = GetClient(query=True)
result = cl.QueryClusterInfo()
ToStdout("Cluster name: %s", result["name"])
......
......@@ -214,7 +214,7 @@ class R_2_info(baserlib.OpcodeResource):
"""Returns cluster information.
"""
client = self.GetClient()
client = self.GetClient(query=True)
return client.QueryClusterInfo()
......
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