From 0fdae50b69eb645b26c0d8bf88b6f07bcfa4c97e Mon Sep 17 00:00:00 2001 From: dtapiacl Date: Tue, 21 Jan 2025 21:30:53 -0300 Subject: [PATCH] (node/sal-dx.cp) add el9 network configuration --- hieradata/node/sal-dx.cp.lsst.org.yaml | 19 +++++++--- spec/hosts/nodes/sal-dx.cp.lsst.org_spec.rb | 39 +++++++++++++++++++++ 2 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 spec/hosts/nodes/sal-dx.cp.lsst.org_spec.rb diff --git a/hieradata/node/sal-dx.cp.lsst.org.yaml b/hieradata/node/sal-dx.cp.lsst.org.yaml index 9ee3c3f3cd..1a1c14a804 100644 --- a/hieradata/node/sal-dx.cp.lsst.org.yaml +++ b/hieradata/node/sal-dx.cp.lsst.org.yaml @@ -1,6 +1,15 @@ --- -network::interfaces_hash: - eth0: - bootproto: "dhcp" - onboot: "yes" - type: "Ethernet" +nm::connections: + ens192: + content: + connection: + id: "ens192" + uuid: "03da7500-2101-c722-2438-d0d006c28c73" + type: "ethernet" + interface-name: "ens192" + ethernet: {} + ipv4: + method: "auto" + ipv6: + method: "disabled" + proxy: {} diff --git a/spec/hosts/nodes/sal-dx.cp.lsst.org_spec.rb b/spec/hosts/nodes/sal-dx.cp.lsst.org_spec.rb new file mode 100644 index 0000000000..ce637289eb --- /dev/null +++ b/spec/hosts/nodes/sal-dx.cp.lsst.org_spec.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'sal-dx.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: true, + virtual: 'vmware', + dmi: { + 'product' => { + 'name' => 'VMware7,1', + }, + }) + end + let(:node_params) do + { + role: 'sal-dx', + site: 'cp', + } + end + + it { is_expected.to compile.with_all_deps } + + include_context 'with nm interface' + it { is_expected.to have_nm__connection_resource_count(1) } + context 'with ens192' do + let(:interface) { 'ens192' } + it_behaves_like 'nm enabled interface' + it_behaves_like 'nm ethernet interface' + it_behaves_like 'nm dhcp interface' + end + end # on os + end # on_supported_os +end