'Adds a membership to the image.
:param req: the Request object coming from the wsgi layer
:param image_id: the image identifier
:param member_id: the member identifier
:returns: The response body is a mapping of the following form
{\'member_id\': <MEMBER>,
\'image_id\': <IMAGE>,
\'status\': <MEMBER_STATUS>,
\'created_at\': ..,
\'updated_at\': ..}'

@utils.mutating
def update(self, req, image_id, member_id, status):

    image = self._lookup_image(req, image_id)
    member_repo = self._get_member_repo(req, image)
    member = self._lookup_member(req, image, member_id)
    try:
        member.status = status
        member_repo.save(member)
        return member
    except exception.Forbidden:
        msg = (_('Not    allowed    to    update    members    for    image    %s.') % image_id)
        LOG.warning(msg)
        raise webob.exc.HTTPForbidden(explanation=msg)
    except ValueError as e:
        msg = (_('Incorrect    request:    %s') % encodeutils.exception_to_unicode(e))
        LOG.warning(msg)
        raise webob.exc.HTTPBadRequest(explanation=msg)
