From 78c42fe678bdd6f99bdc3b9e440b75dd101ff25c Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 17 Jul 2023 13:07:22 +0900 Subject: [PATCH] default_availability_zone: Deprecate usage of false values ... so that we can use Optinal[String] to validate this parameter in the future. Change-Id: If700b059e58f7493851cab330ac0c7165a1db907 --- manifests/init.pp | 8 ++++++-- ...ailability_zone-undef-by-default-fac8174e8e54db38.yaml | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/default_availability_zone-undef-by-default-fac8174e8e54db38.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 94f86ea6..68c1adda 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -190,7 +190,7 @@ # (optional) Default availability zone for new volumes. # If not set, the storage_availability_zone option value is used as # the default for new volumes. -# Defaults to false +# Defaults to undef # # [*allow_availability_zone_fallback*] # (optional) Allow availability zone fallback if preferred availability zone cannot be deployed to. @@ -299,7 +299,7 @@ class cinder ( $package_ensure = 'present', $api_paste_config = '/etc/cinder/api-paste.ini', $storage_availability_zone = 'nova', - $default_availability_zone = false, + $default_availability_zone = undef, $allow_availability_zone_fallback = $facts['os_service_default'], $lock_path = $::cinder::params::lock_path, $image_conversion_dir = $facts['os_service_default'], @@ -376,6 +376,10 @@ class cinder ( } if ! $default_availability_zone { + if $default_availability_zone != undef { + warning("Usage of a false value for the default_availability_zone parameter \ +is deprecated. Use undef instead.") + } $default_availability_zone_real = $storage_availability_zone } else { $default_availability_zone_real = $default_availability_zone diff --git a/releasenotes/notes/default_availability_zone-undef-by-default-fac8174e8e54db38.yaml b/releasenotes/notes/default_availability_zone-undef-by-default-fac8174e8e54db38.yaml new file mode 100644 index 00000000..3396ccfd --- /dev/null +++ b/releasenotes/notes/default_availability_zone-undef-by-default-fac8174e8e54db38.yaml @@ -0,0 +1,6 @@ +--- +deprecations: + - | + Usage of `false` for the ``cinder::default_availability_zone`` parameter + has been deprecated and will be removed in a future release. Use ``undef`` + (which is the new default value) instead.