~anso/nova/trunk_safe

« back to all changes in this revision

Viewing changes to nova/tests/test_vlan_network.py

merged security group fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""
19
19
Unit Tests for vlan network code
20
20
"""
21
 
import IPy
 
21
import netaddr
22
22
import os
23
23
 
24
24
from nova import context
44
44
        # TODO(vish): better way of adding floating ips
45
45
        self.context._project = self.projects[0]
46
46
        self.context.project_id = self.projects[0].id
47
 
        pubnet = IPy.IP(flags.FLAGS.floating_range)
48
 
        address = str(pubnet[0])
 
47
        pubnet = netaddr.IPNetwork(flags.FLAGS.floating_range)
 
48
        address = str(list(pubnet)[0])
49
49
        try:
50
50
            db.floating_ip_get_by_address(context.get_admin_context(), address)
51
51
        except exception.NotFound: