]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Handle NotFound exceptions in API
authorJohn Griffith <john.griffith@solidfire.com>
Wed, 23 Oct 2013 20:08:30 +0000 (20:08 +0000)
committerJohn Griffith <john.griffith@solidfire.com>
Thu, 24 Oct 2013 17:29:07 +0000 (11:29 -0600)
commit4adf35778b3aae3db99a90a1bbb94e668ec7963d
treeda214a1d09a7033f1e35301e2c8ee074ad945462
parent91d388b384bff212e850a7396e8f4f7430c0cd6d
Handle NotFound exceptions in API

There were a number of calls in the API that
weren't catching NotFound exceptions.  The result is
unhandled exception traces and errors in the logs on good
runs in tempest.

Basicly any negative test that requests a non-existent element
would result in an unhandled exception.  This patch adds try/except
around the volume_api.getxxx calls in cinder/api/... methods to
clean this up.

Closes-bug: #1243485

Change-Id: I902acc7f4fdbc20fdb1a68697679417694c5533e
cinder/api/contrib/volume_actions.py
cinder/api/v1/volumes.py
cinder/api/v2/volumes.py