#NEWLINE# def fetch_images( ctx , cache , images_info , force_raw = True ) : #NEWLINE# #INDENT# 'Check for available disk space and fetch images using ImageCache.\n\n    :param ctx: context\n    :param cache: ImageCache instance to use for fetching\n    :param images_info: list of tuples (image href, destination path)\n    :param force_raw: boolean value, whether to convert the image to raw\n                      format\n    :raises: InstanceDeployFailure if unable to find enough disk space\n    ' #NEWLINE# try : #NEWLINE# #INDENT# image_cache . clean_up_caches ( ctx , cache . master_dir , images_info ) #NEWLINE# #UNINDENT# except exception . InsufficientDiskSpace as e : #NEWLINE# #INDENT# raise exception . InstanceDeployFailure ( reason = e ) #NEWLINE# #UNINDENT# for ( href , path ) in images_info : #NEWLINE# #INDENT# cache . fetch_image ( href , path , ctx = ctx , force_raw = force_raw )