'Replaces the members of the image with those specified in the
body.  The body is a dict with the following format
{\'memberships\': [
{\'member_id\': <MEMBER_ID>,
[\'can_share\': [True|False]]}, ...'

@utils.mutating
def update_all(self, req, image_id, body):

    self._check_can_access_image_members(req.context)
    self._enforce(req, 'modify_member')
    self._raise_404_if_image_deleted(req, image_id)
    memberships = body.get('memberships')
    if memberships:
        new_number_of_members = len(body['memberships'])
        self._enforce_image_member_quota(req, new_number_of_members)
    try:
        registry.replace_members(req.context, image_id, body)
        self._update_store_acls(req, image_id)
    except exception.Invalid as e:
        LOG.debug(encodeutils.exception_to_unicode(e))
        raise webob.exc.HTTPBadRequest(explanation=e.msg)
    except exception.NotFound as e:
        LOG.debug(encodeutils.exception_to_unicode(e))
        raise webob.exc.HTTPNotFound(explanation=e.msg)
    except exception.Forbidden as e:
        LOG.debug(encodeutils.exception_to_unicode(e))
        raise webob.exc.HTTPNotFound(explanation=e.msg)
    return webob.exc.HTTPNoContent()
