Mentions légales du service

Skip to content
Snippets Groups Projects
Commit e9851f48 authored by POUILLOUX Laurent's avatar POUILLOUX Laurent
Browse files

Revert "[reference-api] Stop generating accesses"

This reverts commit 4c1e3cb5.
parent 031a99c9
No related branches found
No related tags found
1 merge request!794Revert "[reference-api] Stop generating accesses"
require 'refrepo/valid/input/schema' require 'refrepo/valid/input/schema'
require 'refrepo/valid/homogeneity' require 'refrepo/valid/homogeneity'
require 'refrepo/accesses'
# Creation du fichier network_equipment # Creation du fichier network_equipment
def create_network_equipment(network_uid, network, refapi_path, site_uid = nil) def create_network_equipment(network_uid, network, refapi_path, site_uid = nil)
...@@ -48,11 +49,14 @@ def generate_reference_api ...@@ -48,11 +49,14 @@ def generate_reference_api
global_hash.reject {|k, _v| k == "sites" || k == "network_equipments" || k == "disk_vendor_model_mapping"}) global_hash.reject {|k, _v| k == "sites" || k == "network_equipments" || k == "disk_vendor_model_mapping"})
end end
accesses_path = Pathname.new(refapi_path).join("accesses")
puts "Generating the reference api:\n\n" puts "Generating the reference api:\n\n"
puts "Removing data directory:\n" puts "Removing data directory:\n"
FileUtils.rm_rf(Pathname.new(refapi_path).join("sites")) FileUtils.rm_rf(Pathname.new(refapi_path).join("sites"))
FileUtils.rm_rf(Pathname.new(refapi_path).join("network_equipments")) FileUtils.rm_rf(Pathname.new(refapi_path).join("network_equipments"))
FileUtils.rm_rf(accesses_path)
puts "Done." puts "Done."
# Generate global network_equipments (renater links) # Generate global network_equipments (renater links)
...@@ -160,6 +164,14 @@ def generate_reference_api ...@@ -160,6 +164,14 @@ def generate_reference_api
end end
# Generate the json containing all accesses level.
accesses_path.mkpath()
generate_accesses_json(
accesses_path.join("all.json"),
generate_access_level
)
node_keys = %w[uid nodeset gpu_devices processor architecture storage_devices memory_devices network_adapters performance] node_keys = %w[uid nodeset gpu_devices processor architecture storage_devices memory_devices network_adapters performance]
# Generate the all-in-one json with just enough information for resources-explorer. # Generate the all-in-one json with just enough information for resources-explorer.
all_in_one_hash = { all_in_one_hash = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment