diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2010-06-24 04:11:58 +0100 |
|---|---|---|
| committer | andy <github@anarkystic.com> | 2010-06-24 04:11:58 +0100 |
| commit | 24a68b54d9956c5a8d65d8057aaa8fd58f670a52 (patch) | |
| tree | b68e947001b824431b88e875e639927454636510 /nova | |
| parent | 46337d36816634a45f2cb7611566bf551ca3bba7 (diff) | |
Give vpns the proper ip address
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/endpoint/cloud.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nova/endpoint/cloud.py b/nova/endpoint/cloud.py index c176c4ade..4a115fe35 100644 --- a/nova/endpoint/cloud.py +++ b/nova/endpoint/cloud.py @@ -500,7 +500,11 @@ class CloudController(object): inst['mac_address'] = utils.generate_mac() inst['ami_launch_index'] = num inst['bridge_name'] = bridge_name - address = network.allocate_ip( + if inst['image_id'] == FLAGS.vpn_image_id: + address = network.allocate_vpn_ip( + inst['user_id'], inst['project_id'], mac=inst['mac_address']) + else: + address = network.allocate_ip( inst['user_id'], inst['project_id'], mac=inst['mac_address']) inst['private_dns_name'] = str(address) # TODO: allocate expresses on the router node |
