def get_peer_values(field, db_object):
    """Retrieves the list of peers associated with the cluster."""
    peers = []
    for entry in getattr(db_object, 'peers', []):
        hosts = []
        for ientry in getattr(entry, 'hosts', []):
            hosts.append(ientry.hostname)

        val = {'name': entry.name,
               'status': entry.status,
               'hosts': hosts,
               'uuid': entry.uuid}

        peers.append(val)

    return peers