Raise ApiError in response to InstanceTypeNotFound
* Updates methods in nova.compute.instance_types to catch InstanceTypeNotFound exceptions and re-raise them as ApiError.
- Previously, the methods in instance_types were raising ApiError in
response to DBError, but the underlying db calls have since been
updated to detect empty results and throw more specific exceptions.
* Updates get_instance_type_by_flavor_id to not try to catch DBError,
as the underlying db call only ever raises FlavorNotFound. get_instance_type_by_flavor_id should not raise ApiError, as callers
expect the FlavorNotFound exception and know how to handle it.
* Fixes bug 872618
Reviewed: https:/ /review. openstack. org/3706 github. com/openstack/ nova/commit/ 07d74aa916ee279 8f717ae5d298f8c a51e883770
Committed: http://
Submitter: Jenkins
Branch: master
commit 07d74aa916ee279 8f717ae5d298f8c a51e883770
Author: Maru Newby <email address hidden>
Date: Thu Feb 2 12:52:10 2012 -0800
Raise ApiError in response to InstanceTypeNot Found
* Updates methods in nova.compute. instance_ types to catch
InstanceTypeNot Found exceptions and re-raise them as ApiError. type_by_ flavor_ id to not try to catch DBError,
get_instance_ type_by_ flavor_ id should not raise ApiError, as callers
- Previously, the methods in instance_types were raising ApiError in
response to DBError, but the underlying db calls have since been
updated to detect empty results and throw more specific exceptions.
* Updates get_instance_
as the underlying db call only ever raises FlavorNotFound.
expect the FlavorNotFound exception and know how to handle it.
* Fixes bug 872618
Change-Id: I8652f04889adb4 48017afd253ecdc c840fbb660f