Files
puppet-glance/manifests/config.pp
Takashi Kajinami 945280277f replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

Note that this change removes the pattern validation about [DEFAULT]
pipeline. The existing pattern check is incomplete, because of
the following two reasons.
 - the pattern does not guarantee that the requested pipeline is
   really supported or not
 - the pattern accepts a+b+c but the existing pipelines in glance
   does not have any entries with this pattern

Change-Id: I156d9a3a30ba6c523a0b16a14bf8a1839b61fb78
2023-06-19 18:33:38 +09:00

54 lines
1.6 KiB
Puppet

# == Class: glance::config
#
# This class is used to manage arbitrary glance configurations.
#
# example xxx_config
# (optional) Allow configuration of arbitrary glance configurations.
# The value is an hash of glance_config resources. Example:
# { 'DEFAULT/foo' => { value => 'fooValue'},
# 'DEFAULT/bar' => { value => 'barValue'}
# }
# In yaml format, Example:
# glance_config:
# DEFAULT/foo:
# value: fooValue
# DEFAULT/bar:
# value: barValue
#
# === Parameters
#
# [*api_config*]
# (optional) Allow configuration of glance-api.conf configurations.
#
# [*api_paste_ini_config*]
# (optional) Allow configuration of glance-api-paste.ini configurations.
#
# [*cache_config*]
# (optional) Allow configuration of glance-cache.conf configurations.
#
# [*image_import_config*]
# (optional) Allow configuration of glance-image-import.conf configurations.
#
# [*rootwrap_config*]
# (optional) Allow configuration of rootwrap.conf configurations.
#
# NOTE: The configuration MUST NOT be already handled by this module
# or Puppet catalog compilation will fail with duplicate resources.
#
class glance::config (
Hash $api_config = {},
Hash $api_paste_ini_config = {},
Hash $cache_config = {},
Hash $image_import_config = {},
Hash $rootwrap_config = {},
) {
include glance::deps
create_resources('glance_api_config', $api_config)
create_resources('glance_api_paste_ini', $api_paste_ini_config)
create_resources('glance_cache_config', $cache_config)
create_resources('glance_image_import_config', $image_import_config)
create_resources('glance_rootwrap_config', $rootwrap_config)
}