Return available Packet os images.

    CLI Example:

    .. code-block:: bash

        salt-cloud --list-images packet-provider
        salt-cloud -f avail_images packet-provider

def avail_images(call=None):
    '''
    Return available Packet os images.

    CLI Example:

    .. code-block:: bash

        salt-cloud --list-images packet-provider
        salt-cloud -f avail_images packet-provider
    '''
    if call == 'action':
        raise SaltCloudException(
            'The avail_images function must be called with -f or --function.'
        )

    ret = {}

    vm_ = get_configured_provider()
    manager = packet.Manager(auth_token=vm_['token'])

    ret = {}

    for os_system in manager.list_operating_systems():
        ret[os_system.name] = os_system.__dict__

    return ret