diff --git a/hieradata/node/fiber-spec01.tu.lsst.org.yaml b/hieradata/node/fiber-spec01.tu.lsst.org.yaml new file mode 100644 index 0000000000..cd777e456e --- /dev/null +++ b/hieradata/node/fiber-spec01.tu.lsst.org.yaml @@ -0,0 +1,42 @@ +--- +nm::connections: + enp2s0: #fqdn + content: + connection: + id: "enp2s0" + uuid: "651380a2-965d-4baa-8c34-5c4062434319" + type: "ethernet" + interface-name: "enp2s0" + ethernet: {} + ipv4: + method: "auto" + ipv6: + method: "disabled" + proxy: {} + enp1s0: # misc-dds|140.252.147.128/27 + content: + connection: + id: "enp1s0" + uuid: "42f27e6a-4d8e-42b9-bb83-3db4b59e6d16" + type: "ethernet" + interface-name: "enp1s0" + 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: "140.252.147.137/27" + method: "manual" + ipv6: + method: "disabled" + proxy: {} diff --git a/spec/hosts/nodes/fiber-spec01.tu.lsst.org_spec.rb b/spec/hosts/nodes/fiber-spec01.tu.lsst.org_spec.rb new file mode 100644 index 0000000000..50e44b173e --- /dev/null +++ b/spec/hosts/nodes/fiber-spec01.tu.lsst.org_spec.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'fiber-spec01.tu.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 + override_facts(os_facts, + fqdn: 'fiber-spec01.tu.lsst.org', + is_virtual: false, + virtual: 'physical', + dmi: { + 'product' => { + 'name' => 'CBxx63', + }, + }) + end + let(:node_params) do + { + role: 'dco', + site: 'tu', + } + 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 enp2s0' do + let(:interface) { 'enp2s0' } + + it_behaves_like 'nm enabled interface' + it_behaves_like 'nm dhcp interface' + it_behaves_like 'nm ethernet interface' + end + + context 'with enp1s0' do + let(:interface) { 'enp1s0' } + + 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 { expect(nm_keyfile['ipv4']['address1']).to eq('140.252.147.137/27') } + end + end # on os + end # on_supported_os +end