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
This commit is contained in:
Russell Bryant 2013-03-19 14:27:48 -04:00
parent 07694d4ffa
commit 98f9f735d7
1 changed files with 2 additions and 1 deletions

View File

@ -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