Skip to content

Commit

Permalink
Fix cached-images API endpoint
Browse files Browse the repository at this point in the history
The recent chages that renamed 'id' to 'image_id' in the cached_images controller broke the API. This reverts a couple
of those changes.

Change-Id: I83345f87c7e5f1e35ef6646cb360819d489ec256
  • Loading branch information
Brian Waldon committed Aug 31, 2011
1 parent 3cd4613 commit 09ea271
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions glance/api/cached_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand All @@ -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:
Expand Down

0 comments on commit 09ea271

Please sign in to comment.