]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Merge "l3: not use L2 plugin _get_subnet unnecessarily"
authorJenkins <jenkins@review.openstack.org>
Fri, 14 Aug 2015 18:31:00 +0000 (18:31 +0000)
committerGerrit Code Review <review@openstack.org>
Fri, 14 Aug 2015 18:31:00 +0000 (18:31 +0000)
1  2 
neutron/db/db_base_plugin_v2.py
neutron/db/l3_db.py

Simple merge
index 57694cc75c17087ac7154e267d1bd3786442369d,71b9ac1cc8c94d48e5749f7a1094380bec7bcf43..7c9c7f2edabbc6cabbb27764b1c6f4976cf71c82
@@@ -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])