def avail_images(call=None):
    if call == 'action':
        raise SaltCloudSystemExit(
            'The avail_images function must be called with '
            '-f or --function, or with the --list-images option'
        )

    user = config.get_cloud_config_value(
        'user', get_configured_provider(), __opts__, search_global=False
    )

    img_url = config.get_cloud_config_value(
        'image_url',
        get_configured_provider(),
        __opts__,
        search_global=False,
        default='{0}{1}/{2}/images'.format(DEFAULT_LOCATION, JOYENT_API_HOST_SUFFIX, user)
    )

    if not img_url.startswith('http://') and not img_url.startswith('https://'):
        img_url = '{0}://{1}'.format(_get_proto(), img_url)

    rcode, data = query(command='my/images', method='GET')
    log.debug(data)

    ret = {}
    for image in data:
        ret[image['name']] = image
    return ret
If no option is selected initially, select the first option.
dataset/ETHPy150Open saltstack/salt/salt/cloud/clouds/joyent.py/avail_images--crossover with--dataset/ETHPy150Open jmcarp/robobrowser/robobrowser/forms/fields.py/Select._set_initial