From: John Davidge Date: Mon, 23 Mar 2015 19:00:14 +0000 (+0000) Subject: Add the default_ipv6_subnet_pool config option X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=5410117b5db684baf74747a7996c0485679bb410;p=openstack-build%2Fneutron-build.git Add the default_ipv6_subnet_pool config option This config option will allow an admin to set the default subnet-pool to be used for automatic subnet CIDR allocation in the case of subnet-create being called without a CIDR or subnet-pool ID. This also paves the way for enabling IPv6 Prefix Delegation in PD-capable environments. DocImpact Change-Id: Ifdd6e5267e4e5d32e72478ca4ac7e255eb3346ff Partially-Implements: blueprint subnet-allocation --- diff --git a/etc/neutron.conf b/etc/neutron.conf index 95d2e5561..5772e3f27 100644 --- a/etc/neutron.conf +++ b/etc/neutron.conf @@ -146,6 +146,12 @@ lock_path = $state_path/lock # Maximum number of routes per router # max_routes = 30 +# Default Subnet Pool to be used for IPv6 subnet-allocation. +# Specifies by UUID the pool to be used in case of subnet-create being +# called without CIDR or subnet-pool ID. Set to "prefix_delegation" +# to enable IPv6 Prefix Delegation in a PD-capable environment. +# default_ipv6_subnet_pool = + # =========== items for MTU selection and advertisement ============= # Advertise MTU. If True, effort is made to advertise MTU # settings to VMs via network methods (ie. DHCP and RA MTU options) diff --git a/neutron/common/config.py b/neutron/common/config.py index 96c304e89..3a17e042d 100644 --- a/neutron/common/config.py +++ b/neutron/common/config.py @@ -71,6 +71,9 @@ core_opts = [ help=_("Maximum number of host routes per subnet")), cfg.IntOpt('max_fixed_ips_per_port', default=5, help=_("Maximum number of fixed ips per port")), + cfg.IntOpt('default_ipv6_subnet_pool', default=None, + help=_("Default subnet-pool to be used for automatic subnet " + "CIDR allocation")), cfg.IntOpt('dhcp_lease_duration', default=86400, deprecated_name='dhcp_lease_time', help=_("DHCP lease duration (in seconds). Use -1 to tell " diff --git a/neutron/common/constants.py b/neutron/common/constants.py index f9f5a9a37..185c6d0d6 100644 --- a/neutron/common/constants.py +++ b/neutron/common/constants.py @@ -141,6 +141,10 @@ IPV6_MODES = [DHCPV6_STATEFUL, DHCPV6_STATELESS, IPV6_SLAAC] IPV6_LLA_PREFIX = 'fe80::/64' +# Human-readable ID to which default_ipv6_subnet_pool should be set to +# indicate that IPv6 Prefix Delegation should be used to allocate subnet CIDRs +IPV6_PD_POOL_ID = 'prefix_delegation' + # Linux interface max length DEVICE_NAME_MAX_LEN = 15