~hudson-openstack/nova/trunk

« back to all changes in this revision

Viewing changes to nova/network/quantum/melange_ipam_lib.py

  • Committer: Dan Wendlandt
  • Date: 2011-09-01 16:39:36 UTC
  • mto: This revision was merged to the branch mainline in revision 1532.
  • Revision ID: dan@nicira.com-20110901163936-t1098t3ogjg0r3fq
additional review cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
from netaddr import IPNetwork
19
19
 
 
20
from nova import exception
20
21
from nova import flags
21
22
from nova import log as logging
22
23
from nova.network.quantum import melange_connection
85
86
        for b in all_blocks['ip_blocks']:
86
87
            if b['cidr'] == cidr:
87
88
                return b['network_id']
88
 
        raise Exception(_("No network found for cidr %s" % cidr))
 
89
        raise exception.NotFound(_("No network found for cidr %s" % cidr))
89
90
 
90
91
    def delete_subnets_by_net_id(self, context, net_id, project_id):
91
92
        """ Find Melange block associated with the Quantum UUID,