Rename parameter 'tag' to 'vlan_tag' in l23network module

In puppet >3.0 word 'tag' is reserved, so it have to be
renamed.

Change-Id: Ie2b62d2b96ee9ca9d4ced15d038979561899e910
Closes-Bug: 1305600
This commit is contained in:
Stanislaw Bogatkin 2014-07-21 13:32:34 +04:00
parent 1ec799bc6c
commit 54a43a3ab3
11 changed files with 23 additions and 23 deletions

View File

@ -256,14 +256,14 @@ In example above we create two ports with tags 10 and 20, and assign IP address
bridge => 'bridge0',
type => 'internal',
port_properties => [
'tag=10'
'vlan_id=10'
],
} ->
l23network::l2::port{'vl20':
bridge => 'bridge0',
type => 'internal',
port_properties => [
'tag=20'
'vlan_id=20'
],
} ->
l23network::l3::ifconfig {'vl10':

View File

@ -34,7 +34,7 @@ module L23network
:name => nil,
:bridge => nil,
#:type => "internal",
:tag => 0,
:vlan_id => 0,
:trunks => [],
:port_properties => [],
:interface_properties => [],
@ -45,7 +45,7 @@ module L23network
:provider => 'ovs',
:bridge => nil,
:interfaces => [],
:tag => 0,
:vlan_id => 0,
:trunks => [],
:properties => [],
#:port_properties => [],
@ -56,7 +56,7 @@ module L23network
:name => "unnamed", # calculated later
:peers => [nil, nil],
:bridges => [],
:tags => [0, 0],
:vlan_ids => [0, 0],
:trunks => [],
}
else

View File

@ -28,8 +28,8 @@ Puppet::Type.type(:l2_ovs_bond).provide(:ovs) do
end
bond_properties = Array(@resource[:properties])
if @resource[:tag] > 0
bond_properties.insert(-1, "tag=#{@resource[:tag]}")
if @resource[:vlan_id] > 0
bond_properties.insert(-1, "tag=#{@resource[:vlan_id]}")
end
if not @resource[:trunks].empty?
bond_properties.insert(-1, "trunks=[#{@resource[:trunks].join(',')}]")

View File

@ -46,7 +46,7 @@ Puppet::Type.type(:l2_ovs_patch).provide(:ovs) do
for name in names
# tag and trunks for port
port_properties = [] #@resource[:port_properties]
tag = @resource[:tags][i]
tag = @resource[:vlan_ids][i]
if tag > 0
port_properties.insert(-1, "tag=#{tag}")
end

View File

@ -18,8 +18,8 @@ Puppet::Type.type(:l2_ovs_port).provide(:ovs) do
end
# tag and trunks for port
port_properties = @resource[:port_properties]
if @resource[:tag] > 0
port_properties.insert(-1, "tag=#{@resource[:tag]}")
if @resource[:vlan_id] > 0
port_properties.insert(-1, "tag=#{@resource[:vlan_id]}")
end
if not @resource[:trunks].empty?
port_properties.insert(-1, "trunks=[#{@resource[:trunks].join(',')}]")

View File

@ -53,7 +53,7 @@ Puppet::Type.newtype(:l2_ovs_bond) do
end
end
newparam(:tag) do
newparam(:vlan_id) do
defaultto(0)
desc "802.1q tag"
validate do |val|

View File

@ -42,7 +42,7 @@ Puppet::Type.newtype(:l2_ovs_patch) do
# desc "Allow to skip existing bond"
# end
newparam(:tags, :array_matching => :all) do
newparam(:vlan_ids, :array_matching => :all) do
defaultto([0,0])
desc "Array of 802.1q tag for ends."
#

View File

@ -52,7 +52,7 @@ Puppet::Type.newtype(:l2_ovs_port) do
end
end
newparam(:tag) do
newparam(:vlan_id) do
defaultto(0)
desc "802.1q tag"
validate do |val|

View File

@ -13,7 +13,7 @@
# [*interfaces*]
# List of interfaces in this bond.
#
# [*tag*]
# [*vlan_id*]
# Specify 802.1q tag for result bond. If need.
#
# [*trunks*]
@ -30,7 +30,7 @@ define l23network::l2::bond (
$ports = undef, # deprecated, must be used interfaces
$bond = $name,
$properties = [],
$tag = 0,
$vlan_id = 0,
$trunks = [],
$provider = 'ovs',
$ensure = present,
@ -53,7 +53,7 @@ define l23network::l2::bond (
ensure => $ensure,
interfaces => $r_interfaces,
bridge => $bridge,
tag => $tag,
vlan_id => $vlan_id,
trunks => $trunks,
properties => $properties,
skip_existing => $skip_existing,

View File

@ -9,7 +9,7 @@
# [*peers*]
# Patch port names for both bridges. must be array of two strings.
#
# [*tags*]
# [*vlan_ids*]
# Specify 802.1q tag for each end of patchcord. Must be array of 2 integers.
# Default [0,0] -- untagged
#
@ -25,7 +25,7 @@
define l23network::l2::patch (
$bridges,
$peers = [undef,undef],
$tags = [0, 0],
$vlan_ids = [0, 0],
$trunks = [],
$provider = 'ovs',
$ensure = present,
@ -37,14 +37,14 @@ define l23network::l2::patch (
# Architecture limitation.
# We can't create more one patch between same bridges.
#$patch = "${bridges[0]}_${tags[0]}--${bridges[1]}_${tags[1]}"
#$patch = "${bridges[0]}_${vlan_ids[0]}--${bridges[1]}_${vlan_ids[1]}"
$patch = "${bridges[0]}--${bridges[1]}"
if ! defined (L2_ovs_patch["$patch"]) {
l2_ovs_patch { "$patch" :
bridges => $bridges,
peers => $peers,
tags => $tags,
vlan_ids => $vlan_ids,
trunks => $trunks,
ensure => $ensure
}

View File

@ -17,7 +17,7 @@
# the port with default behavior.
# (see http://openvswitch.org/cgi-bin/ovsman.cgi?page=utilities%2Fovs-vsctl.8)
#
# [*tag*]
# [*vlan_id*]
# Specify 802.1q tag for result bond. If need.
#
# [*trunks*]
@ -34,7 +34,7 @@ define l23network::l2::port (
$type = '',
$port_properties = [],
$interface_properties = [],
$tag = 0,
$vlan_id = 0,
$trunks = [],
$vlan_splinters = false,
$provider = 'ovs',
@ -50,7 +50,7 @@ define l23network::l2::port (
ensure => $ensure,
bridge => $bridge,
type => $type,
tag => $tag,
vlan_id => $vlan_id,
trunks => $trunks,
vlan_splinters => $vlan_splinters,
port_properties => $port_properties,