Skip to content

Commit

Permalink
Convert plugin_instance_format from Enum to String
Browse files Browse the repository at this point in the history
The plugin_instance_format (PluginInstanceFormat) parameter in the
collectd virt plugin is capable of taking multiple values, not a single
value from an Enum list.

Fixes voxpupuli#968
  • Loading branch information
leifmadsen committed Apr 20, 2021
1 parent 60d656a commit 36b8f74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifests/plugin/virt.pp
Expand Up @@ -8,7 +8,7 @@
Optional[String] $block_device = undef,
Optional[String] $interface_device = undef,
Optional[Boolean] $ignore_selected = undef,
Optional[Enum['none', 'name', 'uuid', 'metadata']] $plugin_instance_format = undef,
Optional[String] $plugin_instance_format = undef,
Optional[String] $hostname_format = undef,
Optional[String] $interface_format = undef,
Optional[String] $extra_stats = undef,
Expand Down
8 changes: 4 additions & 4 deletions spec/classes/collectd_plugin_virt_spec.rb
Expand Up @@ -57,7 +57,7 @@
let :params do
{
connection: 'qemu:///system',
plugin_instance_format: 'name'
plugin_instance_format: 'name metadata uuid'
}
end

Expand All @@ -68,7 +68,7 @@

it 'is ignored' do
is_expected.to contain_file('libvirt.load').
without_content(%r{.*PluginInstanceFormat name.*})
without_content(%r{.*PluginInstanceFormat name metadata uuid.*})
end
end

Expand All @@ -79,7 +79,7 @@

it 'is included' do
is_expected.to contain_file('libvirt.load').
without_content(%r{.*PluginInstanceFormat name.*})
without_content(%r{.*PluginInstanceFormat name metadata uuid.*})
end
end

Expand All @@ -90,7 +90,7 @@

it 'is included' do
is_expected.to contain_file('virt.load').
with_content(%r{.*PluginInstanceFormat name.*})
with_content(%r{.*PluginInstanceFormat name metadata uuid.*})
end
end

Expand Down

0 comments on commit 36b8f74

Please sign in to comment.