puppet-glance/manifests/backend/file.pp
Emilien Macchi 57009efc4a file backend: do not inherit from glance::api
Do not make ::glance::backend::file inherits from ::glance::api because
::glance::api has parameters.
The class was broken until now.

Also, we need to include glance::backend::file to have
'filesystem_store_datadir' parameter in Glance config, since we're using
file backend.

If you don't provide this parameter, Glance fails to start:
glance_store._drivers.filesystem [-] Specify at least
'filesystem_store_datadir' or 'filesystem_store_datadirs' option

Change-Id: Iba6791199f7a2c7fef24b1e8752ed0b564b8512f
2015-10-02 17:15:18 -04:00

25 lines
633 B
Puppet

# === class: glance::backend::file
#
# used to configure file backends for glance
#
# === parameters:
#
# [*filesystem_store_datadir*]
# Location where dist images are stored when
# default_store == file.
# Optional. Default: /var/lib/glance/images/
#
class glance::backend::file(
$filesystem_store_datadir = '/var/lib/glance/images/'
) {
glance_api_config {
'glance_store/default_store': value => 'file';
'glance_store/filesystem_store_datadir': value => $filesystem_store_datadir;
}
glance_cache_config {
'glance_store/filesystem_store_datadir': value => $filesystem_store_datadir;
}
}