Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 52e5e37c authored by Lucas Nussbaum's avatar Lucas Nussbaum
Browse files

[kavlanng] fix consistent order to work with clusters with numbers in name (eg abacus25)

parent 934cce2c
No related branches found
No related tags found
No related merge requests found
Pipeline #834373 passed
...@@ -56,7 +56,7 @@ def gen_kavlanapi_g5k_desc(output_path) ...@@ -56,7 +56,7 @@ def gen_kavlanapi_g5k_desc(output_path)
refapi['sites'].each { |site_id, site_h| refapi['sites'].each { |site_id, site_h|
site_h['clusters'] = site_h['clusters'].sort_by { |cluster_id, _cluster_h| cluster_id }.to_h site_h['clusters'] = site_h['clusters'].sort_by { |cluster_id, _cluster_h| cluster_id }.to_h
site_h['clusters'].each { |_cluster_id, cluster_h| site_h['clusters'].each { |_cluster_id, cluster_h|
cluster_h['nodes'] = cluster_h['nodes'].sort_by { |node_id, _node_h| node_id[/(\d+)/].to_i }.to_h cluster_h['nodes'] = cluster_h['nodes'].sort_by { |node_id, _node_h| p node_id ; p node_id[/[^-]+-(\d+)/, 1].to_i }.to_h
} }
refapi['sites'][site_id] = site_h.sort_by { |key| key}.to_h refapi['sites'][site_id] = site_h.sort_by { |key| key}.to_h
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment