Commit 35adafc9 authored by Lucas Nussbaum's avatar Lucas Nussbaum

[dev] restrict to given cluster. Bug 9968

parent 9e26f60f
Pipeline #55660 passed with stages
in 1 minute and 30 seconds
......@@ -18,6 +18,10 @@ module RefRepo::Valid::OarProperties
resources = RefRepo::Utils::get_api("sites/#{site}/internal/oarapi/resources/details.json?limit=1000000")['items']
default_resources = resources.select { |e| e['type'] == 'default' }.sort_by { |e| e['id'] }
if not options[:clusters].empty?
puts "Restricting to resources of clusters #{options[:clusters].join(',')}"
default_resources.select! { |e| options[:clusters].include?(e['cluster']) }
end
# Checking scheduler_priority
default_resources.each do |r|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment