]> review.fuel-infra Code Review - openstack-build/heat-build.git/commit
Fix instance creation when a network with no subnet is used
authorSimon Pasquier <pasquier.simon@gmail.com>
Tue, 4 Jun 2013 14:42:50 +0000 (16:42 +0200)
committerSimon Pasquier <pasquier.simon@gmail.com>
Tue, 4 Jun 2013 14:59:37 +0000 (16:59 +0200)
commit6ba1916e31e24d5b28503f527e0a2789c0d617ad
tree79ef2615f56d5b6aa2a8dca4ffad731064c3c2ab
parentc981c55d3216e85c40d2b85518d9158d45825bcb
Fix instance creation when a network with no subnet is used

It is possible with OpenStack Networking to create a network with no
subnet attached to it.
When creating an instance associated to such a network, the engine would
raise a 'list index out of range' exception because the instance has no
IP address on the network.
The issue would also happen with a loadbalancer referencing the same
type of instance.

Change-Id: I6122efb90877d8020added44aee8802eb8a80297
Fixes: bug #1187023
heat/engine/resources/instance.py
heat/engine/resources/loadbalancer.py
heat/tests/test_instance.py
heat/tests/v1_1/fakes.py