From: Jenkins Date: Fri, 14 Aug 2015 18:31:00 +0000 (+0000) Subject: Merge "l3: not use L2 plugin _get_subnet unnecessarily" X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=f16008b9882cf68eb47b4e5ec2c33214c0d3a32c;p=openstack-build%2Fneutron-build.git Merge "l3: not use L2 plugin _get_subnet unnecessarily" --- f16008b9882cf68eb47b4e5ec2c33214c0d3a32c diff --cc neutron/db/l3_db.py index 57694cc75,71b9ac1cc..7c9c7f2ed --- a/neutron/db/l3_db.py +++ b/neutron/db/l3_db.py @@@ -471,12 -470,9 +471,12 @@@ class L3_NAT_dbonly_mixin(l3.RouterPlug msg = (_("Router already has a port on subnet %s") % subnet_id) raise n_exc.BadRequest(resource='router', msg=msg) + # Ignore temporary Prefix Delegation CIDRs + if subnet_cidr == l3_constants.PROVISIONAL_IPV6_PD_PREFIX: + continue sub_id = ip['subnet_id'] - cidr = self._core_plugin._get_subnet(context.elevated(), - sub_id)['cidr'] + cidr = self._core_plugin.get_subnet(context.elevated(), + sub_id)['cidr'] ipnet = netaddr.IPNetwork(cidr) match1 = netaddr.all_matching_cidrs(new_ipnet, [cidr]) match2 = netaddr.all_matching_cidrs(ipnet, [subnet_cidr])