Skip to content

Commit 1558d95

Browse files
committed
Rename slurm_compute_weights to profile::slurm::compute_weights
1 parent 10c537f commit 1558d95

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/puppet/functions/slurm_compute_weights.rb renamed to site/profile/lib/puppet/functions/profile/slurm/compute_weights.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
Puppet::Functions.create_function(:slurm_compute_weights) do
2-
dispatch :slurm_compute_weights do
1+
Puppet::Functions.create_function(:'profile::slurm::compute_weights') do
2+
dispatch :'profile::slurm::compute_weights' do
33
param 'Hash', :instances
44
return_type 'Hash'
55
end
66

7-
def slurm_compute_weights(instances)
7+
def profile::slurm::compute_weights(instances)
88
require 'set'
99
unique_specs = Set.new(instances.values.map {|i| i['specs']})
1010
sorted_specs = unique_specs.sort_by{|spec| [spec['gpus'], spec['ram'], spec['cpus']]}

site/profile/manifests/slurm.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
{
245245
'nodes' => $nodes,
246246
'memlimit' => $os_reserved_memory,
247-
'weights' => slurm_compute_weights($nodes),
247+
'weights' => profile::slurm::compute_weights($nodes),
248248
}),
249249
}
250250

0 commit comments

Comments
 (0)