puppet-cinder/manifests/backends.pp
ZhongShengping ea5075e094 Use `enabled_backends` option to set up backends
1) Configurations that are setting backend config in ``[DEFAULT]``
   section are now not supported. We should use ``enabled_backends``
   option to set up backends. No volume service(s) started successfully
   otherwise.
2) Fix breaker ci

Change-Id: Id211cf6bb82b39cb71f018a2a3f33de0a288ddc7
Closes-Bug: #1650713
2016-12-19 09:26:27 +08:00

31 lines
889 B
Puppet

# == Class: cinder::backends
#
# Class to set the enabled_backends list
#
# === Parameters
#
# [*enabled_backends*]
# (Required) a list of ini sections to enable.
# This should contain names used in cinder::backend::* resources.
# Example: ['volume1', 'volume2', 'sata3']
# Defaults to undef
#
# Author: Andrew Woodward <awoodward@mirantis.com>
class cinder::backends (
$enabled_backends = undef,
) {
include ::cinder::deps
if $enabled_backends == undef {
warning("Configurations that are setting backend config in ``[DEFAULT]`` \
section are now not supported. You should use ``enabled_backends``option to \
set up backends. No volume service(s) started successfully otherwise.")
} else {
# Maybe this could be extented to dynamicly find the enabled names
cinder_config {
'DEFAULT/enabled_backends': value => join($enabled_backends, ',');
}
}
}