diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-03-20 02:34:22 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-03-20 02:34:22 +0000 |
commit | e843eb1a3b6b1b336e67b3ea76ea6f17f5c46942 (patch) | |
tree | f7253a62d91886d1c98ae2386d31e22d6fb30ab9 | |
parent | a70177111a73779ca3b10e94a101d121e6a8554f (diff) | |
parent | b9a3e798dcb474bd733cb7a92219ec186831ae0c (diff) | |
download | nova-e843eb1a3b6b1b336e67b3ea76ea6f17f5c46942.tar.gz nova-e843eb1a3b6b1b336e67b3ea76ea6f17f5c46942.tar.xz nova-e843eb1a3b6b1b336e67b3ea76ea6f17f5c46942.zip |
Merge "fix add-fixed-ip with quantum"
-rw-r--r-- | nova/network/quantumv2/api.py | 3 | ||||
-rw-r--r-- | nova/tests/network/test_quantumv2.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/nova/network/quantumv2/api.py b/nova/network/quantumv2/api.py index 48fac7c82..d3a94aa49 100644 --- a/nova/network/quantumv2/api.py +++ b/nova/network/quantumv2/api.py @@ -383,7 +383,8 @@ class API(base.Base): ports = data['ports'] for p in ports: for subnet in ipam_subnets: - fixed_ips = [{'subnet_id': subnet['id']}] + fixed_ips = p['fixed_ips'] + fixed_ips.append({'subnet_id': subnet['id']}) port_req_body = {'port': {'fixed_ips': fixed_ips}} try: quantumv2.get_client(context).update_port(p['id'], diff --git a/nova/tests/network/test_quantumv2.py b/nova/tests/network/test_quantumv2.py index 660123866..420de821b 100644 --- a/nova/tests/network/test_quantumv2.py +++ b/nova/tests/network/test_quantumv2.py @@ -1137,7 +1137,8 @@ class TestQuantumv2(test.TestCase): **search_opts).AndReturn({'ports': self.port_data1}) port_req_body = { 'port': { - 'fixed_ips': [{'subnet_id': 'my_subid1'}], + 'fixed_ips': [{'subnet_id': 'my_subid1'}, + {'subnet_id': 'my_subid1'}], }, } port = self.port_data1[0] |