Commit 8c2ac5a3 authored by Baptiste Jonglez's avatar Baptiste Jonglez
Browse files

[wiki/hardware] Show all SSD models, not just NVMe

parent 30535e45
Pipeline #314905 passed with stages
in 6 minutes and 25 seconds
......@@ -79,7 +79,7 @@ class G5KHardwareGenerator < WikiGenerator
'pmem_size' => {},
'net_interconnects' => {},
'net_models' => {},
'nvme_models' => {},
'ssd_models' => {},
'acc_families' => {},
'acc_models' => {},
'acc_cores' => {},
......@@ -177,20 +177,30 @@ class G5KHardwareGenerator < WikiGenerator
}
# NVMe SSD models
nvme = node_hash['storage_devices'].select{ |v|
v['interface'] == 'NVME'}.map{ |v|
ssd = node_hash['storage_devices'].select{ |v|
v['storage'] == 'SSD'}.map{ |v|
t = v['alt_model_name'] || v['model'] || 'N/A';
# Add vendor if not already there
if not t.downcase.start_with?(v['vendor'].downcase)
t = "#{v['vendor']} #{t}"
end
[
{
text: v['interface'], sort: v['interface']
},
{
text: t, sort: t
}
},
{
text: G5K.get_size(v['size'], 'metric'), sort: v['size']
},
]
}
nvme_models = nvme.inject(Hash.new(0)){ |h, v| h[v] += 1; h }
nvme_models.sort_by { |k, v| k.first[:sort] }.each { |k, v|
init(data, 'nvme_models', k)
data['nvme_models'][k][site_uid] += v
ssd_models = ssd.inject(Hash.new(0)){ |h, v| h[v] += 1; h }
ssd_models.sort_by { |k, v| k.first[:sort] }.each { |k, v|
init(data, 'ssd_models', k)
data['ssd_models'][k][site_uid] += v
}
# Accelerators
......@@ -292,9 +302,9 @@ class G5KHardwareGenerator < WikiGenerator
generated_content += MW.generate_table(table_options, table_columns, get_table_data(data, 'net_models'))
generated_content += "\n= Storage ="
generated_content += "\n== NVMe SSD models ==\n"
table_columns = ['NVMe SSD models'] + sites + ['NVMe SSDs total']
generated_content += MW.generate_table(table_options, table_columns, get_table_data(data, 'nvme_models'))
generated_content += "\n== SSD models ==\n"
table_columns = ['SSD interface', 'Model', 'Size'] + sites + ['SSDs total']
generated_content += MW.generate_table(table_options, table_columns, get_table_data(data, 'ssd_models'))
generated_content += "\n== Nodes with several disks ==\n"
generated_content += generate_storage
generated_content += "\n''*: disk is [[Disk_reservation|reservable]]''"
......
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