]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Returns more appropriate error when address pool is exhausted
authorGary Kotton <gkotton@redhat.com>
Tue, 4 Dec 2012 14:41:41 +0000 (14:41 +0000)
committerGary Kotton <gkotton@redhat.com>
Wed, 5 Dec 2012 16:22:03 +0000 (16:22 +0000)
Fixes bug 1086226

Change-Id: I97a73151a1ed42877116238a6a741c68c75e199a

quantum/api/v2/base.py

index 02b2e935b1201271fd62911de901e145f5417dad..37fedf475b3966022a08bad436789de1fad33c02 100644 (file)
@@ -47,6 +47,7 @@ FAULT_MAP = {exceptions.NotFound: webob.exc.HTTPNotFound,
              netaddr.AddrFormatError: webob.exc.HTTPBadRequest,
              AttributeError: webob.exc.HTTPBadRequest,
              ValueError: webob.exc.HTTPBadRequest,
+             exceptions.IpAddressGenerationFailure: webob.exc.HTTPConflict,
              }
 
 QUOTAS = quota.QUOTAS