def build_mac_map(nova):
    """Build a Mac -> (IP, name, aliases) map for a list of Nova servers."""
    mac_map = {}
    for server in nova.servers.list():
        name = server.name
        aliases = [name, getattr(server, 'OS-EXT-SRV-ATTR:instance_name')]
        if name.startswith('overcloud-'):
            aliases.append(name[10:])
        for addr in server.addresses['ctlplane']:
            mac = addr['OS-EXT-IPS-MAC:mac_addr']
            mac_map[mac] = (addr['addr'], name, aliases)
    return mac_map