'Update a child cell entry.  \'id\' is the cell name to update.'

@extensions.expected_errors((400, 403, 404, 501))
@common.check_cells_enabled
@validation.schema(cells.update_v20, '2.0', '2.0')
@validation.schema(cells.update, '2.1')
def update(self, req, id, body):

    context = req.environ['nova.context']
    context.can((cells_policies.POLICY_ROOT % 'update'))
    cell = body['cell']
    cell.pop('id', None)
    try:
        existing = self.cells_rpcapi.cell_get(context, id)
    except exception.CellNotFound as e:
        raise exc.HTTPNotFound(explanation=e.format_message())
    self._normalize_cell(cell, existing)
    try:
        cell = self.cells_rpcapi.cell_update(context, id, cell)
    except exception.CellNotFound as e:
        raise exc.HTTPNotFound(explanation=e.format_message())
    except exception.CellsUpdateUnsupported as e:
        raise exc.HTTPForbidden(explanation=e.format_message())
    return dict(cell=_scrub_cell(cell))
