Workaround for virtualbox snapshot lookup

Change-Id: Ifc912183aceb3ee3fe328805eda69c6057567087
Closes-Bug: #1376778
This commit is contained in:
Eugene Korekin
2014-10-02 19:00:16 +04:00
parent 57a579465c
commit 7346289f23

View File

@@ -141,14 +141,7 @@ class DevopsDriver(object):
:rtype : Boolean
"""
ret = self.conn.lookupByUUIDString(node.uuid)
try:
ret.snapshotLookupByName(name, 0)
return True
except libvirt.libvirtError as e:
if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN_SNAPSHOT:
return False
else:
raise
return name in ret.snapshotListNames()
@retry()
def volume_exists(self, volume):