Skip to content

Commit

Permalink
Add autoconnect_slaves parameter (#86)
Browse files Browse the repository at this point in the history
* Add autoconnect_slaves parameter
  • Loading branch information
castrov authored Aug 14, 2023
1 parent 3460d87 commit 8c8bda3
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* Sat Aug 12 2023 Daniel Castro <[email protected]> - 6.4.2
- Add autoconnect_slaves parameter

* Wed Jul 19 2023 Chris Tessmer <[email protected]> - 6.4.1
- Fix EL8 `dhclient` flags in eth template:
- `-timeout ` (EL7) vs `--timeout` (EL8)
Expand Down
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ The following parameters are available in the `network::eth` defined type:
* [`auto_discover_mac`](#-network--eth--auto_discover_mac)
* [`bonding`](#-network--eth--bonding)
* [`arp`](#-network--eth--arp)
* [`autoconnect_slaves`](#-network--eth--autoconnect_slaves)
* [`bond_arp_interval`](#-network--eth--bond_arp_interval)
* [`bond_arp_ip_target`](#-network--eth--bond_arp_ip_target)
* [`bond_downdelay`](#-network--eth--bond_downdelay)
Expand Down Expand Up @@ -423,6 +424,14 @@ Data type: `Optional[Boolean]`



Default value: `undef`

##### <a name="-network--eth--autoconnect_slaves"></a>`autoconnect_slaves`

Data type: `Optional[Boolean]`



Default value: `undef`

##### <a name="-network--eth--bond_arp_interval"></a>`bond_arp_interval`
Expand Down
2 changes: 2 additions & 0 deletions manifests/eth.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
# ignored.
#
# @param arp
# @param autoconnect_slaves
# @param bond_arp_interval
# @param bond_arp_ip_target
# @param bond_downdelay
Expand Down Expand Up @@ -121,6 +122,7 @@
#
define network::eth (
Optional[Boolean] $arp = undef,
Optional[Boolean] $autoconnect_slaves = undef,
Boolean $auto_discover_mac = true,
Boolean $bonding = false,
Optional[Integer] $bond_arp_interval = undef,
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simp-network",
"version": "6.4.1",
"version": "6.4.2",
"author": "SIMP Team",
"summary": "manages host networking",
"license": "Apache-2.0",
Expand Down
1 change: 1 addition & 0 deletions spec/defines/eth_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
let(:title) { 'everything_eth' }
let(:params) {{
:arp => true,
:autoconnect_slaves => true,
:auto_discover_mac => true,
:bonding => true,
:bond_arp_interval => 5,
Expand Down
1 change: 1 addition & 0 deletions spec/expected/everything_eth.el7
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ LINKDELAY=5
BRIDGE=br0
NM_CONTROLLED=no
BONDING_OPTS='arp_interval=5 arp_ip_target=192.168.1.1 #lacp_rate=1 max_bonds=5 miimon=100 downdelay=2 updelay=3 mode=4 bond_use_carrier=1 xmit_hash_policy=layer2+3'
AUTOCONNECT_SLAVES=yes
1 change: 1 addition & 0 deletions spec/expected/everything_eth.el8
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ LINKDELAY=5
BRIDGE=br0
NM_CONTROLLED=no
BONDING_OPTS='arp_interval=5 arp_ip_target=192.168.1.1 #lacp_rate=1 max_bonds=5 miimon=100 downdelay=2 updelay=3 mode=4 bond_use_carrier=1 xmit_hash_policy=layer2+3'
AUTOCONNECT_SLAVES=yes
4 changes: 4 additions & 0 deletions templates/eth.erb
Original file line number Diff line number Diff line change
Expand Up @@ -258,5 +258,9 @@
unless t_bonding_options.empty?
eth_opts << "BONDING_OPTS='#{t_bonding_options.join(' ')}'"
end

unless @autoconnect_slaves.nil?
eth_opts << "AUTOCONNECT_SLAVES=#{bool_to_yesno[@autoconnect_slaves]}"
end
-%>
<%= eth_opts.join("\n") %>

0 comments on commit 8c8bda3

Please sign in to comment.