]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commitdiff
Remove blank values in namespaces array.
authorMatthew J. Black <mjblack@gmail.com>
Fri, 23 Sep 2016 23:27:04 +0000 (19:27 -0400)
committerMatthew J. Black <mjblack@gmail.com>
Thu, 13 Oct 2016 13:23:00 +0000 (09:23 -0400)
The inline template is using compact which is not removing
the blank values. A call to delete function from stdlib is
needed to remove the blank values.

Change-Id: I7cf3ca383572d569a7e89431dcc39385605cf820
(cherry picked from commit 4e576d3f5393cb58b2d19b940d9a3c3d81144417)

manifests/agent/polling.pp
releasenotes/notes/fix_polling_agent_namespaces-6a79b7e42601f950.yaml [new file with mode: 0644]

index 63317fd32ee5414a06c0a382e4a2a923287764eb..d58675fa33e4261875dd8c3d0a986db176ea9f3e 100644 (file)
@@ -76,8 +76,8 @@ class ceilometer::agent::polling (
     }
   }
 
-  $namespaces = [$central_namespace_name, $compute_namespace_name, $ipmi_namespace_name]
-  $namespaces_real = inline_template('<%= @namespaces.find_all {|x| x !~ /^undef/ }.join "," %>')
+  $namespaces = delete([$central_namespace_name, $compute_namespace_name, $ipmi_namespace_name], '')
+  $namespaces_real = inline_template('<%= @namespaces.select { |x| x and x !~ /^undef/ }.compact.join "," %>')
 
   package { 'ceilometer-polling':
     ensure => $package_ensure,
diff --git a/releasenotes/notes/fix_polling_agent_namespaces-6a79b7e42601f950.yaml b/releasenotes/notes/fix_polling_agent_namespaces-6a79b7e42601f950.yaml
new file mode 100644 (file)
index 0000000..c14a0f0
--- /dev/null
@@ -0,0 +1,3 @@
+---
+issues:
+  - Delete blank values from ceilometer::agent::polling namespaces array.