diff --git a/hieradata/node/auxtel-ill-control.cp.lsst.org.yaml b/hieradata/node/auxtel-ill-control.cp.lsst.org.yaml new file mode 100644 index 0000000000..93891d8de2 --- /dev/null +++ b/hieradata/node/auxtel-ill-control.cp.lsst.org.yaml @@ -0,0 +1,49 @@ +--- +nm::connections: + enp1s0: # fqdn + content: + connection: + id: "enp1s0" + uuid: "8515293a-ae5d-3af2-a8d4-949459e358a3" + type: "ethernet" + interface-name: "enp1s0" + ethernet: {} + ipv4: + method: "auto" + ipv6: + method: "disabled" + proxy: {} + enp2s0: # dds-auxtel + content: + connection: + id: "enp2s0" + uuid: "bf99bc41-912e-40de-9213-b019103accee" + type: "ethernet" + interface-name: "enp2s0" + master: "dds" + slave-type: "bridge" + ethernet: {} + bridge-port: {} + dds: + content: + connection: + id: "dds" + uuid: "04a2ae02-7ab4-4c14-8f60-ce98488faeeb" + type: "bridge" + interface-name: "dds" + ethernet: {} + bridge: + stp: false + ipv4: + address1: "139.229.170.14/24,139.229.170.254" + dns: "139.229.160.53;139.229.160.54;139.229.160.55;" + dns-search: "cp.lsst.org;" + method: "manual" + never-default: "true" + route1: "139.229.147.0/24,139.229.170.254" + route2: "139.229.166.0/24,139.229.170.254" + route3: "139.229.167.0/24,139.229.170.254" + route4: "139.229.178.0/24,139.229.170.254" + ipv6: + method: "disabled" + proxy: {} diff --git a/spec/hosts/nodes/auxtel-ill-control.cp.lsst.org_spec.rb b/spec/hosts/nodes/auxtel-ill-control.cp.lsst.org_spec.rb new file mode 100644 index 0000000000..b99e7d2dcc --- /dev/null +++ b/spec/hosts/nodes/auxtel-ill-control.cp.lsst.org_spec.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'auxtel-ill-control.cp.lsst.org', :sitepp do + on_supported_os.each do |os, os_facts| + next unless os =~ %r{almalinux-9-x86_64} + + context "on #{os}" do + let(:facts) do + lsst_override_facts(os_facts, + is_virtual: false, + virtual: 'physical', + dmi: { + 'product' => { + 'name' => 'CBxx63', + }, + }) + end + let(:node_params) do + { + role: 'fiberspec', + site: 'cp', + } + end + + it { is_expected.to compile.with_all_deps } + + include_examples 'baremetal no bmc' + include_context 'with nm interface' + it { is_expected.to have_nm__connection_resource_count(3) } + + context 'with enp1s0' do + let(:interface) { 'enp1s0' } + + it_behaves_like 'nm enabled interface' + it_behaves_like 'nm dhcp interface' + it_behaves_like 'nm ethernet interface' + end + + context 'with enp2s0' do + let(:interface) { 'enp2s0' } + it_behaves_like 'nm enabled interface' + it_behaves_like 'nm ethernet interface' + it_behaves_like 'nm bridge slave interface', master: 'dds' + end + + context 'with dds' do + let(:interface) { 'dds' } + it_behaves_like 'nm enabled interface' + it_behaves_like 'nm bridge interface' + it_behaves_like 'nm manual interface' + it_behaves_like 'nm no default route' + it { expect(nm_keyfile['ipv4']['address1']).to eq('139.229.170.14/24,139.229.170.254') } + it { expect(nm_keyfile['ipv4']['dns']).to eq('139.229.160.53;139.229.160.54;139.229.160.55;') } + it { expect(nm_keyfile['ipv4']['dns-search']).to eq('cp.lsst.org;') } + it { expect(nm_keyfile['ipv4']['route1']).to eq('139.229.147.0/24,139.229.170.254') } + it { expect(nm_keyfile['ipv4']['route2']).to eq('139.229.166.0/24,139.229.170.254') } + it { expect(nm_keyfile['ipv4']['route3']).to eq('139.229.167.0/24,139.229.170.254') } + it { expect(nm_keyfile['ipv4']['route4']).to eq('139.229.178.0/24,139.229.170.254') } + end + end # on os + end # on_supported_os +end