diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-07-20 19:36:42 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-07-20 19:36:42 +0000 |
| commit | 09d98f413c5a1a997088879227c24010bd67e253 (patch) | |
| tree | 88280d087b2d26739f0064a1f278fd2bb10ac5cb /nova/api | |
| parent | fca17aabc3864a564bf0f895a8717bec526d57c3 (diff) | |
| parent | ebc05b803615b78a14008136bb549a41013e6cd1 (diff) | |
Merge "Allow NoMoreFloatingIps to bubble up to FaultWrapper"
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/floating_ips.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nova/api/openstack/compute/contrib/floating_ips.py b/nova/api/openstack/compute/contrib/floating_ips.py index df25e4fd2..b6a6adc9e 100644 --- a/nova/api/openstack/compute/contrib/floating_ips.py +++ b/nova/api/openstack/compute/contrib/floating_ips.py @@ -169,12 +169,12 @@ class FloatingIPController(object): try: address = self.network_api.allocate_floating_ip(context, pool) ip = self.network_api.get_floating_ip_by_address(context, address) - except exception.NoMoreFloatingIps: + except exception.NoMoreFloatingIps, nmfi: if pool: - msg = _("No more floating ips in pool %s.") % pool + nmfi.message = _("No more floating ips in pool %s.") % pool else: - msg = _("No more floating ips available.") - raise webob.exc.HTTPRequestEntityTooLarge(explanation=msg) + nmfi.message = _("No more floating ips available.") + raise nmfi return _translate_floating_ip_view(ip) |
