def post_test(self): try: self.clone_vm.destroy() for snapshot_image in self.snapshot_images: sp_admin.remove_volume(snapshot_image) except Exception as error: logging.error(str(error))
def post_test(self): try: self.clone_vm.destroy() for image in self.trash: sp_admin.remove_volume(image) except Exception as error: logging.error(str(error))
def clean_images(self): for img in self.trash: try: if hasattr(img, 'remove'): img.remove() else: sp_admin.remove_volume(img) except Exception as e: logging.warn(str(e))
def clean_images(self): """ Cleanup all data images """ for img in set(self.trash): try: # A QemuImg object img.remove() except AttributeError: # A StorageVolume object sp_admin.remove_volume(img) except Exception as e: logging.warn(str(e))
def _remove_images(self): for img in self._trash: sp_admin.remove_volume(img)
def post_test(self): for image in self.trash: sp_admin.remove_volume(image)