Files
puppet-cinder/manifests/type.pp
Tobias Urdin 3f28feae08 Remove deprecated params and drivers
This patch does a lot of cleanup in the cinder module.
It does the following:

* Removes all deprecated parameters that can be removed
  in this release.

* Removes the bdd (block device driver) that is removed
  from cinder [1].

* Adds deprecation notices for cinder::type and
  cinder::type_set classes that had a comment about it.

[1] 711e88a8f9

Change-Id: Ic75547396ddf3e553023583d987500f77909d277
2019-08-28 09:41:01 +02:00

45 lines
955 B
Puppet

# == Define: cinder::type
#
# Creates cinder type and assigns backends.
# Deprecated class.
#
# === Parameters
#
# [*set_key*]
# (Optional) Must be used with set_value. Accepts a single string be used
# as the key in type_set
# Defaults to 'undef'.
#
# [*set_value*]
# (optional) Accepts list of strings or singular string. A list of values
# passed to type_set
# Defaults to 'undef'.
#
# Author: Andrew Woodward <awoodward@mirantis.com>
#
define cinder::type (
$set_key = undef,
$set_value = undef,
) {
include ::cinder::deps
warning('The cinder::type is deprecated, please use the cinder_type resource.')
if ($set_value and $set_key) {
if is_array($set_value) {
$value = join($set_value, ',')
} else {
$value = $set_value
}
cinder_type { $name:
ensure => present,
properties => ["${set_key}=${value}"],
}
} else {
cinder_type { $name:
ensure => present,
}
}
}