Fix variable name in api/v<n>/snapshot.py
Noticed in a recent bug fix that the when the show method was copy/pasted at some point the variable name vol was not updated. Silly annoyance, but thought I'd go ahead and replace vol with snapshot to make the variable name reflect what's actually in use here. Change-Id: I137ecc4987258450e93195cfed5e128063b92914
This commit is contained in:
parent
058fcf6da8
commit
d68efcc0e0
|
@ -106,12 +106,12 @@ class SnapshotsController(wsgi.Controller):
|
|||
context = req.environ['cinder.context']
|
||||
|
||||
try:
|
||||
vol = self.volume_api.get_snapshot(context, id)
|
||||
req.cache_resource(vol)
|
||||
snapshot = self.volume_api.get_snapshot(context, id)
|
||||
req.cache_resource(snapshot)
|
||||
except exception.NotFound:
|
||||
raise exc.HTTPNotFound()
|
||||
|
||||
return {'snapshot': _translate_snapshot_detail_view(context, vol)}
|
||||
return {'snapshot': _translate_snapshot_detail_view(context, snapshot)}
|
||||
|
||||
def delete(self, req, id):
|
||||
"""Delete a snapshot."""
|
||||
|
|
|
@ -106,13 +106,13 @@ class SnapshotsController(wsgi.Controller):
|
|||
context = req.environ['cinder.context']
|
||||
|
||||
try:
|
||||
vol = self.volume_api.get_snapshot(context, id)
|
||||
req.cache_resource(vol)
|
||||
snapshot = self.volume_api.get_snapshot(context, id)
|
||||
req.cache_resource(snapshot)
|
||||
except exception.NotFound:
|
||||
msg = _("Snapshot could not be found")
|
||||
raise exc.HTTPNotFound(explanation=msg)
|
||||
|
||||
return {'snapshot': _translate_snapshot_detail_view(context, vol)}
|
||||
return {'snapshot': _translate_snapshot_detail_view(context, snapshot)}
|
||||
|
||||
def delete(self, req, id):
|
||||
"""Delete a snapshot."""
|
||||
|
|
Loading…
Reference in New Issue