try:
snapshot = self.volume_api.get_snapshot(context, id)
+ volume_utils.notify_about_snapshot_usage(context, snapshot,
+ 'update.start')
self.volume_api.update_snapshot(context, snapshot, update_dict)
- except exception.NotFound:
- msg = _("Snapshot could not be found")
- raise exc.HTTPNotFound(explanation=msg)
+ except exception.SnapshotNotFound as error:
+ raise exc.HTTPNotFound(explanation=error.msg)
snapshot.update(update_dict)
req.cache_db_snapshot(snapshot)