cloudfoundry/bosh — pull request #396 by TieWei (2013-08-20 16:53:09+00:00)
Title: Jobs all using static ip should working correctly

For issue https://github.com/cloudfoundry/bosh/issues/373

We catch `NetworkReservationNotEnoughCapacity` exception (only manual network will raise this exception) and make it not throw out and set network reservation ip to nil when reserve ip for idle vms.

what I did -

When idle vm reserve network, no ip will be reserve if there is not enough dynamic ip.
When create vm, we should have a check whether the vm has an valid network
When refill resource pools, will not create vms if there is not enough dynamic ups

This will be worked because :

1. When first boot up vms for instance, the vm will using instance network reservation (reversed when bind instance network)

2. When bind instance network, the exception will still be thrown out (this is what we want)

3. When resource pool updater refill the pool, when there is not enough ip in dynamic ip pool, the ip will be set as nil and will not boot vms (the info will be logged).