Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic support for InfiniBand (TYPE=InfiniBand and CONNECTED_MODE=… #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions manifests/if/static.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
# $defroute - optional
# $restart - optional - defaults to true
# $arpcheck - optional - defaults to true
# $type - optional
# $connected_mode - optional
#
# === Actions:
#
Expand Down Expand Up @@ -82,6 +84,8 @@
$metric = undef,
$restart = true,
$arpcheck = true,
$type = undef,
$connected_mode = undef,
) {
# Validate our data
if $ipaddress {
Expand Down Expand Up @@ -148,5 +152,7 @@
metric => $metric,
restart => $restart,
arpcheck => $arpcheck,
type => $type,
connected_mode => $connected_mode,
}
} # define network::if::static
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
# $promisc - optional - defaults to false
# $restart - optional - defaults to true
# $arpcheck - optional - defaults to true
# $type - optional
# $connected_mode - optional
#
# === Actions:
#
Expand Down Expand Up @@ -140,6 +142,8 @@
$promisc = false,
$restart = true,
$arpcheck = true,
$type = undef,
$connected_mode = undef,
) {
# Validate our booleans
validate_bool($noaliasrouting)
Expand Down
6 changes: 5 additions & 1 deletion templates/ifcfg-eth.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ HWADDR=<%= @macaddress %>
<% end -%>
ONBOOT=<%= @onboot %>
HOTPLUG=<%= @onboot %>
TYPE=Ethernet
<% if @type and @type != '' %>TYPE=<%= @type %>
<% else %>TYPE=Ethernet
<% end -%>
<% if @ipaddress and @ipaddress != '' %>IPADDR=<%= @ipaddress %>
<% end -%>
<% if @netmask and @netmask != '' %>NETMASK=<%= @netmask %>
Expand Down Expand Up @@ -71,3 +73,5 @@ check_link_down() {
<% if !@arpcheck %>ARPCHECK=no
<% end -%>
NM_CONTROLLED=no
<% if @connected_mode and @connected_mode != '' %>CONNECTED_MODE=<%= @connected_mode %>
<% end -%>