Commit 6ab6e3a1 authored by Jérémie Gaidamour's avatar Jérémie Gaidamour
Browse files

[all] new input files: added grid5000.yaml

parent 92416f14
uid: grid5000
\ No newline at end of file
......@@ -32,6 +32,8 @@ def load_yaml_file_hierarchy(directory)
# Inject the file content into the global_hash, at the right place
path_hierarchy = File.dirname(filename).split('/') # Split the file path (path relative to input/)
path_hierarchy = [] if path_hierarchy == ['.']
file_hash = Hash.from_array(path_hierarchy, file_hash) # Build the nested hash hierarchy according to the file path
global_hash = global_hash.deep_merge(file_hash) # Merge global_hash and file_hash. The value for entries with duplicate keys will be that of file_hash
......@@ -44,6 +44,19 @@ def net_switch_port_lookup(site, node_uid, interface='')
return nil
# Write grid info
if global_hash['uid']
global_hash["type"] = "grid"
grid_path =
global_hash.reject {|k, v| k == "sites"})
global_hash["sites"].each do |site_uid, site|
puts site_uid
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