diff --git a/glance/api/cached_images.py b/glance/api/cached_images.py index 17867e84e9..5ec642d458 100644 --- a/glance/api/cached_images.py +++ b/glance/api/cached_images.py @@ -54,8 +54,8 @@ def index(self, req): return dict(cached_images=entries) - def delete(self, req, image_id): - self.cache.purge(image_id) + def delete(self, req, id): + self.cache.purge(id) def delete_collection(self, req): """ @@ -74,9 +74,9 @@ def delete_collection(self, req): num_purged = self.cache.clear() return dict(num_purged=num_purged) - def update(self, req, image_id): + def update(self, req, id): """PUT /cached_images/1 is used to prefetch an image into the cache""" - image_meta = self.get_active_image_meta_or_404(req, image_id) + image_meta = self.get_active_image_meta_or_404(req, id) try: self.cache.queue_prefetch(image_meta) except exception.Invalid, e: