Merge pull request #909 from xenolog/bug/1257904

FIX: bug/1257904
This commit is contained in:
Vladimir Kuklin 2013-12-05 00:15:33 -08:00
commit f916de800c
2 changed files with 4 additions and 1 deletions

View File

@ -241,6 +241,8 @@ Puppet::Parser::Functions::newfunction(:generate_network_config, :type => :rvalu
else
trans[:vlan_splinters] = false
end
else
trans[:vlan_splinters] = false
end
# add trunks list to the interface if it given
if _do_trunks

View File

@ -55,7 +55,8 @@ Puppet::Type.type(:l2_ovs_port).provide(:ovs) do
end
end
# enable vlan_splinters if need
if @resource[:vlan_splinters]
if @resource[:vlan_splinters].to_s() == 'true' # puppet send non-boolean value instead true/false
Puppet.debug("Interface '#{@resource[:interface]}' vlan_splinters is '#{@resource[:vlan_splinters]}' [#{@resource[:vlan_splinters].class}]")
begin
vsctl('--', "set", "Port", @resource[:interface], "vlan_mode=trunk")
vsctl('--', "set", "Interface", @resource[:interface], "other-config:enable-vlan-splinters=true")