'Removes an aggregate by id.'

@extensions.expected_errors((400, 404))
def delete(self, req, id):

    context = _get_context(req)
    context.can((aggr_policies.POLICY_ROOT % 'delete'))
    try:
        self.api.delete_aggregate(context, id)
    except exception.AggregateNotFound as e:
        raise exc.HTTPNotFound(explanation=e.format_message())
    except exception.InvalidAggregateAction as e:
        raise exc.HTTPBadRequest(explanation=e.format_message())
