'Queries the placement API for a resource provider\'s aggregates.
Returns a set() of aggregate UUIDs or None if no such resource provider
was found or there was an error communicating with the placement API.
:param rp_uuid: UUID of the resource provider to grab aggregates for.'

@safe_connect
def _get_provider_aggregates(self, rp_uuid):

    resp = self.get(('/resource_providers/%s/aggregates' % rp_uuid), version='1.1')
    if (resp.status_code == 200):
        data = resp.json()
        return set(data['aggregates'])
    placement_req_id = get_placement_request_id(resp)
    if (resp.status_code == 404):
        msg = _LW("[%(placement_req_id)s]    Tried    to    get    a    provider's    aggregates;    however    the    provider    %(uuid)s    does    not    exist.")
        args = {'uuid': rp_uuid, 'placement_req_id': placement_req_id}
        LOG.warning(msg, args)
    else:
        msg = _LE('[%(placement_req_id)s]    Failed    to    retrieve    aggregates    from    placement    API    for    resource    provider    with    UUID    %(uuid)s.    Got    %(status_code)d:    %(err_text)s.')
        args = {'placement_req_id': placement_req_id, 'uuid': rp_uuid, 'status_code': resp.status_code, 'err_text': resp.text}
        LOG.error(msg, args)
