Allow v6 subnets on routers

The current ML2plus driver throws an IPv6RoutingNotSupported
exception if a v6 subnet is attached to a neutron router. This
patch relaxes that constraint.

Change-Id: Iaebcba643eb9ad394a665521afaf4c4d7c0b1c72
partially-implements: blueprint address-scope-mapping
(cherry picked from commit 53c215d760)
(cherry picked from commit 73180e1189)
This commit is contained in:
Thomas Bachman 2017-04-03 13:04:03 +00:00
parent 855d36985e
commit 3cab695e0c
2 changed files with 0 additions and 29 deletions

View File

@ -797,14 +797,6 @@ class ApicMechanismDriver(api_plus.MechanismDriver):
# Find the address_scope(s) for the new interface.
#
# TODO(rkukura): To support IPv6 and dual-stack routing, we
# will need both the v4 and v6 scopes. For now, we reject
# adding v6 subnets. Dual-stack topologies will use the v4
# scope, with OpFlex "identity NAT" moving v6 traffic to the
# v6 scope's VRF.
for subnet in subnets:
if subnet['ip_version'] != 4:
raise exceptions.IPv6RoutingNotSupported()
scope_id = self._get_address_scope_id_for_subnets(context, subnets)
# Find number of existing interface ports on the router,

View File

@ -2263,27 +2263,6 @@ class TestTopology(ApicAimTestCase):
self.l3_plugin.add_router_interface,
context.get_admin_context(), router2_id, {'subnet_id': subnet2_id})
def test_reject_ipv6_routing(self):
# TODO(rkukura): Remove this test when IPv6 routing is supported.
# Create network.
net_resp = self._make_network(self.fmt, 'net1', True)
# Create router.
router1_id = self._make_router(
self.fmt, 'test-tenant', 'router1')['router']['id']
# Create IPv6 subnet.
subnet1_id = self._make_subnet(
self.fmt, net_resp, 'abcd::1', 'abcd::/64',
ip_version=6)['subnet']['id']
# Verify adding IPv6 subnet to router fails.
self.assertRaises(
exceptions.IPv6RoutingNotSupported,
self.l3_plugin.add_router_interface,
context.get_admin_context(), router1_id, {'subnet_id': subnet1_id})
def test_reject_routing_multiple_address_scopes(self):
# TODO(rkukura): Remove this test when multi-scope routing is
# supported.