Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 23c380e7 authored by PHILIPPOT Sebastien's avatar PHILIPPOT Sebastien
Browse files

[lib] add a check for command nodeset required by rake gen:wiki and version:get

parent d0872d0b
No related branches found
No related tags found
No related merge requests found
Pipeline #159190 passed
......@@ -54,6 +54,8 @@ def gen_firmwares_tables
end
end
end
system("which nodeset > /dev/null") or raise "WARNING: command nodeset absent, please install clustershell"
nodesets = nodes.group_by { |e| e.except('address') }.map do |e|
e[1] = e[1].map { |f| f['address'] }
nodes = `echo #{e[1].join(',')} | nodeset -f`.chomp
......
......@@ -318,6 +318,8 @@ def generate_dot(netnodes, links, site)
# group
nodeslinks = nodeslinks.group_by { |l| [ l['target_cluster'], l['attachments'] ] }.to_a.map { |e| e[1].map! { |f| f['target_node'] } ; e }
# factor
system("which nodeset > /dev/null") or raise "WARNING: command nodeset absent, please install clustershell"
nodeslinks.map! { |e| e[1] = sh("echo #{e[1].uniq.join(' ')}|nodeset -f"); e }
header = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment