diff --git a/htools/Ganeti/Queryd.hs b/htools/Ganeti/Queryd.hs index 1ac44fc16768c89cd8bbbb4496def12c39ae73af..eeeef7ac62e70974422cf5b18f8740d577432e53 100644 --- a/htools/Ganeti/Queryd.hs +++ b/htools/Ganeti/Queryd.hs @@ -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) diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py index 680ced658e14dd0f5d4c89fa60a75aea954fb2e4..309f37ecb69d069533338f53466d734170cb0ae9 100644 --- a/lib/client/gnt_cluster.py +++ b/lib/client/gnt_cluster.py @@ -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"]) diff --git a/lib/rapi/rlib2.py b/lib/rapi/rlib2.py index 4259a6e34d91b7496662866b166456849a3a273c..e77dca8a8c7ccc50558393b2104bba830412f2c2 100644 --- a/lib/rapi/rlib2.py +++ b/lib/rapi/rlib2.py @@ -214,7 +214,7 @@ class R_2_info(baserlib.OpcodeResource): """Returns cluster information. """ - client = self.GetClient() + client = self.GetClient(query=True) return client.QueryClusterInfo()