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 <>
Reviewed-by: default avatarBernardo Dal Seno <>
parent 35ff270b
......@@ -411,6 +411,10 @@ def ShowClusterConfig(opts, args):
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",
("Enabled hypervisors", utils.CommaJoin(enabled_hv)),
("Hypervisor parameters", _FormatGroupedParams(result["hvparams"])),
("Hypervisor parameters", _FormatGroupedParams(hvparams)),
("OS-specific hypervisor parameters",
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