From 7a735d6ad3a7ceb91985014139974f36b676c73f Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Sun, 1 Feb 2009 09:48:23 +0000 Subject: [PATCH] LUQueryClusterInfo: filter hvparams We don't need to show hvparams for hypervisors which are not enabled on the cluster. Reviewed-by: iustinp --- lib/cmdlib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index d7f883b37..98b255a2e 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -2331,7 +2331,8 @@ class LUQueryClusterInfo(NoHooksLU): "master": cluster.master_node, "default_hypervisor": cluster.default_hypervisor, "enabled_hypervisors": cluster.enabled_hypervisors, - "hvparams": cluster.hvparams, + "hvparams": dict([(hypervisor, cluster.hvparams[hypervisor]) + for hypervisor in cluster.enabled_hypervisors]), "beparams": cluster.beparams, "candidate_pool_size": cluster.candidate_pool_size, } -- GitLab