diff --git a/releasenotes/notes/rename-SAHARA_AUTO_IP_ALLOCATION_ENABLED-config-parameter.yaml b/releasenotes/notes/rename-SAHARA_AUTO_IP_ALLOCATION_ENABLED-config-parameter.yaml new file mode 100644 index 00000000..d43acf7f --- /dev/null +++ b/releasenotes/notes/rename-SAHARA_AUTO_IP_ALLOCATION_ENABLED-config-parameter.yaml @@ -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. \ No newline at end of file diff --git a/sahara_dashboard/api/sahara.py b/sahara_dashboard/api/sahara.py index 6dd0f9dc..6908e850 100644 --- a/sahara_dashboard/api/sahara.py +++ b/sahara_dashboard/api/sahara.py @@ -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, diff --git a/sahara_dashboard/content/data_processing/clusters/nodegroup_templates/workflows/create.py b/sahara_dashboard/content/data_processing/clusters/nodegroup_templates/workflows/create.py index e4b55aa4..ecf1ec54 100644 --- a/sahara_dashboard/content/data_processing/clusters/nodegroup_templates/workflows/create.py +++ b/sahara_dashboard/content/data_processing/clusters/nodegroup_templates/workflows/create.py @@ -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"))