def run(self): """Run tear down of installation source image.""" if not url_target_is_tarfile(self._url): unmount(self._image_mount_point, raise_exc=True) #FIXME: Payload and LiveOS stuff # FIXME: do we need a task for this? if os.path.exists(IMAGE_DIR + "/LiveOS"): # FIXME: catch and pass the exception unmount(IMAGE_DIR, raise_exc=True) os.rmdir(IMAGE_DIR) if not get_local_image_path_from_url(self._url): if os.path.exists(self._image_path): os.unlink(self._image_path)
def run(self): """Run installation source image check. :returns: space required for the image in bytes :rtype: int """ size = 0 local_image_path = get_local_image_path_from_url(self._url) if local_image_path: size = self._check_local_image(local_image_path) else: size = self._check_remote_image(self._url, self._proxy) log.debug("Required space: %s", size) return size
def run(self): """Run set up or installation source.""" image_path_from_url = get_local_image_path_from_url(self._url) if image_path_from_url: self._image_path = image_path_from_url else: self._download_image(self._url, self._image_path, self._session) # TODO - do we use it at all in LiveImage ## Used to make install progress % look correct #self._adj_size = os.stat(self.image_path)[stat.ST_SIZE] if self._checksum: self._check_image_sum(self._image_path, self._checksum) if not url_target_is_tarfile(self._url): self._mount_image(self._image_path, self._image_mount_point) log.debug("Source image file path: %s", self._image_path) return self._image_path