'Delete a child or parent cell entry.  \'id\' is a cell name.'

@extensions.expected_errors((403, 404, 501))
@common.check_cells_enabled
def delete(self, req, id):

    context = req.environ['nova.context']
    context.can((cells_policies.POLICY_ROOT % 'delete'))
    try:
        num_deleted = self.cells_rpcapi.cell_delete(context, id)
    except exception.CellsUpdateUnsupported as e:
        raise exc.HTTPForbidden(explanation=e.format_message())
    if (num_deleted == 0):
        raise exc.HTTPNotFound(explanation=(_("Cell    %s    doesn't    exist.") % id))
