Return a list of VMs

    CLI Example

    .. code-block:: bash

        salt-cloud -f list_nodes myopenstack

def list_nodes(conn=None, call=None):
    '''
    Return a list of VMs

    CLI Example

    .. code-block:: bash

        salt-cloud -f list_nodes myopenstack

    '''
    if call == 'action':
        raise SaltCloudSystemExit(
            'The list_nodes function must be called with -f or --function.'
        )
    ret = {}
    for node, info in list_nodes_full(conn=conn).items():
        for key in ('id', 'name', 'size', 'state', 'private_ips', 'public_ips', 'floating_ips', 'fixed_ips', 'image'):
            ret.setdefault(node, {}).setdefault(key, info.get(key))

    return ret