Defined Type: slurm::switch

Defined in:
manifests/switch.pp

Summary

Add switch to topology.conf

Overview

Examples:

slurm::switch { 'switch1':
  switches => 'switch[2-3],
}
slurm::switch { 'switch2':
  nodes => 'c0[1-2]',
}

Parameters:

  • switch_name (Any) (defaults to: $name)

    = $name, SwitchName value, see man page for topology.conf

  • switches (Any) (defaults to: undef)

    = undef, Switches value, see man page for topology.conf

  • nodes (Any) (defaults to: undef)

    = undef, Nodes value, see man page for topology.conf

  • link_speed (Any) (defaults to: undef)

    = undef, LinkSpeed value, see man page for topology.conf

  • order (Any) (defaults to: '50')

    = '50', Order inside topology.conf



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'manifests/switch.pp', line 22

define slurm::switch (
  $switch_name = $name,
  $switches = undef,
  $nodes = undef,
  $link_speed = undef,
  $order = '50',
) {

  if ! $nodes and ! $switches {
    fail('slurm::switch: Must define either nodes or switches')
  }

  include ::slurm

  $conf_values = {
    'SwitchName' => $switch_name,
    'Switches' => $switches,
    'Nodes' => $nodes,
    'LinkSpeed' => $link_speed,
  }

  concat::fragment { "slurm-topology.conf-${name}":
    target  => 'slurm-topology.conf',
    content => template($::slurm::switch_template),
    order   => $order,
  }

}