Commit 185e7f36 authored by Florent Didier's avatar Florent Didier
Browse files

[dev] Add disk properties for disk reservation

parent 7b9dbbb2
...@@ -109,7 +109,7 @@ class ::Hash ...@@ -109,7 +109,7 @@ class ::Hash
self[key_x] = deep_merge_entries(deep_copy(value_ab), value_x).clone self[key_x] = deep_merge_entries(deep_copy(value_ab), value_x).clone
} }
end end
# Delete entry "PREFIX[a-b]" # Delete entry "PREFIX[a-b]"
self.delete(key_ab) self.delete(key_ab)
keys.delete(key_ab) keys.delete(key_ab)
...@@ -143,9 +143,10 @@ class ::Hash ...@@ -143,9 +143,10 @@ class ::Hash
# Custom iterator. Only consider entries corresponding to cluster_list and node_list. Sorted by node_uid. # Custom iterator. Only consider entries corresponding to cluster_list and node_list. Sorted by node_uid.
def each_filtered_node_uid(cluster_list, node_list) def each_filtered_node_uid(cluster_list, node_list)
self.each_sort_by_node_uid { |node_uid, properties| self.each_sort_by_node_uid { |key, properties|
node_uid, = key
cluster_uid = node_uid.split(/-/).first cluster_uid = node_uid.split(/-/).first
if (! cluster_list || cluster_list.include?(cluster_uid)) && if (! cluster_list || cluster_list.include?(cluster_uid)) &&
(! node_list || node_list.include?(node_uid)) (! node_list || node_list.include?(node_uid))
yield node_uid, properties yield node_uid, properties
......
This diff is collapsed.
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