Cleanup enable_*_api deprecation

With the previous depreaction, a warning was sent with the default
value. This is a poor user experience, and deprecated parameters should
not send warnings by default so we use "undef".

Also, cleaning the conditional, to be more Puppetish.

Change-Id: Ifcca166c1649b1314fa57fa51b901c2e10d53492
This commit is contained in:
Emilien Macchi 2016-05-30 11:36:32 -04:00
parent 0dd0534bc5
commit c7044572a9

View File

@ -287,11 +287,11 @@
#
# [*enable_v1_api*]
# (Optional) DEPRECATED. Whether to enable the v1 API (true/false).
# Defaults to 'true'.
# Defaults to undef.
#
# [*enable_v2_api*]
# (Optional) DEPRECATED. Whether to enable the v2 API (true/false).
# Defaults to 'true'.
# Defaults to undef.
#
class cinder (
$database_connection = undef,
@ -358,8 +358,8 @@ class cinder (
# DEPRECATED PARAMETERS
$verbose = undef,
$use_syslog = undef,
$enable_v1_api = true,
$enable_v2_api = true,
$enable_v1_api = undef,
$enable_v2_api = undef,
) inherits cinder::params {
include ::cinder::db
@ -382,11 +382,11 @@ class cinder (
warning('use_syslog is deprecated, has no effect and will be removed in a future release.')
}
if $enable_v1_api == true {
if $enable_v1_api {
warning('enable_v1_api is deprecated, has no effect and will be removed in a future release')
}
if $enable_v2_api == true {
if $enable_v2_api {
warning('enable_v2_api is deprecated, has no effect and will be removed in a future release')
}