From 98f9f735d7e6ac32a8736971f4aab0d81c56131e Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 19 Mar 2013 14:27:48 -0400 Subject: [PATCH] Fix multiple fixed-ips with quantum. This patch fixes a bug in the quantum suppot where multiple requested fixed-ips did not work. Every network interface would be given the last fixed IP that was specified. The problem was just the lack of putting the right fixed ip in a local variable. Fix bug 1154093. Change-Id: Ie7e034e19a38c8431540c81b023ff4800aa6ec50 --- nova/network/quantumv2/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/network/quantumv2/api.py b/nova/network/quantumv2/api.py index 53e22c077ea8..48fac7c82ff7 100644 --- a/nova/network/quantumv2/api.py +++ b/nova/network/quantumv2/api.py @@ -239,7 +239,8 @@ class API(base.Base): quantum.update_port(port['id'], port_req_body) touched_port_ids.append(port['id']) else: - if fixed_ips.get(network_id): + fixed_ip = fixed_ips.get(network_id) + if fixed_ip: port_req_body['port']['fixed_ips'] = [{'ip_address': fixed_ip}] port_req_body['port']['network_id'] = network_id