summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJohannes Erdfelt <johannes.erdfelt@rackspace.com>2011-05-16 20:25:28 +0000
committerTarmac <>2011-05-16 20:25:28 +0000
commit87577ceb58ff7fa96b992b504559eeb2022ffa41 (patch)
treeb480c094688bd6b5a4967b8dc3c69b04d09b0e5b /nova/api
parent76b0630b77b528a37a37b44d4c456f2c9ebea160 (diff)
parent3d1cef9e56d7fac8a1b89861b7443e4ca660e4a8 (diff)
downloadnova-87577ceb58ff7fa96b992b504559eeb2022ffa41.tar.gz
nova-87577ceb58ff7fa96b992b504559eeb2022ffa41.tar.xz
nova-87577ceb58ff7fa96b992b504559eeb2022ffa41.zip
This branch splits out the IPv6 address generation into pluggable backends. A new flag named ipv6_backend specifies which backend to use.
The existing code (which is also the default) is now available as nova.ipv6.rfc2462 while a new backend available as nova.ipv6.account_identifier implements an algorithm that includes an account identifier as part of the address.
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/ec2/cloud.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index be5dd38a0..1fa07d042 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -35,6 +35,7 @@ from nova import crypto
from nova import db
from nova import exception
from nova import flags
+from nova import ipv6
from nova import log as logging
from nova import network
from nova import utils
@@ -718,9 +719,10 @@ class CloudController(object):
fixed = instance['fixed_ip']
floating_addr = fixed['floating_ips'][0]['address']
if instance['fixed_ip']['network'] and 'use_v6' in kwargs:
- i['dnsNameV6'] = utils.to_global_ipv6(
+ i['dnsNameV6'] = ipv6.to_global(
instance['fixed_ip']['network']['cidr_v6'],
- instance['mac_address'])
+ instance['mac_address'],
+ instance['project_id'])
i['privateDnsName'] = fixed_addr
i['privateIpAddress'] = fixed_addr