Commit 1094acda authored by Guido Trotter's avatar Guido Trotter
Browse files

Show nic parameters in cluster info

Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
parent 5af3da74
......@@ -2518,6 +2518,7 @@ class LUQueryClusterInfo(NoHooksLU):
"hvparams": dict([(hypervisor, cluster.hvparams[hypervisor])
for hypervisor in cluster.enabled_hypervisors]),
"beparams": cluster.beparams,
"nicparams": cluster.nicparams,
"candidate_pool_size": cluster.candidate_pool_size,
"default_bridge": cluster.default_bridge,
"master_netdev": cluster.master_netdev,
......@@ -209,6 +209,17 @@ def ShowClusterMaster(opts, args):
return 0
def _PrintGroupedParams(paramsdict):
"""Print Grouped parameters (be, nic, disk) by group.
@type paramsdict: dict of dicts
@param paramsdict: {group: {param: value, ...}, ...}
for gr_name, gr_dict in paramsdict.items():
ToStdout(" - %s:", gr_name)
for item, val in gr_dict.iteritems():
ToStdout(" %s: %s", item, val)
def ShowClusterConfig(opts, args):
"""Shows cluster information.
......@@ -234,10 +245,7 @@ def ShowClusterConfig(opts, args):
ToStdout("Enabled hypervisors: %s", ", ".join(result["enabled_hypervisors"]))
ToStdout("Hypervisor parameters:")
for hv_name, hv_dict in result["hvparams"].items():
ToStdout(" - %s:", hv_name)
for item, val in hv_dict.iteritems():
ToStdout(" %s: %s", item, val)
ToStdout("Cluster parameters:")
ToStdout(" - candidate pool size: %s", result["candidate_pool_size"])
......@@ -247,10 +255,10 @@ def ShowClusterConfig(opts, args):
ToStdout(" - file storage path: %s", result["file_storage_dir"])
ToStdout("Default instance parameters:")
for gr_name, gr_dict in result["beparams"].items():
ToStdout(" - %s:", gr_name)
for item, val in gr_dict.iteritems():
ToStdout(" %s: %s", item, val)
ToStdout("Default nic parameters:")
return 0
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