Commit df5e2a28 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

gnt-cluster info: only parameters for enabled hypervisors



In the output of gnt-cluster info, restrict the hypervisor parameters
to those hypervisors that are enabled. This fixes issue 443.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
parent 35ff270b
......@@ -411,6 +411,10 @@ def ShowClusterConfig(opts, args):
else:
reserved_lvs = "(none)"
enabled_hv = result["enabled_hypervisors"]
hvparams = dict((k, v) for k, v in result["hvparams"].iteritems()
if k in enabled_hv)
info = [
("Cluster name", result["name"]),
("Cluster UUID", result["uuid"]),
......@@ -426,10 +430,9 @@ def ShowClusterConfig(opts, args):
("Tags", tags),
("Default hypervisor", result["default_hypervisor"]),
("Enabled hypervisors",
utils.CommaJoin(result["enabled_hypervisors"])),
("Enabled hypervisors", utils.CommaJoin(enabled_hv)),
("Hypervisor parameters", _FormatGroupedParams(result["hvparams"])),
("Hypervisor parameters", _FormatGroupedParams(hvparams)),
("OS-specific hypervisor parameters",
_FormatGroupedParams(result["os_hvp"])),
......
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