|
4 | 4 |
|
5 | 5 | describe 'perfsonar1.ls.lsst.org', :sitepp do |
6 | 6 | on_supported_os.each do |os, os_facts| |
7 | | - # XXX networking needs to be updated to support EL8+ |
8 | | - next unless os =~ %r{centos-7-x86_64} |
| 7 | + next unless os =~ %r{almalinux-9-x86_64} |
9 | 8 |
|
10 | 9 | context "on #{os}" do |
11 | 10 | let(:facts) do |
|
28 | 27 | it { is_expected.to compile.with_all_deps } |
29 | 28 |
|
30 | 29 | include_examples 'baremetal' |
| 30 | + include_context 'with nm interface' |
| 31 | + it { is_expected.to have_nm__connection_resource_count(3) } |
31 | 32 |
|
32 | | - it { is_expected.to contain_file('/etc/NetworkManager/dispatcher.d/50-em1').with_content(%r{rx 2047 tx 511}) } |
33 | | - it { is_expected.to contain_file('/etc/NetworkManager/dispatcher.d/50-p2p1').with_content(%r{.*rx 4096 tx 4096.*}) } |
34 | | - it { is_expected.to contain_file('/etc/NetworkManager/dispatcher.d/50-p2p2').with_content(%r{.*rx 4096 tx 4096.*}) } |
| 33 | + context 'with eno1' do |
| 34 | + let(:interface) { 'eno1' } |
35 | 35 |
|
36 | | - %w[p2p1 p2p2].each do |i| |
37 | | - it do |
38 | | - is_expected.to contain_network__interface(i).with( |
39 | | - bootproto: 'none', |
40 | | - onboot: 'yes', |
41 | | - type: 'Ethernet', |
42 | | - mtu: '9000' |
43 | | - ) |
44 | | - end |
| 36 | + it_behaves_like 'nm enabled interface' |
| 37 | + it_behaves_like 'nm dhcp interface' |
| 38 | + it_behaves_like 'nm ethernet interface' |
| 39 | + it { expect(nm_keyfile['ethtool']['ring-rx']).to eq(2047) } |
| 40 | + it { expect(nm_keyfile['ethtool']['ring-tx']).to eq(2047) } |
45 | 41 | end |
46 | 42 |
|
47 | | - it do |
48 | | - is_expected.to contain_network__interface('p2p1.360').with( |
49 | | - bootproto: 'none', |
50 | | - onboot: 'yes', |
51 | | - vlan: 'yes', |
52 | | - type: 'vlan', |
53 | | - ipaddress: '139.229.140.135', |
54 | | - netmask: '255.255.255.254', |
55 | | - nozeroconf: 'yes', |
56 | | - mtu: '9000' |
57 | | - ) |
| 43 | + context 'with enp1s0f0' do |
| 44 | + let(:interface) { 'enp1s0f0' } |
| 45 | + |
| 46 | + it_behaves_like 'nm enabled interface' |
| 47 | + it_behaves_like 'nm manual interface' |
| 48 | + it_behaves_like 'nm ethernet interface' |
| 49 | + it { expect(nm_keyfile['ipv4']['address1']).to eq('139.229.140.135/31') } |
| 50 | + it { expect(nm_keyfile['ipv4']['gateway']).to eq('139.229.140.134') } |
| 51 | + it { expect(nm_keyfile['ethernet']['mtu']).to eq(9000) } |
| 52 | + it { expect(nm_keyfile['ipv4']['route1']).to eq('139.229.140.13/32,139.229.140.134') } |
| 53 | + it { expect(nm_keyfile['ipv4']['route2']).to eq('198.32.252.209/32,139.229.140.134') } |
| 54 | + it { expect(nm_keyfile['ipv4']['route3']).to eq('198.124.226.130/32,139.229.140.134') } |
| 55 | + it { expect(nm_keyfile['ipv4']['route4']).to eq('198.124.226.134/32,139.229.140.134') } |
| 56 | + it { expect(nm_keyfile['ipv4']['route5']).to eq('198.124.226.138/32,139.229.140.134') } |
| 57 | + it { expect(nm_keyfile['ipv4']['route6']).to eq('198.124.226.142/32,139.229.140.134') } |
| 58 | + it { expect(nm_keyfile['ipv4']['route7']).to eq('134.73.235.226/32,139.229.140.134') } |
| 59 | + it { expect(nm_keyfile['ipv4']['route8']).to eq('134.79.22.159/32,139.229.140.134') } |
58 | 60 | end |
59 | 61 |
|
60 | | - it do |
61 | | - is_expected.to contain_network__interface('p2p1.726').with( |
62 | | - bootproto: 'none', |
63 | | - onboot: 'yes', |
64 | | - vlan: 'yes', |
65 | | - type: 'vlan', |
66 | | - ipaddress: '10.7.26.2', |
67 | | - netmask: '255.255.255.0', |
68 | | - nozeroconf: 'yes', |
69 | | - mtu: '9000' |
70 | | - ) |
71 | | - end |
72 | | - |
73 | | - it do |
74 | | - is_expected.to contain_network__interface('p2p1.728').with( |
75 | | - bootproto: 'none', |
76 | | - onboot: 'yes', |
77 | | - vlan: 'yes', |
78 | | - type: 'vlan', |
79 | | - ipaddress: '10.7.28.1', |
80 | | - netmask: '255.255.255.0', |
81 | | - nozeroconf: 'yes', |
82 | | - mtu: '9000' |
83 | | - ) |
84 | | - end |
85 | | - |
86 | | - it do |
87 | | - is_expected.to contain_network__interface('p2p2.370').with( |
88 | | - bootproto: 'none', |
89 | | - onboot: 'yes', |
90 | | - vlan: 'yes', |
91 | | - type: 'vlan', |
92 | | - ipaddress: '139.229.140.137', |
93 | | - netmask: '255.255.255.254', |
94 | | - nozeroconf: 'yes', |
95 | | - mtu: '9000' |
96 | | - ) |
97 | | - end |
98 | | - |
99 | | - it do |
100 | | - is_expected.to contain_network__interface('p2p2.727').with( |
101 | | - bootproto: 'none', |
102 | | - onboot: 'yes', |
103 | | - vlan: 'yes', |
104 | | - type: 'vlan', |
105 | | - ipaddress: '10.7.27.2', |
106 | | - netmask: '255.255.255.0', |
107 | | - nozeroconf: 'yes', |
108 | | - mtu: '9000' |
109 | | - ) |
110 | | - end |
111 | | - |
112 | | - it do |
113 | | - is_expected.to contain_network__interface('p2p2.729').with( |
114 | | - bootproto: 'none', |
115 | | - onboot: 'yes', |
116 | | - vlan: 'yes', |
117 | | - type: 'vlan', |
118 | | - ipaddress: '10.7.29.1', |
119 | | - netmask: '255.255.255.0', |
120 | | - nozeroconf: 'yes', |
121 | | - mtu: '9000' |
122 | | - ) |
123 | | - end |
124 | | - |
125 | | - context 'with p2p1.360 routes' do |
126 | | - let(:via) { '139.229.140.134' } |
127 | | - |
128 | | - it do |
129 | | - is_expected.to contain_network__mroute('p2p1.360').with( |
130 | | - routes: [ |
131 | | - '139.229.140.134/31' => 'p2p1.360', |
132 | | - '139.229.140.0/22' => via, |
133 | | - '139.229.144.248/32' => via, |
134 | | - '10.128.0.0/20' => via, |
135 | | - '10.125.0.0/20' => via, |
136 | | - '198.17.196.0/24' => via, |
137 | | - '198.32.252.39/32' => via, |
138 | | - '198.32.252.192/31' => via, |
139 | | - '198.32.252.208/31' => via, |
140 | | - '198.32.252.210/31' => via, |
141 | | - '198.32.252.216/31' => via, |
142 | | - '198.32.252.218/31' => via, |
143 | | - '198.32.252.232/31' => via, |
144 | | - '198.32.252.234/31' => via, |
145 | | - '199.36.153.8/30' => via, |
146 | | - '134.79.235.226/32' => via, |
147 | | - '134.79.235.242/32' => via, |
148 | | - '198.124.226.194/32' => via, |
149 | | - '198.124.226.198/32' => via, |
150 | | - '198.124.226.202/32' => via, |
151 | | - '198.124.226.206/32' => via, |
152 | | - ] |
153 | | - ) |
154 | | - end |
155 | | - end |
156 | | - |
157 | | - context 'with p2p2.370 routes' do |
158 | | - let(:via) { '139.229.140.136' } |
159 | | - |
160 | | - it do |
161 | | - is_expected.to contain_network__mroute('p2p2.370').with( |
162 | | - routes: [ |
163 | | - '139.229.140.136/31' => 'p2p2.370', |
164 | | - '139.229.140.0/22' => via, |
165 | | - '139.229.144.248/32' => via, |
166 | | - '10.128.0.0/20' => via, |
167 | | - '10.125.0.0/20' => via, |
168 | | - '198.17.196.0/24' => via, |
169 | | - '198.32.252.194/31' => via, |
170 | | - '199.36.153.8/30' => via, |
171 | | - '134.79.235.226/32' => via, |
172 | | - '134.79.235.242/32' => via, |
173 | | - '198.124.226.130/32' => via, |
174 | | - '198.124.226.134/32' => via, |
175 | | - '198.124.226.138/32' => via, |
176 | | - '198.124.226.142/32' => via, |
177 | | - ] |
178 | | - ) |
179 | | - end |
| 62 | + context 'with enp1s0f1' do |
| 63 | + let(:interface) { 'enp1s0f1' } |
| 64 | + |
| 65 | + it_behaves_like 'nm enabled interface' |
| 66 | + it_behaves_like 'nm manual interface' |
| 67 | + it_behaves_like 'nm ethernet interface' |
| 68 | + it { expect(nm_keyfile['ipv4']['address1']).to eq('139.229.140.137/31') } |
| 69 | + it { expect(nm_keyfile['ipv4']['gateway']).to eq('139.229.140.136') } |
| 70 | + it { expect(nm_keyfile['ethernet']['mtu']).to eq(9000) } |
| 71 | + it { expect(nm_keyfile['ipv4']['route1']).to eq('139.229.140.15/32,139.229.140.136') } |
| 72 | + it { expect(nm_keyfile['ipv4']['route2']).to eq('198.32.252.217/32,139.229.140.136') } |
| 73 | + it { expect(nm_keyfile['ipv4']['route3']).to eq('198.124.226.194/32,139.229.140.136') } |
| 74 | + it { expect(nm_keyfile['ipv4']['route4']).to eq('198.124.226.198/32,139.229.140.136') } |
| 75 | + it { expect(nm_keyfile['ipv4']['route5']).to eq('198.124.226.202/32,139.229.140.136') } |
| 76 | + it { expect(nm_keyfile['ipv4']['route6']).to eq('198.124.226.206/32,139.229.140.136') } |
| 77 | + it { expect(nm_keyfile['ipv4']['route7']).to eq('134.79.235.242/32,139.229.140.136') } |
| 78 | + it { expect(nm_keyfile['ipv4']['route8']).to eq('134.79.22.212/32,139.229.140.136') } |
180 | 79 | end |
181 | 80 | end # on os |
182 | 81 | end # on_supported_os |
|
0 commit comments