def pull(self):
        """
        Pull this image from URL.

        :return: None
        """
        if not os.path.exists(CONU_IMAGES_STORE):
            os.makedirs(CONU_IMAGES_STORE)
        logger.debug(
            "Try to pull: {} -> {}".format(self.location, self.local_location))

        if not self._is_local():
            compressed_location = self.local_location + ".xz"
            run_cmd(["curl", "-f", "-L", "-o", compressed_location, self.location])
            run_cmd(["xz", "-d", compressed_location])
        else:
            if self.location.endswith("xz"):
                compressed_location = self.local_location + ".xz"
                run_cmd(["cp", self.location, compressed_location])
                run_cmd(["xz", "-d", compressed_location])
            else:
                run_cmd(["cp", self.location, self.local_location])
def pull ( self ) : if not os . path . exists ( CONU_IMAGES_STORE ) : os . makedirs ( CONU_IMAGES_STORE ) logger . debug ( "Try to pull: {} -> {}" . format ( self . location , self . local_location ) ) if not self . _is_local ( ) : compressed_location = self . local_location + ".xz" run_cmd ( [ "curl" , "-f" , "-L" , "-o" , compressed_location , self . location ] ) run_cmd ( [ "xz" , "-d" , compressed_location ] ) else : if self . location . endswith ( "xz" ) : compressed_location = self . local_location + ".xz" run_cmd ( [ "cp" , self . location , compressed_location ] ) run_cmd ( [ "xz" , "-d" , compressed_location ] ) else : run_cmd ( [ "cp" , self . location , self . local_location ] )
Pull this image from URL.

        :return: None