Mentions légales du service

Skip to content
Snippets Groups Projects
Commit db0fbb9b authored by RINGOT Patrice's avatar RINGOT Patrice
Browse files

[kavlanngg5k] force order of the top level entries of the site level...

[kavlanngg5k] force order of the top level entries of the site level (clusters, network_equipents_servers)
parent 022a41cf
No related branches found
No related tags found
1 merge request!369[kavlanngg5k] force order of the top level entries of the site level...
Pipeline #502433 passed
...@@ -47,11 +47,12 @@ def gen_json(output_path) ...@@ -47,11 +47,12 @@ def gen_json(output_path)
end end
# consistent order # consistent order
site_data_hierarchy['sites'] = site_data_hierarchy['sites'].sort_by { |site_id, _site_h| site_id }.to_h site_data_hierarchy['sites'] = site_data_hierarchy['sites'].sort_by { |site_id, _site_h| site_id }.to_h
site_data_hierarchy['sites'].each { |_site_id, site_h| site_data_hierarchy['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| node_id[/(\d+)/].to_i }.to_h
} }
site_data_hierarchy['sites'][site_id] = site_h.sort_by { |key| key}.to_h
} }
output_file = File.new(output_path, 'w') output_file = File.new(output_path, 'w')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment