diff options
| author | JordanP <jordan.pittier-ext@cloudwatt.com> | 2013-06-12 16:57:38 +0200 |
|---|---|---|
| committer | JordanP <jordan.pittier-ext@cloudwatt.com> | 2013-06-12 17:12:27 +0200 |
| commit | 40126fdb920710e2ffbc481bbe9ddf6d0e047af3 (patch) | |
| tree | 1ebc22dee36f2d77210b1ec80c1fd3bbffc7a85d | |
| parent | 4461f20bd6187ec02e00cd862d754df38523f9ef (diff) | |
| download | nova-40126fdb920710e2ffbc481bbe9ddf6d0e047af3.tar.gz nova-40126fdb920710e2ffbc481bbe9ddf6d0e047af3.tar.xz nova-40126fdb920710e2ffbc481bbe9ddf6d0e047af3.zip | |
Quantum API _get_floating_ip_by_address mismatch with Nova-Net
_get_floating_ip_by_address() has a unspecified behavior when
IP address is empty and only one floating IP is allocated in
the pool. It should return a 404 Not found like Nova-Net does
but instead returns the only IP in the pool.
Fix bug #1190242
Change-Id: Id4843edda8e66ccabab5e9d053c595a1cd247770
| -rw-r--r-- | nova/network/quantumv2/api.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/network/quantumv2/api.py b/nova/network/quantumv2/api.py index 3721d53b1..054611cd3 100644 --- a/nova/network/quantumv2/api.py +++ b/nova/network/quantumv2/api.py @@ -706,6 +706,8 @@ class API(base.Base): def _get_floating_ip_by_address(self, client, address): """Get floatingip from floating ip address.""" + if not address: + raise exception.FloatingIpNotFoundForAddress(address=address) data = client.list_floatingips(floating_ip_address=address) fips = data['floatingips'] if len(fips) == 0: |
