def index_shared_images(self, req, id): """ Retrieves list of image memberships for the given member. :param req: the Request object coming from the wsgi layer :param id: the opaque member identifier :retval The response body is a mapping of the following form:: {'shared_images': [ {'image_id': <IMAGE>, 'can_share': <SHARE_PERMISSION>, ...}, ... ]} """ try: members = registry.get_member_images(req.context, id) except exception.NotFound, e: msg = "%s" % e logger.debug(msg) raise webob.exc.HTTPNotFound(msg)
def index_shared_images(self, req, id): """ Retrieves list of image memberships for the given member. :param req: the Request object coming from the wsgi layer :param id: the opaque member identifier :retval The response body is a mapping of the following form:: {'shared_images': [ {'image_id': <IMAGE>, 'can_share': <SHARE_PERMISSION>, ...}, ... ]} """ try: members = registry.get_member_images(req.context, id) except exception.NotFound, e: msg = "%s" % e LOG.debug(msg) raise webob.exc.HTTPNotFound(msg)
def shared_images(self, req, member): """ Retrieves list of image memberships for the given member. :param req: the Request object coming from the wsgi layer :param member: the opaque member identifier :retval The response body is a mapping of the following form:: {'shared_images': [ {'image_id': <IMAGE>, 'can_share': <SHARE_PERMISSION>, ...}, ... ]} """ try: members = registry.get_member_images(self.options, req.context, member) except exception.NotFound, e: msg = "%s" % e logger.debug(msg) raise HTTPNotFound(msg, request=req, content_type="text/plain")