Change in vdsm[master]: recovery: clean the VM recovery procedure

fromani at redhat.com fromani at redhat.com
Fri Apr 4 10:36:18 UTC 2014


Francesco Romani has uploaded a new change for review.

Change subject: recovery: clean the VM recovery procedure
......................................................................

recovery: clean the VM recovery procedure

This tiny patch cleans up and optimizes the VM recovery detection.
While looping on the VMs returned by libvirt, we must check each one
of them to know if it has to be handled by VDSM.
This check, however, considers only the properties of the VM under exam,
so we can do this in one go instead of using two loops
(actually an explicit loop and one implicit in a list comprehension)

This patch is not for performance but to to make the code a tiny bit
cleaner and to silence

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/7063/consoleText

Change-Id: Idf09400276d9fcf24a0ad6673ee1d12f19a92195
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/clientIF.py
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/26/26426/1

diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index 9dbb5f6..eac7950 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -489,8 +489,9 @@
                                    domId, e.get_error_code(), exc_info=True)
                     raise
             else:
-                vms.append(vm)
-        return [vm for vm in vms if self.isVDSMVm(vm)]
+                if self.isVDSMVm(vm):
+                    vms.append(vm)
+        return vms
 
     def _recoverVm(self, vmid):
         try:


-- 
To view, visit http://gerrit.ovirt.org/26426
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf09400276d9fcf24a0ad6673ee1d12f19a92195
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list