Gitlab Community Edition Instance

Skip to content
Snippets Groups Projects
Commit 952461ba authored by Benedikt Wegmann's avatar Benedikt Wegmann
Browse files

ethtool_setup.pp: keine NIC-Konfiguration in OpenStack-VMs

parent 9d4049f1
No related branches found
No related tags found
No related merge requests found
# Set ring parameterd for interface
class ubuntu_server::ethtool_setup{
$interface_names = split($::interfaces, ',')
ubuntu_server::ring_parameters{$interface_names: }
if $::productname != 'OpenStack Nova' {
$interface_names = split($::interfaces, ',')
ubuntu_server::ring_parameters{$interface_names: }
}
}
......@@ -2,14 +2,29 @@ require 'spec_helper'
describe "ubuntu_server::ethtool_setup" do
let(:facts) {{
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
:interfaces => 'eth0,lo,br0',
}}
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_ubuntu_server__ring_parameters('eth0') }
it { is_expected.to contain_ubuntu_server__ring_parameters('br0') }
it { is_expected.to contain_ubuntu_server__ring_parameters('lo') }
context "with 'productname != OpenStack Nova'" do
let(:facts) {{
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
:interfaces => 'eth0,lo,br0',
}}
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_ubuntu_server__ring_parameters('eth0') }
it { is_expected.to contain_ubuntu_server__ring_parameters('br0') }
it { is_expected.to contain_ubuntu_server__ring_parameters('lo') }
end
context "with 'productname == OpenStack Nova'" do
let(:facts) {{
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
:interfaces => 'eth0,lo,br0',
:productname => 'OpenStack Nova',
}}
it { is_expected.to compile.with_all_deps }
it { is_expected.not_to contain_ubuntu_server__ring_parameters('eth0') }
it { is_expected.not_to contain_ubuntu_server__ring_parameters('br0') }
it { is_expected.not_to contain_ubuntu_server__ring_parameters('lo') }
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment