From 94d5cee9b7e73a026781f1e56fd6fcdfc39419c4 Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Fri, 18 Jan 2013 14:13:56 +0100
Subject: [PATCH] burnin: Don't keep hypervisor class around

Just determine whether it can migrate and keep that value instead of the
full hypervisor class.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
---
 lib/tools/burnin.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/tools/burnin.py b/lib/tools/burnin.py
index b4fc958a2..41873d05c 100755
--- a/lib/tools/burnin.py
+++ b/lib/tools/burnin.py
@@ -579,7 +579,8 @@ class Burner(object):
     self.cluster_default_nicparams = default_nic_params
     if self.hypervisor is None:
       self.hypervisor = self.cluster_info["default_hypervisor"]
-    self.hv_class = hypervisor.GetHypervisorClass(self.hypervisor)
+    self.hv_can_migrate = \
+      hypervisor.GetHypervisorClass(self.hypervisor).CAN_MIGRATE
 
   @_DoCheckInstances
   @_DoBatch(False)
@@ -1087,7 +1088,7 @@ class Burner(object):
         if opts.disk_template not in constants.DTS_MIRRORED:
           Log("Skipping migration (disk template %s does not support it)",
               opts.disk_template)
-        elif not self.hv_class.CAN_MIGRATE:
+        elif not self.hv_can_migrate:
           Log("Skipping migration (hypervisor %s does not support it)",
               self.hypervisor)
         else:
-- 
GitLab