Merge "Rename the 'SAHARA_AUTO_IP_ALLOCATION_ENABLED' config parameter"

This commit is contained in:
Zuul 2018-01-16 17:52:04 +00:00 committed by Gerrit Code Review
commit 9697b5b93a
3 changed files with 19 additions and 5 deletions

View File

@ -0,0 +1,9 @@
---
prelude: >
The config parameter 'SAHARA_FLOATING_IP_DISABLED' replaces
'SAHARA_AUTO_IP_ALLOCATION_ENABLED'.
deprecations:
- |
The 'SAHARA_AUTO_IP_ALLOCATION_ENABLED' config parameter in Sahara
was deprecated and replaced by 'SAHARA_FLOATING_IP_DISABLED'
which has a less confusing name.

View File

@ -29,10 +29,15 @@ SAHARA_SERVICE = 'data-processing'
# Sahara service_type registered in Juno
SAHARA_SERVICE_FALLBACK = 'data_processing'
SAHARA_AUTO_IP_ALLOCATION_ENABLED = getattr(
settings,
'SAHARA_AUTO_IP_ALLOCATION_ENABLED',
False)
try:
SAHARA_FLOATING_IP_DISABLED = getattr(
settings,
'SAHARA_FLOATING_IP_DISABLED')
except AttributeError:
SAHARA_FLOATING_IP_DISABLED = getattr(
settings,
'SAHARA_AUTO_IP_ALLOCATION_ENABLED',
False)
SAHARA_VERIFICATION_DISABLED = getattr(
settings,

View File

@ -157,7 +157,7 @@ class GeneralConfigAction(workflows.Action):
plugin, hadoop_version = (
workflow_helpers.get_plugin_and_hadoop_version(request))
if not saharaclient.SAHARA_AUTO_IP_ALLOCATION_ENABLED:
if not saharaclient.SAHARA_FLOATING_IP_DISABLED:
pools = neutron.floating_ip_pools_list(request)
pool_choices = [(pool.id, pool.name) for pool in pools]
pool_choices.insert(0, (None, "Do not assign floating IPs"))