def get_image_id(image): """Returns the image ID given either the ID itself or an image name.""" if is_number(image): return image possible_images = api.images(filter_term=image) if len(possible_images) == 1: image = possible_images[0][0] else: cli_print_table(possible_images, 'image') image = click.prompt( '\nMultiple matches found. Please enter image ID', type=int) return image
def get_image_id(image): """Returns the image ID given either the ID itself or an image name.""" if is_number(image): return image possible_images = api.images(filter_term=image) if len(possible_images) == 1: image = possible_images[0][0] else: cli_print_table(possible_images, 'image') image = click.prompt('\nMultiple matches found. Please enter image ID', type=int) return image
def images(filter_term, refresh): """Lists all of the images available in VCL.""" to_print = api.images(filter_term=filter_term, refresh=refresh) utils.cli_print_table(to_print, "image")
def images(filter_term, refresh): """Lists all of the images available in VCL.""" to_print = api.images(filter_term=filter_term, refresh=refresh) utils.cli_print_table(to_print, 'image')