Adds fact for uuid of OVS

This is needed for doing host config for Neutron
and OpenDaylight.

Partial-Bug: 1704206

Change-Id: I7c10aa0351a26c10bef39b311c137209fb4ffb7e
Signed-off-by: Tim Rozet <trozet@redhat.com>
This commit is contained in:
Tim Rozet 2017-07-13 22:06:36 -04:00
parent b260bab30f
commit 00de2cb906
2 changed files with 10 additions and 1 deletions

9
lib/facter/ovs_uuid.rb Normal file
View File

@ -0,0 +1,9 @@
Facter.add("ovs_uuid") do
confine :kernel => "Linux"
setcode do
if File.exist? '/usr/bin/ovs-vsctl'
ovs_ver = Facter::Core::Execution.exec('/usr/bin/ovs-vsctl get Open_vSwitch . _uuid')
end
end
end

View File

@ -32,7 +32,7 @@ Puppet::Type.newtype(:vs_config) do
end
newproperty(:value) do
desc 'Configuration value for the paramter'
desc 'Configuration value for the parameter'
validate do |value|
if !value.is_a?(String)