def get_image(server_):
    images = avail_images()
    server_image = str(config.get_cloud_config_value(
        'image', server_, __opts__, search_global=False
    ))
    for image in images:
        if server_image in (images[image]['name'], images[image]['id']):
            return images[image]['id']
    raise SaltCloudNotFound(
        'The specified image, \'{0}\', could not be found.'.format(server_image)
    )
Return the image object to use.
dataset/ETHPy150Open saltstack/salt/salt/cloud/clouds/scaleway.py/get_image