~openstack-gd/nova/lp783478

« back to all changes in this revision

Viewing changes to nova/tests/network/base.py

  • Committer: Eldar Nugaev
  • Date: 2011-05-20 09:29:54 UTC
  • mfrom: (1072.2.20 nova)
  • Revision ID: enugaev@griddynamics.com-20110520092954-1pp1aly9c2rtv5br
Merge and conflict resolving

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
from nova import db
26
26
from nova import exception
27
27
from nova import flags
 
28
from nova import ipv6
28
29
from nova import log as logging
29
30
from nova import test
30
31
from nova import utils
117
118
                                                 context.get_admin_context(),
118
119
                                                 instance_ref['id'])
119
120
            self.assertEqual(instance_ref['mac_address'],
120
 
                             utils.to_mac(address_v6))
 
121
                             ipv6.to_mac(address_v6))
121
122
            instance_ref2 = db.fixed_ip_get_instance_v6(
122
123
                                                 context.get_admin_context(),
123
124
                                                 address_v6)
124
125
            self.assertEqual(instance_ref['id'], instance_ref2['id'])
125
126
            self.assertEqual(address_v6,
126
 
                             utils.to_global_ipv6(
127
 
                                                 network_ref['cidr_v6'],
128
 
                                                 instance_ref['mac_address']))
 
127
                             ipv6.to_global(network_ref['cidr_v6'],
 
128
                                            instance_ref['mac_address'],
 
129
                                            'test'))
129
130
            self._deallocate_address(0, address)
130
131
            db.instance_destroy(context.get_admin_context(),
131
132
                                instance_ref['id'])