]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Handle NotFound exception in snapshots API code
authorjohn-griffith <john.griffith@solidfire.com>
Wed, 27 Nov 2013 21:02:48 +0000 (14:02 -0700)
committerjohn-griffith <john.griffith@solidfire.com>
Wed, 27 Nov 2013 21:02:48 +0000 (14:02 -0700)
commite6a1ba529172b14eed6f611a1d6a09e673176dfd
tree509dba6394a186bf6a42baa2f7477c92db7065ca
parent79d807223674a23158c7c650b7c3717142aa04a9
Handle NotFound exception in snapshots API code

Passing tests in the gate leave unhandled trace/error messages
for a VolumeNotFound issue.

These are caused by the test_volumes_snapshots_negative test
which requests a non-existent volume and the tests pass however
the log files are a bit messed up due to the unhandled exception.

This change just adds a try/catch block around the volume get calls
in the snapshot modules and raises HTTPNotFound as appropriate.

Change-Id: I2096f2da7c68ef7924fc8e69b2d5c2afea578512
Closes-Bug: #1255214
cinder/api/v1/snapshots.py
cinder/api/v2/snapshots.py