~ubuntu-cloud-archive/ubuntu/precise/nova/trunk

« back to all changes in this revision

Viewing changes to nova/api/ec2/cloud.py

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2011-06-30 17:02:20 UTC
  • mto: (94.1.1 raring-proposed)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: james.westby@ubuntu.com-20110630170220-d0fp6vw3fmiozxew
Tags: upstream-2011.3~d2
ImportĀ upstreamĀ versionĀ 2011.3~d2

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
"""
24
24
 
25
25
import base64
26
 
import IPy
 
26
import netaddr
27
27
import os
28
28
import urllib
29
29
import tempfile
452
452
        elif cidr_ip:
453
453
            # If this fails, it throws an exception. This is what we want.
454
454
            cidr_ip = urllib.unquote(cidr_ip).decode()
455
 
            IPy.IP(cidr_ip)
 
455
            netaddr.IPNetwork(cidr_ip)
456
456
            values['cidr'] = cidr_ip
457
457
        else:
458
458
            values['cidr'] = '0.0.0.0/0'