Skip to content

Commit

Permalink
Make image.upload notification send up2date metadata
Browse files Browse the repository at this point in the history
The dictionary passed is not updated with image size, etc.

Fixes bug 1018246

Change-Id: I735d355891fcbd6b1db088b218b8fd808b8908e1
  • Loading branch information
comstud committed Jun 27, 2012
1 parent c45fe20 commit 9f7b374
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions glance/api/v1/images.py
Expand Up @@ -416,9 +416,11 @@ def _upload(self, req, image_meta):
LOG.debug(_("Updating image %(image_id)s data. "
"Checksum set to %(checksum)s, size set "
"to %(size)d"), locals())
registry.update_image_metadata(req.context, image_id,
{'checksum': checksum,
'size': size})
update_data = {'checksum': checksum,
'size': size}
image_meta = registry.update_image_metadata(req.context,
image_id,
update_data)
self.notifier.info('image.upload', image_meta)

return location
Expand Down

0 comments on commit 9f7b374

Please sign in to comment.