Skip to content

Commit 78b7af8

Browse files
committed
(node/dhcp1.dev) fwv
1 parent e1b4271 commit 78b7af8

File tree

2 files changed

+97
-0
lines changed

2 files changed

+97
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
nm::connections:
3+
enp1s0:
4+
content:
5+
connection:
6+
id: "enp1s0"
7+
uuid: "1aa9cca6-8596-4e4e-96a6-e4a1028cd8d2"
8+
type: "ethernet"
9+
interface-name: "enp1s0"
10+
ethernet: {}
11+
ipv4:
12+
address1: "139.229.134.114/24,139.229.134.254"
13+
dns: "139.229.134.53;139.229.134.54;139.229.134.55;"
14+
dns-search: "dev.lsst.org;"
15+
method: "manual"
16+
ipv6:
17+
method: "disabled"
18+
proxy: {}
19+
20+
dhcp::interfaces:
21+
- "enp1s0bogus"
22+
23+
dhcp::authoritative: true
24+
dhcp::pxeserver: "139.229.134.5" # foreman.dev.lsst.org
25+
dhcp::options:
26+
- "voip-tftp-server code 150 = { ip-address }"
27+
- "space cisco"
28+
- "cisco.wlc code 241 = array of ip-address"
29+
- "local-encapsulation code 43 = encapsulate cisco"
30+
# theforeman/dhcp 5.0.1 only supports `option domain-search` per pool
31+
dhcp::pools:
32+
IT-Dev:
33+
network: "139.229.134.0"
34+
mask: "255.255.255.0"
35+
gateway: "139.229.134.254"
36+
range:
37+
- "139.229.134.120 139.229.134.179"
38+
search_domains: "%{alias('dhcp::dnsdomain')}"
39+
BDC-Ayekan:
40+
network: "139.229.144.0"
41+
mask: "255.255.255.192"
42+
gateway: "139.229.144.62"
43+
range:
44+
- "139.229.144.40 139.229.144.59"
45+
search_domains: "%{alias('dhcp::dnsdomain')}"
46+
DEV-MGT:
47+
network: "139.229.144.64"
48+
mask: "255.255.255.192"
49+
gateway: "139.229.144.126"
50+
range:
51+
- "139.229.144.100 139.229.144.123"
52+
search_domains: "%{alias('dhcp::dnsdomain')}"
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# frozen_string_literal: true
2+
3+
require 'spec_helper'
4+
5+
describe 'dhcp1.dev.lsst.org', :sitepp do
6+
on_supported_os.each do |os, os_facts|
7+
next unless os =~ %r{almalinux-9-x86_64}
8+
9+
context "on #{os}" do
10+
let(:facts) do
11+
lsst_override_facts(os_facts,
12+
is_virtual: true,
13+
virtual: 'kvm',
14+
dmi: {
15+
'product' => {
16+
'name' => 'KVM',
17+
},
18+
})
19+
end
20+
let(:node_params) do
21+
{
22+
role: 'dhcp',
23+
site: 'dev',
24+
}
25+
end
26+
27+
it { is_expected.to compile.with_all_deps }
28+
29+
include_examples 'vm'
30+
include_context 'with nm interface'
31+
it { is_expected.to have_nm__connection_resource_count(1) }
32+
33+
context 'with enp1s0' do
34+
let(:interface) { 'enp1s0' }
35+
36+
it_behaves_like 'nm enabled interface'
37+
it_behaves_like 'nm ethernet interface'
38+
it_behaves_like 'nm manual interface'
39+
it { expect(nm_keyfile['ipv4']['address1']).to eq('139.229.134.114/24,139.229.134.254') }
40+
it { expect(nm_keyfile['ipv4']['dns']).to eq('139.229.134.53;139.229.134.54;139.229.134.55;') }
41+
it { expect(nm_keyfile['ipv4']['dns-search']).to eq('dev.lsst.org;') }
42+
end
43+
end # on os
44+
end # on_supported_os
45+
end

0 commit comments

Comments
 (0)