'Grabs the image metadata for an image with a supplied
identifier or raises an HTTPNotFound (404) response
:param request: The WSGI/Webob Request object
:param image_id: The opaque image identifier
:raises HTTPNotFound: if image does not exist'

def get_image_meta_or_404(self, request, image_id):

    context = request.context
    try:
        return registry.get_image_metadata(context, image_id)
    except exception.NotFound:
        LOG.debug('Image    with    identifier    %s    not    found', image_id)
        msg = (_('Image    with    identifier    %s    not    found') % image_id)
        raise webob.exc.HTTPNotFound(msg, request=request, content_type='text/plain')
    except exception.Forbidden:
        LOG.debug('Forbidden    image    access')
        raise webob.exc.HTTPForbidden(_('Forbidden    image    access'), request=request, content_type='text/plain')
