diff --git a/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config/lnx_ubuntu.rb b/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config/lnx_ubuntu.rb index 7bafb9976d..d9385822e1 100644 --- a/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config/lnx_ubuntu.rb +++ b/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config/lnx_ubuntu.rb @@ -26,6 +26,8 @@ Puppet::Type.type(:l23_stored_config).provide(:lnx_ubuntu, :parent => Puppet::Pr def self.iface_file_header(provider) rv = [] + rv << self.puppet_header + # Add onboot interfaces if provider.onboot rv << "auto #{provider.name}" diff --git a/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config/ovs_ubuntu.rb b/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config/ovs_ubuntu.rb index fb3f7cb55c..d461afbf7e 100644 --- a/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config/ovs_ubuntu.rb +++ b/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config/ovs_ubuntu.rb @@ -80,6 +80,7 @@ Puppet::Type.type(:l23_stored_config).provide(:ovs_ubuntu, :parent => Puppet::Pr header = [] props = {} + header << self.puppet_header bridge = provider.bridge[0] if provider.if_type.to_s == 'bridge' header << "auto #{provider.name}" if provider.onboot diff --git a/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config_base.rb b/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config_base.rb index 147df3fe57..2fb238455f 100644 --- a/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config_base.rb +++ b/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config_base.rb @@ -62,5 +62,15 @@ class Puppet::Provider::L23_stored_config_base < Puppet::Provider File.chmod(0644, filename) if File.exist? filename end + def self.puppet_header + str = "# *********************************************************************\n"\ + "# This file is being managed by Puppet. Changes to interfaces\n"\ + "# that are not being managed by Puppet will persist;\n"\ + "# however changes to interfaces that are being managed by Puppet will\n"\ + "# be overwritten.\n"\ + "# *********************************************************************" + str + end + end -# vim: set ts=2 sw=2 et : \ No newline at end of file +# vim: set ts=2 sw=2 et : diff --git a/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config_centos.rb b/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config_centos.rb index 4b1567dd39..28008a13f2 100644 --- a/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config_centos.rb +++ b/deployment/puppet/l23network/lib/puppet/provider/l23_stored_config_centos.rb @@ -292,6 +292,7 @@ class Puppet::Provider::L23_stored_config_centos < Puppet::Provider::L23_stored_ end content = [] + content << self.puppet_header provider = providers[0] # Map everything to a flat hash diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bonds/ifcfg-lnx-bond1 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bonds/ifcfg-lnx-bond1 index eea98b6bf7..dbbf3c3243 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bonds/ifcfg-lnx-bond1 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bonds/ifcfg-lnx-bond1 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=lnx_bond1 ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bonds/ifcfg-ovs-bondlacp1 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bonds/ifcfg-ovs-bondlacp1 index 088bf56053..2eb612facf 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bonds/ifcfg-ovs-bondlacp1 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bonds/ifcfg-ovs-bondlacp1 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=ovs_bond_lacp ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bridges/ifcfg-lnx-bridge b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bridges/ifcfg-lnx-bridge index affd86a3e6..5b8cdbc41a 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bridges/ifcfg-lnx-bridge +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bridges/ifcfg-lnx-bridge @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=lnx-bridge ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bridges/ifcfg-ovs-bridge b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bridges/ifcfg-ovs-bridge index 569aeb1d4a..8905aa40dd 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bridges/ifcfg-ovs-bridge +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_bridges/ifcfg-ovs-bridge @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=ovs-bridge ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2lnx-patch b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2lnx-patch index 89b988e5c7..cfa6781d91 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2lnx-patch +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2lnx-patch @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=ovs2lnx-patch ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2ovs-patch1 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2ovs-patch1 index 4b8c532feb..69ff0441b0 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2ovs-patch1 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2ovs-patch1 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=ovs2ovs-patch1 ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2ovs-patch2 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2ovs-patch2 index b44b2ca671..8fbe642a8a 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2ovs-patch2 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2ovs-patch2 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=ovs2ovs-patch2 ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2ovs-tag b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2ovs-tag index ea048fdb74..47f6c6d80d 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2ovs-tag +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_patches/ifcfg-ovs2ovs-tag @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=ovs2ovs-tag ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-lnx-port b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-lnx-port index dfe7c734d6..cd021179c0 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-lnx-port +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-lnx-port @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=lnx-port ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-lnx-port2 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-lnx-port2 index 2561262fa1..74a8dfc452 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-lnx-port2 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-lnx-port2 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=lnx-port2 ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-lnx-port3 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-lnx-port3 index 9a7a85303f..89036357c6 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-lnx-port3 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-lnx-port3 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=lnx-port3 ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-ovs-port b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-ovs-port index e23caa8f06..91ccd2d5d1 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-ovs-port +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/centos7_ports/ifcfg-ovs-port @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=ovs-port ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos6_spec/ifcfg-eth0 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos6_spec/ifcfg-eth0 index 6d4f047d5b..beba3661bb 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos6_spec/ifcfg-eth0 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos6_spec/ifcfg-eth0 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth0 BOOTPROTO=dhcp diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-br1 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-br1 index fdaed7cce1..fa13555fc8 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-br1 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-br1 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none IPADDR=192.168.88.2 DEVICE=br1 diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-br2 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-br2 index 1f831c68b4..cc66fcb001 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-br2 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-br2 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none IPADDR=192.168.99.2 DEVICE=br2 diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-p_33470efd-0 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-p_33470efd-0 index 3c7413aa0e..dc3d1357d8 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-p_33470efd-0 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-p_33470efd-0 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=p_33470efd-0 ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-p_33470efd-1 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-p_33470efd-1 index cd4dfd463b..5209b8a423 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-p_33470efd-1 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/ifcfg-p_33470efd-1 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=p_33470efd-1 ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/pre-up-ifcfg-p_33470efd-0 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/pre-up-ifcfg-p_33470efd-0 index af0052b825..6b130abb68 100755 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/pre-up-ifcfg-p_33470efd-0 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/pre-up-ifcfg-p_33470efd-0 @@ -1,2 +1,8 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* ip link add p_33470efd-0 mtu 1500 type veth peer name p_33470efd-1 mtu 1500 ip link set up dev p_33470efd-1 diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/pre-up-ifcfg-p_33470efd-1 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/pre-up-ifcfg-p_33470efd-1 index eb22d892b1..9cc7955c1a 100755 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/pre-up-ifcfg-p_33470efd-1 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec/pre-up-ifcfg-p_33470efd-1 @@ -1,2 +1,8 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* ip link add p_33470efd-0 mtu 1500 type veth peer name p_33470efd-1 mtu 1500 ip link set up dev p_33470efd-1 \ No newline at end of file diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7_spec/ifcfg-eth0 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7_spec/ifcfg-eth0 index 6d4f047d5b..beba3661bb 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7_spec/ifcfg-eth0 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7_spec/ifcfg-eth0 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth0 BOOTPROTO=dhcp diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7_spec/ifcfg-eth31 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7_spec/ifcfg-eth31 index bfbcc5c698..aabf19fcd4 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7_spec/ifcfg-eth31 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7_spec/ifcfg-eth31 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] NAME=eth31 BOOTPROTO=dhcp diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7_spec/ifcfg-eth32 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7_spec/ifcfg-eth32 index fe8b249be4..93e58c8e91 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7_spec/ifcfg-eth32 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_centos7_spec/ifcfg-eth32 @@ -1,2 +1,8 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=dhcp ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-br1 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-br1 index c205992292..f24f3d38ea 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-br1 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-br1 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto br1 iface br1 inet static bridge_ports p_33470efd-0 diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-br2 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-br2 index 4aa3b94786..0777f82c26 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-br2 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-br2 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto br2 iface br2 inet static bridge_ports p_33470efd-1 diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-p_33470efd-0 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-p_33470efd-0 index b52da93cd1..5daba4bdfb 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-p_33470efd-0 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-p_33470efd-0 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto p_33470efd-0 iface p_33470efd-0 inet manual pre-up ip link add p_33470efd-0 mtu 1500 type veth peer name p_33470efd-1 mtu 1500 diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-p_33470efd-1 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-p_33470efd-1 index 45f6ec554b..f3005345f5 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-p_33470efd-1 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec/ifcfg-p_33470efd-1 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto p_33470efd-1 iface p_33470efd-1 inet manual pre-up ip link add p_33470efd-0 mtu 1500 type veth peer name p_33470efd-1 mtu 1500 diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__spec/ifcfg-bond0 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__spec/ifcfg-bond0 index 98d3ec6700..3cbfd128ec 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__spec/ifcfg-bond0 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__spec/ifcfg-bond0 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto bond0 iface bond0 inet manual mtu 9000 diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__spec/ifcfg-eth1 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__spec/ifcfg-eth1 index 28f53e5d41..9e60117e2b 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__spec/ifcfg-eth1 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__spec/ifcfg-eth1 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto eth1 iface eth1 inet static address 169.254.0.1/24 diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__spec/ifcfg-eth11 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__spec/ifcfg-eth11 index 2e664d2073..6796480cfe 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__spec/ifcfg-eth11 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/lnx_ubuntu__spec/ifcfg-eth11 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto eth11 iface eth11 inet static address 169.254.0.1/24 diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec/ifcfg-br-ovs b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec/ifcfg-br-ovs index a641e3a83c..ac73d47450 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec/ifcfg-br-ovs +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec/ifcfg-br-ovs @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto br-ovs allow-ovs br-ovs iface br-ovs inet manual diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec/ifcfg-br1 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec/ifcfg-br1 index c205992292..f24f3d38ea 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec/ifcfg-br1 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec/ifcfg-br1 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto br1 iface br1 inet static bridge_ports p_33470efd-0 diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec/ifcfg-p_33470efd-0 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec/ifcfg-p_33470efd-0 index fd4aef3d46..dc22cd15ff 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec/ifcfg-p_33470efd-0 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec/ifcfg-p_33470efd-0 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto p_33470efd-0 allow-br-ovs p_33470efd-0 iface p_33470efd-0 inet manual diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-br-ovs1 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-br-ovs1 index 69cc931e25..4925e466f1 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-br-ovs1 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-br-ovs1 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto br-ovs1 allow-ovs br-ovs1 iface br-ovs1 inet manual diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-br-ovs2 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-br-ovs2 index b08c4d8ddb..2835e2b85b 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-br-ovs2 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-br-ovs2 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto br-ovs2 allow-ovs br-ovs2 iface br-ovs2 inet manual diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-p_33470efd-0 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-p_33470efd-0 index 0a7d5348c6..167fc4f8f6 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-p_33470efd-0 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-p_33470efd-0 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto p_33470efd-0 allow-br-ovs1 p_33470efd-0 iface p_33470efd-0 inet manual diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-p_33470efd-1 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-p_33470efd-1 index 259494469d..edf926662f 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-p_33470efd-1 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec/ifcfg-p_33470efd-1 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto p_33470efd-1 allow-br-ovs2 p_33470efd-1 iface p_33470efd-1 inet manual diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-bond_lacp b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-bond_lacp index 1f8bf5d30f..248b231cf3 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-bond_lacp +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-bond_lacp @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* allow-br0 bond_lacp iface bond_lacp inet manual mtu 9000 diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-bridge b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-bridge index 4b6cbb9432..2746895f06 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-bridge +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-bridge @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* allow-ovs br9 iface br9 inet manual ovs_type OVSBridge diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-bridge-with-ports b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-bridge-with-ports index b1a201ad8f..4f4c6a5de8 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-bridge-with-ports +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-bridge-with-ports @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto br8 allow-ovs br8 iface br8 inet manual diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-port b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-port index 81921cdedb..fb7369a74c 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-port +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ovs_ubuntu__spec/ifcfg-port @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto ttt0 allow-br9 ttt0 iface ttt0 inet manual diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/centos/ifcfg-br-testovs b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/centos/ifcfg-br-testovs index 10aa7585fa..1af998c70a 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/centos/ifcfg-br-testovs +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/centos/ifcfg-br-testovs @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none DEVICE=br-testovs ONBOOT=yes diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/centos/ifcfg-eth0 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/centos/ifcfg-eth0 index 6d4f047d5b..beba3661bb 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/centos/ifcfg-eth0 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/centos/ifcfg-eth0 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth0 BOOTPROTO=dhcp diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/centos/ifcfg-eth1.105 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/centos/ifcfg-eth1.105 index f285828d66..5b26a2e435 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/centos/ifcfg-eth1.105 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/centos/ifcfg-eth1.105 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* BOOTPROTO=none IPADDR=10.109.2.3 DEVICE=eth1.105 diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/ubuntu/ifcfg-br-floating b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/ubuntu/ifcfg-br-floating index 65f19e992b..c998c09152 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/ubuntu/ifcfg-br-floating +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/ubuntu/ifcfg-br-floating @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto br-floating allow-ovs br-floating iface br-floating inet manual diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/ubuntu/ifcfg-br-fw-admin b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/ubuntu/ifcfg-br-fw-admin index 101ac1c6b9..21a1a88107 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/ubuntu/ifcfg-br-fw-admin +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/ubuntu/ifcfg-br-fw-admin @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto br-fw-admin iface br-fw-admin inet static bridge_ports eth0 p_eeee51a2-0 diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/ubuntu/ifcfg-eth1 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/ubuntu/ifcfg-eth1 index ab409e268f..1b308994df 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/ubuntu/ifcfg-eth1 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/prefetching/ubuntu/ifcfg-eth1 @@ -1,2 +1,8 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto eth1 iface eth1 inet manual diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ubuntu_ports/ifcfg-p2p1 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ubuntu_ports/ifcfg-p2p1 index 8446343a52..5af61ceda1 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ubuntu_ports/ifcfg-p2p1 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ubuntu_ports/ifcfg-p2p1 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* allow-br-ovs1 p2p1 iface p2p1 inet manual ovs_type OVSPort diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ubuntu_ports/ifcfg-p2p2 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ubuntu_ports/ifcfg-p2p2 index 162dce5fd9..dcfdf31f1b 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ubuntu_ports/ifcfg-p2p2 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ubuntu_ports/ifcfg-p2p2 @@ -1,2 +1,8 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto p2p2 iface p2p2 inet manual diff --git a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ubuntu_ports/ifcfg-p2p3 b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ubuntu_ports/ifcfg-p2p3 index d7a5fafa04..d217904475 100644 --- a/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ubuntu_ports/ifcfg-p2p3 +++ b/deployment/puppet/l23network/spec/fixtures/provider/l23_stored_config/ubuntu_ports/ifcfg-p2p3 @@ -1,3 +1,9 @@ +# ********************************************************************* +# This file is being managed by Puppet. Changes to interfaces +# that are not being managed by Puppet will persist; +# however changes to interfaces that are being managed by Puppet will +# be overwritten. +# ********************************************************************* auto p2p3 iface p2p3 inet manual post-up ethtool -K p2p3 gro off | true # generic-receive-offload diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__bond__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__bond__spec.rb index b87e3bc82e..e90a8fa16a 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__bond__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__bond__spec.rb @@ -87,7 +87,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_centos7) do it { expect(cfg_file).to match(%r{BRIDGE=lnx-br0}) } it { expect(cfg_file).to match(%r{MTU=9000}) } it { expect(cfg_file).to match(%r{BONDING_OPTS="mode=balance-tcp miimon=60 lacp_rate=fast ad_select=2 updelay=123 downdelay=155"}) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(7) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(7) } # no more lines in the interface file end diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__bridge__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__bridge__spec.rb index 141b7bfff0..d8020b2a32 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__bridge__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__bridge__spec.rb @@ -74,7 +74,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_centos7) do it { expect(cfg_file).to match(%r{BOOTPROTO=none}) } it { expect(cfg_file).to match(%r{ONBOOT=yes}) } it { expect(cfg_file).to match(%r{TYPE=Bridge}) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(4) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(4) } # no more lines in the interface file end diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec.rb index cc433aabbc..a40ed9b1eb 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__lnx2lnx_patch__spec.rb @@ -98,7 +98,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_centos7) do it { expect(cfg_file).to match(/ONBOOT=yes/) } it { expect(cfg_file).to match(/TYPE=Bridge/) } it { expect(cfg_file).to match(/PREFIX=24/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(6) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(6) } end context 'for LNX bridge br2' do @@ -110,7 +110,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_centos7) do it { expect(cfg_file).to match(/ONBOOT=yes/) } it { expect(cfg_file).to match(/TYPE=Bridge/) } it { expect(cfg_file).to match(/PREFIX=24/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(6) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(6) } end context 'for lnx2lnx patchcord p_33470efd-0' do @@ -125,7 +125,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_centos7) do expect(cfg_file).to match(/DEVICE=p_33470efd-0/) expect(cfg_file).to match(/BRIDGE=br1/) expect(cfg_file).to match(/ONBOOT=yes/) - expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(4) + expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(4) end end @@ -141,7 +141,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_centos7) do expect(cfg_file).to match(/DEVICE=p_33470efd-1/) expect(cfg_file).to match(/BRIDGE=br2/) expect(cfg_file).to match(/ONBOOT=yes/) - expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(4) + expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(4) end end @@ -158,7 +158,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_centos7) do expect(cfg_file).to match(/BRIDGE=br2/) expect(cfg_file).to match(/MTU=1800/) expect(cfg_file).to match(/ONBOOT=yes/) - expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(5) + expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(5) end end diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__port__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__port__spec.rb index 48fc43b10e..0ac30be383 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__port__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_centos7__port__spec.rb @@ -96,7 +96,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_centos7) do it { expect(cfg_file).to match(%r{ONBOOT=yes}) } it { expect(cfg_file).to match(%r{TYPE=Ethernet}) } it { expect(cfg_file).to match(%r{MTU=9000}) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(5) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(5) } # no more lines in the interface file end context 'format file for lnx-port2 without type' do @@ -106,7 +106,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_centos7) do it { expect(cfg_file).to match(%r{BOOTPROTO=none}) } it { expect(cfg_file).to match(%r{ONBOOT=yes}) } it { expect(cfg_file).to match(%r{MTU=9000}) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(4) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(4) } # no more lines in the interface file end context 'format file for lnx-port3 ethtool' do @@ -116,7 +116,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_centos7) do it { expect(cfg_file).to match(%r{BOOTPROTO=none}) } it { expect(cfg_file).to match(%r{ONBOOT=yes}) } it { expect(cfg_file).to match(%r{ETHTOOL_OPTS="-K\s+lnx-port3\s+gro\s+off\s+gso\s+off\s+;"}) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(4) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(4) } # no more lines in the interface file end context "parse port lnx-port data from fixture" do diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__bond__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__bond__spec.rb index 001bae8a0f..2d11c03938 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__bond__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__bond__spec.rb @@ -90,7 +90,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_ubuntu) do it { expect(cfg_file).to match(/bond-downdelay\s+222/) } it { expect(cfg_file).to match(/bond-ad-select\s+2/) } it { expect(cfg_file).to match(/bond-xmit-hash-policy\s+encap3\+4/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(11) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(11) } # no more lines in the interface file end context "parse data from fixture" do diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__ifconfig__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__ifconfig__spec.rb index 21e522d8cc..1cefbbe0df 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__ifconfig__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__ifconfig__spec.rb @@ -65,7 +65,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_ubuntu) do it { expect(data).to match(/iface\s+eth1\s+inet\s+static/) } it { expect(data).to match(/address\s+169\.254\.0\.1\/24/) } it { expect(data).to match(/post-up\s+sleep\s+25/) } - it { expect(data.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(4) } # no more lines in the interface file + it { expect(data.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(4) } # no more lines in the interface file end context "parse data from fixture" do @@ -128,7 +128,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_ubuntu) do it { p data ; expect(data).to match(/auto\s+eth1/) } it { expect(data).to match(/iface\s+eth1\s+inet\s+static/) } it { expect(data).to match(/address\s+169\.254\.0\.1\/24/) } - it { expect(data.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(3) } # no more lines in the interface file + it { expect(data.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(3) } # no more lines in the interface file end end end @@ -200,7 +200,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_ubuntu) do it { expect(data).to match(/post-up\s+ip\s+addr\s+add\s+192.168.1.1\/24\s+dev\s+eth11/) } it { expect(data).to match(/post-up\s+ip\s+addr\s+add\s+192.168.2.2\/25\s+dev\s+eth11/) } it { expect(data).to match(/post-up\s+ip\s+addr\s+add\s+192.168.3.3\/26\s+dev\s+eth11/) } - it { expect(data.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(6) } # no more lines in the interface file + it { expect(data.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(6) } # no more lines in the interface file end context "parse data from fixture" do diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec.rb index 81900849f8..2a8e06f71b 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__lnx2lnx_patch__spec.rb @@ -99,7 +99,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_ubuntu) do it { expect(cfg_file).to match(/iface\s+br1\s+inet\s+static/) } it { expect(cfg_file).to match(/bridge_ports\s+p_33470efd-0/) } it { expect(cfg_file).to match(/address\s+192.168.88.2\/24/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(4) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(4) } end context 'for LNX bridge br2' do @@ -109,7 +109,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_ubuntu) do it { expect(cfg_file).to match(/iface\s+br2\s+inet\s+static/) } it { expect(cfg_file).to match(/bridge_ports\s+p_33470efd-1/) } it { expect(cfg_file).to match(/address\s+192.168.99.2\/24/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(4) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(4) } end context 'for lnx2lnx patchcord p_33470efd-0' do @@ -120,7 +120,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_ubuntu) do it { expect(cfg_file).to match(/pre-up\s+ip\s+link\s+add\s+p_33470efd-0\s+mtu\s+1500\s+type\s+veth\s+peer\s+name\s+p_33470efd-1\s+mtu\s+1500/) } it { expect(cfg_file).to match(/post-up\s+ip\s+link\s+set\s+up\s+dev\s+p_33470efd-1/) } it { expect(cfg_file).to match(/post-down\s+ip\s+link\s+del\s+p_33470efd-0/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(5) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(5) } end context 'for lnx2lnx patchcord p_33470efd-1' do @@ -131,7 +131,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_ubuntu) do it { expect(cfg_file).to match(/pre-up\s+ip\s+link\s+add\s+p_33470efd-0\s+mtu\s+1500\s+type\s+veth\s+peer\s+name\s+p_33470efd-1\s+mtu\s+1500/) } it { expect(cfg_file).to match(/post-up\s+ip\s+link\s+set\s+up\s+dev\s+p_33470efd-1/) } it { expect(cfg_file).to match(/post-down\s+ip\s+link\s+del\s+p_33470efd-0/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(5) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(5) } end context 'for lnx2lnx patchcord p_33470efd-1 mtu 1700' do @@ -143,7 +143,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_ubuntu) do it { expect(cfg_file).to match(/pre-up\s+ip\s+link\s+add\s+p_33470efd-0\s+mtu\s+1700\s+type\s+veth\s+peer\s+name\s+p_33470efd-1\s+mtu\s+1700/) } it { expect(cfg_file).to match(/post-up\s+ip\s+link\s+set\s+up\s+dev\s+p_33470efd-1/) } it { expect(cfg_file).to match(/post-down\s+ip\s+link\s+del\s+p_33470efd-0/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(6) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(6) } end diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__port__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__port__spec.rb index edbc1e0ef7..d5c6315d6a 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__port__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/lnx_ubuntu__port__spec.rb @@ -69,7 +69,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_ubuntu) do let(:cfg_file) { subject.class.format_file('filepath', [subject]) } it { expect(cfg_file).to match(/auto\s+p2p2/) } it { expect(cfg_file).to match(/iface\s+p2p2\s+inet\s+manual/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(2) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(2) } end context 'Phys port p2p3 with ethtool' do @@ -79,7 +79,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:lnx_ubuntu) do it { expect(cfg_file).to match(/iface\s+p2p3\s+inet\s+manual/) } it { expect(cfg_file).to match(%r{post-up\s+ethtool\s+-K\s+p2p3\s+gro\s+off\s+|\s+true\s+#\s+generic-receive-offload}) } it { expect(cfg_file).to match(%r{post-up\s+ethtool\s+-K\s+p2p3\s+gso\s+off\s+|\s+true\s+#\s+generic-segmentation-offload}) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(4) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(4) } end end diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__bond__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__bond__spec.rb index c7d37b1e2e..d743d2af37 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__bond__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__bond__spec.rb @@ -90,7 +90,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_centos7) do other_config:lacp-time=fast bond_updelay=111 bond_downdelay=222 lacp=active"}) } it { expect(cfg_file).to match(%r{BOND_IFACES="eth2 eth3"}) } it { expect(cfg_file).to match(%r{DEVICETYPE=ovs}) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(9) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(9) } # no more lines in the interface file end diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__bridge__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__bridge__spec.rb index 757cd5333a..6e318eb217 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__bridge__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__bridge__spec.rb @@ -77,7 +77,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_centos7) do it { expect(cfg_file).to match(%r{TYPE=OVSBridge}) } it { expect(cfg_file).to match(%r{MTU=9000}) } it { expect(cfg_file).to match(%r{DEVICETYPE=ovs}) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(6) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(6) } # no more lines in the interface file end diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__ovs2lnx_patch__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__ovs2lnx_patch__spec.rb index 52ef04f048..b9780ee4a6 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__ovs2lnx_patch__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__ovs2lnx_patch__spec.rb @@ -102,7 +102,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_centos7) do it { expect(cfg_file).to match(%r{BRIDGE=lnx-br}) } it { expect(cfg_file).to match(%r{OVS_BRIDGE=ovs-br}) } it { expect(cfg_file).to match(%r{DEVICETYPE=ovs}) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(7) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(7) } # no more lines in the interface file end diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__ovs2ovs_patch__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__ovs2ovs_patch__spec.rb index a211f15f4a..ee51c7bfec 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__ovs2ovs_patch__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__ovs2ovs_patch__spec.rb @@ -100,7 +100,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_centos7) do it { expect(cfg_file).to match(%r{OVS_BRIDGE=ovs-br1}) } it { expect(cfg_file).to match(%r{OVS_PATCH_PEER=ovs2ovs-patch2}) } it { expect(cfg_file).to match(%r{DEVICETYPE=ovs}) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(7) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(7) } # no more lines in the interface file end context 'format ovs2ovs-patch2 file' do @@ -113,7 +113,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_centos7) do it { expect(cfg_file).to match(%r{OVS_BRIDGE=ovs-br2}) } it { expect(cfg_file).to match(%r{OVS_PATCH_PEER=ovs2ovs-patch1}) } it { expect(cfg_file).to match(%r{DEVICETYPE=ovs}) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(7) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(7) } # no more lines in the interface file end context 'format ovs2ovs-patch with tag file' do @@ -127,7 +127,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_centos7) do it { expect(cfg_file).to match(%r{OVS_PATCH_PEER=ovs2ovs-patcht1}) } it { expect(cfg_file).to match(%r{OVS_OPTIONS="tag=3"}) } it { expect(cfg_file).to match(%r{DEVICETYPE=ovs}) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(8) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(8) } # no more lines in the interface file end context "parse ovs2ovs-patch1 data from fixture" do diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__port__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__port__spec.rb index 09371a2941..c1cb13fdaa 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__port__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_centos7__port__spec.rb @@ -77,7 +77,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_centos7) do it { expect(cfg_file).to match(%r{TYPE=OVSPort}) } it { expect(cfg_file).to match(%r{MTU=9000}) } it { expect(cfg_file).to match(%r{DEVICETYPE=ovs}) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(6) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(6) } # no more lines in the interface file end diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_redhat7__ovs2lnx_patch__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_redhat7__ovs2lnx_patch__spec.rb index 1d0fd68c73..0c6b53591c 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_redhat7__ovs2lnx_patch__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_redhat7__ovs2lnx_patch__spec.rb @@ -102,7 +102,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_redhat7) do it { expect(cfg_file).to match(%r{BRIDGE=lnx-br}) } it { expect(cfg_file).to match(%r{OVS_BRIDGE=ovs-br}) } it { expect(cfg_file).to match(%r{DEVICETYPE=ovs}) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(7) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(7) } # no more lines in the interface file end diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__bond__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__bond__spec.rb index e8e88b863a..82a5db2cf9 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__bond__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__bond__spec.rb @@ -92,7 +92,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_ubuntu) do it { expect(cfg_file).to match(/ovs_options.+bond_updelay=111/) } it { expect(cfg_file).to match(/ovs_options.+bond_downdelay=222/) } it { expect(cfg_file).to match(/ovs_options.+lacp=active/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(7) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(7) } # no more lines in the interface file end diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__bridge__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__bridge__spec.rb index 24cfc6426b..bd839727fa 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__bridge__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__bridge__spec.rb @@ -75,7 +75,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_ubuntu) do it { expect(cfg_file).to match(/iface\s+br9\s+inet\s+manual/) } it { expect(cfg_file).to match(/ovs_type\s+OVSBridge/) } it { expect(cfg_file).to match(/mtu\s+9000/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(5) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(5) } # no more lines in the interface file end context "parse data from fixture" do diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__bridge_with_ports__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__bridge_with_ports__spec.rb index 4799792d44..86a6febc0f 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__bridge_with_ports__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__bridge_with_ports__spec.rb @@ -75,7 +75,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_ubuntu) do it { expect(cfg_file).to match(/iface\s+br8\s+inet\s+manual/) } it { expect(cfg_file).to match(/ovs_type\s+OVSBridge/) } it { expect(cfg_file).to match(/ovs_ports\s+ttt0\s+ttt1/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(5) } # no more lines in the interface file + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(5) } # no more lines in the interface file end context "parse data from fixture" do diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec.rb index daea3b1b2e..893f18cbeb 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__ovs2lnx_patch__spec.rb @@ -82,7 +82,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_ubuntu) do it { expect(cfg_file).to match(/iface\s+br-ovs\s+inet\s+manual/) } it { expect(cfg_file).to match(/ovs_type\s+OVSBridge/) } it { expect(cfg_file).to match(/ovs_ports\s+p_33470efd-0/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(5) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(5) } end context 'for LNX bridge br1' do @@ -92,7 +92,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_ubuntu) do it { expect(cfg_file).to match(/iface\s+br1\s+inet\s+static/) } it { expect(cfg_file).to match(/bridge_ports\s+p_33470efd-0/) } it { expect(cfg_file).to match(/address\s+192.168.88.2\/24/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(4) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(4) } end context 'for ovs2lnx patchcord p_33470efd-0' do @@ -104,7 +104,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_ubuntu) do it { expect(cfg_file).to match(/ovs_type\s+OVSIntPort/) } it { expect(cfg_file).to match(/ovs_bridge\s+br-ovs/) } it { expect(cfg_file).not_to match(/ovs_extra/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(5) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(5) } end end diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec.rb index 375c547698..64e37ea106 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__ovs2ovs_patch__spec.rb @@ -92,7 +92,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_ubuntu) do it { expect(cfg_file).to match(/iface\s+br-ovs1\s+inet\s+manual/) } it { expect(cfg_file).to match(/ovs_type\s+OVSBridge/) } it { expect(cfg_file).to match(/ovs_ports\s+p_33470efd-0/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(5) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(5) } end context 'for OVS bridge br-ovs2' do @@ -102,7 +102,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_ubuntu) do it { expect(cfg_file).to match(/iface\s+br-ovs2\s+inet\s+static/) } it { expect(cfg_file).to match(/bridge_ports\s+p_33470efd-0/) } it { expect(cfg_file).to match(/address\s+192.168.88.2\/24/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(4) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(4) } end context 'for ovs2ovs patchcord p_33470efd-0' do @@ -115,7 +115,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_ubuntu) do it { expect(cfg_file).to match(/ovs_bridge\s+br-ovs1/) } it { expect(cfg_file).to match(/ovs_extra\s+--\s+set\s+Interface\s+p_33470efd-0\s+type=patch\s+options:peer=p_33470efd-1/) } it { expect(cfg_file).to match(/ovs_extra\s+--\s+set\s+Port\s+p_33470efd-0\s+tag=100/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(7) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(7) } end context 'for ovs2ovs patchcord p_33470efd-1' do @@ -128,7 +128,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_ubuntu) do it { expect(cfg_file).to match(/ovs_bridge\s+br-ovs2/) } it { expect(cfg_file).to match(/ovs_extra\s+--\s+set\s+Interface\s+p_33470efd-1\s+type=patch\s+options:peer=p_33470efd-0/) } it { expect(cfg_file).to match(/ovs_extra\s+--\s+set\s+Port\s+p_33470efd-1\s+tag=200/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(7) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(7) } end end diff --git a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__port__spec.rb b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__port__spec.rb index 53a8c4d82a..c9c5a9c481 100644 --- a/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__port__spec.rb +++ b/deployment/puppet/l23network/spec/unit/puppet/provider/l23_stored_config/ovs_ubuntu__port__spec.rb @@ -65,7 +65,7 @@ describe Puppet::Type.type(:l23_stored_config).provider(:ovs_ubuntu) do it { expect(cfg_file).to match(/ovs_type\s+OVSPort/) } it { expect(cfg_file).to match(/ovs_bridge\s+br-ovs1/) } it { expect(cfg_file).to match(/ovs_extra\s+--\s+set\s+Port\s+p2p1\st+ag=100/) } - it { expect(cfg_file.split(/\n/).reject{|x| x=~/^\s*$/}.length). to eq(5) } + it { expect(cfg_file.split(/\n/).reject{|x| x=~/(^\s*$)|(^#.*$)/}.length). to eq(5) } end end