]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commitdiff
Stringify $evaluation_interval for validate_re call
authorMike Dorman <mdorman@godaddy.com>
Thu, 18 Sep 2014 18:18:30 +0000 (12:18 -0600)
committerMike Dorman <mdorman@godaddy.com>
Tue, 23 Sep 2014 18:33:53 +0000 (11:33 -0700)
Under Puppet 3.7.x, calls to validate_re fail if the parameter is not
strictly a string.  This change creates a string from
$evaluation_interval when passing to validate_re, so the call will
pass regardless of if the parameter to the class is specified as
string or an integer.

Change-Id: I17b82977f21483acf134837a66c5ecebe346cfdf
Closes-Bug: 1371235

Rakefile
manifests/alarm/evaluator.pp

index 4c2b2ed07ea36b9e1dd56d0db96bd3a4d9bb9011..2e74217e1989cbbcd36c99076280269d66d2a0b3 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -4,3 +4,4 @@ require 'puppet-lint/tasks/puppet-lint'
 PuppetLint.configuration.fail_on_warnings = true
 PuppetLint.configuration.send('disable_80chars')
 PuppetLint.configuration.send('disable_class_parameter_defaults')
+PuppetLint.configuration.send('disable_only_variable_string')
index 2621534910e28c6e6b09c48d55662d262bc49fd6..c842feb1494ae424f4dd4e80db8be11ef0ced43c 100644 (file)
@@ -22,7 +22,7 @@ class ceilometer::alarm::evaluator (
 
   include ceilometer::params
 
-  validate_re($evaluation_interval,'^(\d+)$')
+  validate_re("${evaluation_interval}",'^(\d+)$')
 
   Ceilometer_config<||> ~> Service['ceilometer-alarm-evaluator']