~ubuntu-branches/ubuntu/raring/glance/raring-updates

« back to all changes in this revision

Viewing changes to glance/image_cache/prefetcher.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Adam Gandleman, Chuck Short
  • Date: 2012-08-16 13:58:32 UTC
  • mfrom: (1.1.41)
  • Revision ID: package-import@ubuntu.com-20120816135832-4m40ppptd1l073fr
Tags: 2012.2~f3-0ubuntu1
[ Adam Gandleman ]
* debian/patches/sql_conn.patch: Also set default sqlite path for
  in glance-api.conf. (LP: #1028711)
* debian/patches/fix-docs-build.patch: Fix docs build

[ Chuck Short ]
* New upstream version.
* debian/control: python-xattr is no longer a required depends.
  (LP: #1031396)
* debian/control: Move python-jsonschema to glance.
  (LP: #1030152)
* debian/control: Start the slow transition to python-glanceclient.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
Prefetches images into the Image Cache
20
20
"""
21
21
 
22
 
import logging
23
 
 
24
22
import eventlet
25
23
 
26
 
from glance.common import context
27
24
from glance.common import exception
 
25
from glance import context
28
26
from glance.image_cache import base
 
27
import glance.openstack.common.log as logging
29
28
from glance import registry
30
29
import glance.store
31
30
import glance.store.filesystem
61
60
            LOG.warn(_("No metadata found for image '%s'"), image_id)
62
61
            return False
63
62
 
64
 
        image_data, image_size = get_from_backend(image_meta['location'])
 
63
        image_data, image_size = get_from_backend(ctx, image_meta['location'])
65
64
        LOG.debug(_("Caching image '%s'"), image_id)
66
65
        self.cache.cache_image_iter(image_id, image_data)
67
66
        return True