summaryrefslogtreecommitdiff
path: root/deployment_scripts/puppet/modules/lma_collector/manifests/collectd/openstack.pp
diff options
context:
space:
mode:
Diffstat (limited to 'deployment_scripts/puppet/modules/lma_collector/manifests/collectd/openstack.pp')
-rw-r--r--deployment_scripts/puppet/modules/lma_collector/manifests/collectd/openstack.pp23
1 files changed, 21 insertions, 2 deletions
diff --git a/deployment_scripts/puppet/modules/lma_collector/manifests/collectd/openstack.pp b/deployment_scripts/puppet/modules/lma_collector/manifests/collectd/openstack.pp
index c14e1bf..3a5cf4a 100644
--- a/deployment_scripts/puppet/modules/lma_collector/manifests/collectd/openstack.pp
+++ b/deployment_scripts/puppet/modules/lma_collector/manifests/collectd/openstack.pp
@@ -21,6 +21,8 @@ define lma_collector::collectd::openstack (
21 $timeout = 20, 21 $timeout = 20,
22 $max_retries = 2, 22 $max_retries = 2,
23 $pacemaker_master_resource = undef, 23 $pacemaker_master_resource = undef,
24 $polling_interval = undef,
25 $pagination_limit = undef,
24) { 26) {
25 27
26 include lma_collector::params 28 include lma_collector::params
@@ -46,12 +48,29 @@ define lma_collector::collectd::openstack (
46 'Timeout' => "\"${timeout}\"", 48 'Timeout' => "\"${timeout}\"",
47 'MaxRetries' => "\"${max_retries}\"", 49 'MaxRetries' => "\"${max_retries}\"",
48 } 50 }
51 if $polling_interval {
52 validate_integer($polling_interval)
53 $polling_config = {
54 'PollingInterval' => "\"${polling_interval}\""
55 }
56 } else {
57 $polling_config = {}
58 }
59 if $pagination_limit {
60 validate_integer($pagination_limit)
61 $limit_config = {
62 'PaginationLimit' => "\"${pagination_limit}\""
63 }
64 } else {
65 $limit_config = {}
66 }
49 67
50 if $pacemaker_master_resource { 68 if $pacemaker_master_resource {
51 $real_config = merge($config, {'DependsOnResource' => "\"${pacemaker_master_resource}\""}) 69 $pacemaker_config = {'DependsOnResource' => "\"${pacemaker_master_resource}\""}
52 } else { 70 } else {
53 $real_config = $config 71 $pacemaker_config = {}
54 } 72 }
73 $real_config = merge($config, $pacemaker_config, $polling_config, $limit_config)
55 74
56 lma_collector::collectd::python { "openstack_${title}": 75 lma_collector::collectd::python { "openstack_${title}":
57 config => $real_config, 76 config => $real_config,