Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotEq AttributeLoad NameLoad attr Str body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num If BoolOpOr CompareIn Str NameLoad CompareEq NameLoad Str body Return NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Dict Str Str NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Assign NameStore Call NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot CompareEq Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr body Return NameLoad Assign NameStore AttributeLoad NameLoad attr If CompareNotIn AttributeLoad NameLoad attr TupleLoad Str Str body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num If BoolOpOr CompareIn Str NameLoad CompareEq NameLoad Str body Return NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad Str body Return AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Yield NameLoad decorator_list decorator_list
N/A N/A 
Transparent image file caching middleware, designed to live on
Glance API nodes. When images are requested from the API node,
this middleware caches the returned image file to local filesystem.

When subsequent requests for the same image file are received,
the local cached copy of the image file is returned.
 N/A httplib N/A logging N/A re N/A webob glance image_cache glance registry glance.api.v1 images glance.common exception glance.common utils glance.common wsgi N/A logger N/A N/A logging getLogger __name__ N/A get_images_re N/A N/A re compile ^(/v\d+)*/images/([^\/]+)$ CacheFilter N/A N/A wsgi Middleware N/A __init__ N/A N/A self app conf N/A local_conf N/A N/A N/A self conf conf N/A N/A self cache N/A N/A image_cache ImageCache conf N/A N/A self serializer N/A N/A images ImageSerializer conf N/A N/A N/A logger info N/A _ Initialized image cache middleware N/A N/A N/A N/A super CacheFilter self __init__ app N/A process_request N/A N/A self request N/A N/A N/A 
        For requests for an image file, we check the local image
        cache. If present, we return the image file, appending
        the image metadata in headers. If not present, we pass
        the request on to the next application in the pipeline.
         N/A N/A N/A request method GET N/A N/A None N/A match N/A N/A get_images_re match N/A request path N/A N/A match N/A N/A None N/A image_id N/A N/A match group 2 N/A N/A N/A ? image_id N/A image_id detail N/A N/A None N/A N/A N/A N/A self cache is_cached image_id N/A N/A N/A N/A logger debug N/A _ Cache hit for image '%s' image_id N/A image_iterator N/A N/A self get_from_cache image_id N/A context N/A request context N/A N/A N/A image_meta N/A N/A registry get_image_metadata context image_id N/A N/A N/A image_meta N/A size N/A N/A N/A image_meta N/A size N/A N/A N/A self cache get_image_size image_id N/A response N/A N/A webob Response request request N/A N/A N/A N/A self serializer show response N/A image_iterator image_meta image_iterator image_meta N/A N/A N/A N/A exception NotFound N/A N/A msg N/A _ N/A Image cache contained image file for image '%s', however the registry did not contain metadata for that image! image_id N/A N/A N/A logger error msg N/A None N/A process_response N/A N/A self resp N/A N/A N/A 
        We intercept the response coming back from the main
        images Resource, caching image files to the cache
         N/A N/A N/A N/A N/A self get_status_code resp N/A httplib OK N/A N/A resp N/A request N/A resp request N/A N/A N/A request method N/A GET DELETE N/A N/A resp N/A match N/A N/A get_images_re match N/A request path N/A N/A match None N/A N/A resp N/A image_id N/A N/A match group 2 N/A N/A N/A ? image_id N/A image_id detail N/A N/A resp N/A N/A N/A N/A self cache is_cached image_id N/A N/A N/A N/A request method DELETE N/A N/A N/A N/A logger info N/A _ Removing image %s from cache image_id N/A N/A N/A N/A self cache delete_cached_image image_id N/A resp N/A N/A resp app_iter N/A N/A N/A self cache get_caching_iter image_id N/A resp app_iter N/A resp N/A get_status_code N/A N/A self response N/A N/A N/A 
        Returns the integer status code from the response, which
        can be either a Webob.Response (used in testing) or httplib.Response
         N/A N/A hasattr response status_int N/A N/A N/A response status_int N/A N/A response status N/A get_from_cache N/A N/A self image_id N/A N/A N/A Called if cache hit N/A N/A N/A N/A self cache open_for_read image_id cache_file N/A N/A chunks N/A N/A utils chunkiter cache_file N/A chunk chunks N/A N/A N/A chunk N/A N/A