From 52e5e37c718dc7af7db5d860188c301c94ca6498 Mon Sep 17 00:00:00 2001 From: Lucas Nussbaum <lucas.nussbaum@loria.fr> Date: Thu, 13 Jul 2023 22:04:53 +0200 Subject: [PATCH] [kavlanng] fix consistent order to work with clusters with numbers in name (eg abacus25) --- lib/refrepo/gen/puppet/kavlanngg5k.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/refrepo/gen/puppet/kavlanngg5k.rb b/lib/refrepo/gen/puppet/kavlanngg5k.rb index 9a4a83d7089..6951188247d 100644 --- a/lib/refrepo/gen/puppet/kavlanngg5k.rb +++ b/lib/refrepo/gen/puppet/kavlanngg5k.rb @@ -56,7 +56,7 @@ def gen_kavlanapi_g5k_desc(output_path) 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'].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 } -- GitLab