Skip to content

Commit a3202b0

Browse files
committed
Merge pull request redhat-openstack#222 from 3dna/snmp-template-array
arrayify the values and collects
2 parents f270d16 + e900a09 commit a3202b0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

templates/plugin/snmp.conf.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
Type "<%= val['Type'] %>"
66
Table <%= val['Table'] %>
77
Instance "<%= val['Instance'] %>"
8-
Values <% val['Values'].sort.each do |x| -%>"<%= x %>" <% end %>
8+
Values <% Array(val['Values']).sort.each do |x| -%>"<%= x %>" <% end %>
99
</Data>
1010
<% end -%>
1111
<% @hosts.sort_by {|k,v| k}.each do |key,val| -%>
1212
<Host "<%=key %>">
1313
Address "<%= val['Address'] %>"
1414
Version <%= val['Version'] %>
1515
Community "<%= val['Community'] %>"
16-
Collect <% val['Collect'].sort.each do |x| -%>"<%= x -%>" <% end %>
16+
Collect <% Array(val['Collect']).sort.each do |x| -%>"<%= x -%>" <% end %>
1717
Interval <%= val['Interval'] %>
1818
</Host>
1919
<% end -%>

0 commit comments

Comments
 (0)