'Delete an image, if allowed.
:param req: `wsgi.Request` object
:param id: Image identifier (integer)'

@wsgi.Controller.api_version('2.1', MAX_PROXY_API_SUPPORT_VERSION)
@extensions.expected_errors((403, 404))
@wsgi.response(204)
def delete(self, req, id):

    context = req.environ['nova.context']
    try:
        self._image_api.delete(context, id)
    except exception.ImageNotFound:
        explanation = _('Image    not    found.')
        raise webob.exc.HTTPNotFound(explanation=explanation)
    except exception.ImageNotAuthorized:
        explanation = _('You    are    not    allowed    to    delete    the    image.')
        raise webob.exc.HTTPForbidden(explanation=explanation)
