def _build_datacenter_groups(hostvars):
    """
    Return a dictionary of groups, one for each datacenter, containing all
    of the servers in that datacenter
    :param hostvars: The hostvars dictionary to parse
    :return: Dictionary of dynamically built Datacenter groups
    """
    result = {}
    hostvars = hostvars.get('hostvars')
    for server in hostvars:
        datacenter = hostvars[server]['clc_data']['locationId']
        if datacenter not in result:
            result[datacenter] = []
        result[datacenter] += [server]
    return result
