memcached (openstack) is no longer in use
[mirror/dsa-puppet.git] / 3rdparty / modules / glance / manifests / config.pp
1 # == Class: glance::config
2 #
3 # This class is used to manage arbitrary glance configurations.
4 #
5 # === Parameters
6 #
7 # [*xxx_config*]
8 #   (optional) Allow configuration of arbitrary glance configurations.
9 #   The value is an hash of glance_config resources. Example:
10 #   { 'DEFAULT/foo' => { value => 'fooValue'},
11 #     'DEFAULT/bar' => { value => 'barValue'}
12 #   }
13 #   In yaml format, Example:
14 #   glance_config:
15 #     DEFAULT/foo:
16 #       value: fooValue
17 #     DEFAULT/bar:
18 #       value: barValue
19 #
20 # [**api_config**]
21 #   (optional) Allow configuration of glance-api.conf configurations.
22 #
23 # [**api_paste_ini_config**]
24 #   (optional) Allow configuration of glance-api-paste.ini configurations.
25 #
26 # [**registry_config**]
27 #   (optional) Allow configuration of glance-registry.conf configurations.
28 #
29 # [**registry_paste_ini_config**]
30 #   (optional) Allow configuration of glance-registry-paste.ini configurations.
31 #
32 # [**cache_config**]
33 #   (optional) Allow configuration of glance-cache.conf configurations.
34 #
35 #   NOTE: The configuration MUST NOT be already handled by this module
36 #   or Puppet catalog compilation will fail with duplicate resources.
37 #
38 class glance::config (
39   $api_config                 = {},
40   $api_paste_ini_config       = {},
41   $registry_config            = {},
42   $registry_paste_ini_config  = {},
43   $cache_config               = {},
44 ) {
45   validate_hash($api_config)
46   validate_hash($api_paste_ini_config)
47   validate_hash($registry_config)
48   validate_hash($registry_paste_ini_config)
49   validate_hash($cache_config)
50
51   create_resources('glance_api_config', $api_config)
52   create_resources('glance_api_paste_ini', $api_paste_ini_config)
53   create_resources('glance_registry_config', $registry_config)
54   create_resources('glance_registry_paste_ini', $registry_paste_ini_config)
55   create_resources('glance_cache_config', $cache_config)
56 }