Add support for external ids

This commit is contained in:
Endre Karlson 2012-10-06 19:58:10 +02:00
parent eb07d77499
commit 59d11d4207
3 changed files with 8 additions and 4 deletions

View File

@ -19,6 +19,7 @@ Puppet::Type.type(:vs_bridge).provide(:ovs) do
def _split(string, splitter="\n") def _split(string, splitter="\n")
return Hash[string.split(splitter).map{|i| i.split("=")}] return Hash[string.split(splitter).map{|i| i.split("=")}]
end
def external_ids def external_ids
result = vsctl("br-get-external-id", @resource[:bridge]) result = vsctl("br-get-external-id", @resource[:bridge])

View File

@ -11,7 +11,7 @@ module Puppet
desc "The bridge to configure" desc "The bridge to configure"
end end
newparam(:external_ids) do newproperty(:external_ids) do
desc "External IDs for the bridge" desc "External IDs for the bridge"
end end
end end

View File

@ -1,7 +1,10 @@
class vswitch::bridge ( class vswitch::bridge (
$ensure $name,
$external_ids = "",
$ensure = "present"
) { ) {
vs_bridge { $br_name: vs_bridge { $name:
ensure => $ensure external_ids => $external_ids,
ensure => $ensure
} }
} }