~rconradharris/nova/server_progress

« back to all changes in this revision

Viewing changes to nova/tests/test_network.py

  • Committer: Tarmac
  • Author(s): Tushar Patil
  • Date: 2011-09-12 02:11:43 UTC
  • mfrom: (1523.1.2 nova)
  • Revision ID: tarmac-20110912021143-qfgvtot7itg0bebi
When vpn=true in allocate ip, it attempts to allocate the ip that is reserved in the network. Unfortunately fixed_ip_associate attempts to ignore reserved ips.
This fix allows to filter reserved ip address only when vpn=True.

Show diffs side-by-side

added added

removed removed

Lines of Context:
286
286
 
287
287
        db.fixed_ip_associate(mox.IgnoreArg(),
288
288
                              mox.IgnoreArg(),
289
 
                              mox.IgnoreArg()).AndReturn('192.168.0.1')
 
289
                              mox.IgnoreArg(),
 
290
                              reserved=True).AndReturn('192.168.0.1')
290
291
        db.fixed_ip_update(mox.IgnoreArg(),
291
292
                           mox.IgnoreArg(),
292
293
                           mox.IgnoreArg())