Remove deprecated default_*_subnet_pool options

These options were deprecated in Mitaka and this commit removes
them from Newton.

Revert relaxation of _check_subnet_data function. It is no longer
allowed to pass empty 'subnetpool_id'.

Change-Id: I86df242a7dda84ef197216aa5c593417038fae3f
Closes-Bug: #1579035
Related-Bug: #1551333
This commit is contained in:
Frode Nordahl 2016-05-06 14:36:00 +02:00
parent b2d641e81f
commit 2e355837fa
4 changed files with 14 additions and 69 deletions

View File

@ -1298,41 +1298,6 @@ subnet with no router if your Neutron backend allows it.
.. versionadded:: 8.0.0(Liberty)
``default_ipv4_subnet_pool_label``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 8.0.0(Liberty)
Default: ``None`` (Disabled)
Neutron can be configured with a default Subnet Pool to be used for IPv4
subnet-allocation. Specify the label you wish to display in the Address pool
selector on the create subnet step if you want to use this feature.
This option is now marked as "deprecated" and will be removed in Newton or
a later release. If there exists a default Subnet Pool it will be automatically
detected through the Neutron API and the label will be set to the name of the
default Subnet Pool.
``default_ipv6_subnet_pool_label``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 8.0.0(Liberty)
Default: ``None`` (Disabled)
Neutron can be configured with a default Subnet Pool to be used for IPv6
subnet-allocation. Specify the label you wish to display in the Address pool
selector on the create subnet step if you want to use this feature.
When using Liberty Neutron you must set this to enable IPv6 Prefix Delegation
in a PD-capable environment.
This option is now marked as "deprecated" and will be removed in Newton or
a later release. If there exists a default Subnet Pool it will be automatically
detected through the Neutron API and the label will be set to the name of the
default Subnet Pool.
``default_dns_nameservers``:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -256,24 +256,6 @@ class CreateSubnetInfoAction(workflows.Action):
def get_subnetpool_choices(self, request):
subnetpool_choices = [('', _('Select a pool'))]
default_ipv6_subnet_pool_label = \
getattr(settings, 'OPENSTACK_NEUTRON_NETWORK', {}).get(
'default_ipv6_subnet_pool_label', None)
default_ipv4_subnet_pool_label = \
getattr(settings, 'OPENSTACK_NEUTRON_NETWORK', {}).get(
'default_ipv4_subnet_pool_label', None)
if default_ipv6_subnet_pool_label:
subnetpool_dict = {'ip_version': 6,
'name': default_ipv6_subnet_pool_label}
subnetpool = api.neutron.SubnetPool(subnetpool_dict)
subnetpool_choices.append(('', subnetpool))
if default_ipv4_subnet_pool_label:
subnetpool_dict = {'ip_version': 4,
'name': default_ipv4_subnet_pool_label}
subnetpool = api.neutron.SubnetPool(subnetpool_dict)
subnetpool_choices.append(('', subnetpool))
for subnetpool in api.neutron.subnetpool_list(request):
subnetpool_choices.append((subnetpool.id, subnetpool))
@ -291,11 +273,13 @@ class CreateSubnetInfoAction(workflows.Action):
gateway_ip = cleaned_data.get('gateway_ip')
no_gateway = cleaned_data.get('no_gateway')
address_source = cleaned_data.get('address_source')
subnetpool = cleaned_data.get('subnetpool')
# When creating network from a pool it is allowed to supply empty
# subnetpool_id signaling that Neutron should choose the default
# pool configured by the operator. This is also part of the IPv6
# Prefix Delegation Workflow.
if not subnetpool and address_source == 'subnetpool':
msg = _('Specify "Address pool" or select '
'"Enter Network Address manually" and specify '
'"Network Address".')
raise forms.ValidationError(msg)
if not cidr and address_source != 'subnetpool':
msg = _('Specify "Network Address" or '
'clear "Create Subnet" checkbox in previous step.')

View File

@ -278,18 +278,6 @@ OPENSTACK_NEUTRON_NETWORK = {
# real deployments
# 'default_dns_nameservers': ["8.8.8.8", "8.8.4.4", "208.67.222.222"],
# Neutron can be configured with a default Subnet Pool to be used for IPv4
# subnet-allocation. Specify the label you wish to display in the Address
# pool selector on the create subnet step if you want to use this feature.
'default_ipv4_subnet_pool_label': None,
# Neutron can be configured with a default Subnet Pool to be used for IPv6
# subnet-allocation. Specify the label you wish to display in the Address
# pool selector on the create subnet step if you want to use this feature.
# You must set this to enable IPv6 Prefix Delegation in a PD-capable
# environment.
'default_ipv6_subnet_pool_label': None,
# The profile_support option is used to detect if an external router can be
# configured via the dashboard. When using specific plugins the
# profile_support can be turned on if needed.

View File

@ -0,0 +1,8 @@
---
deprecations:
- The 'default_ipv4_subnet_pool_label' and 'default_ipv6_subnet_pool_label'
options were deprecated in the Mitaka release and are no longer valid in
the Newton release. Starting with Mitaka you can create one default
subnet pool per address family through the Neutron API. These subnet
pools will automatically show up in the subnet pool list using the name
of the pool as label.