diff options
| author | William Wolf <throughnothing@gmail.com> | 2011-06-30 10:06:06 -0400 |
|---|---|---|
| committer | William Wolf <throughnothing@gmail.com> | 2011-06-30 10:06:06 -0400 |
| commit | 639717b1eadb769f1d77a4ddcdb6618da4defbea (patch) | |
| tree | fafe3e69bb42780c889ca1422cd6203ba6ca8916 | |
| parent | 17d08b9644080265f6feb4d55825de8e4049c991 (diff) | |
| download | nova-639717b1eadb769f1d77a4ddcdb6618da4defbea.tar.gz nova-639717b1eadb769f1d77a4ddcdb6618da4defbea.tar.xz nova-639717b1eadb769f1d77a4ddcdb6618da4defbea.zip | |
added FlavorRef exception handling on create instance
| -rw-r--r-- | nova/api/openstack/create_instance_helper.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/api/openstack/create_instance_helper.py b/nova/api/openstack/create_instance_helper.py index 436e524c1..94ae3bb85 100644 --- a/nova/api/openstack/create_instance_helper.py +++ b/nova/api/openstack/create_instance_helper.py @@ -143,6 +143,10 @@ class CreateInstanceHelper(object): except exception.ImageNotFound as error: msg = _("Can not find requested image") raise faults.Fault(exc.HTTPBadRequest(explanation=msg)) + except exception.FlavorNotFound as error: + msg = _("Invalid flavorRef provided.") + raise faults.Fault(exc.HTTPBadRequest(explanation=msg)) + # Let the caller deal with unhandled exceptions. |
