Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grid5000
reference-repository
Commits
185e7f36
Commit
185e7f36
authored
Apr 19, 2017
by
Florent Didier
Browse files
[dev] Add disk properties for disk reservation
parent
7b9dbbb2
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
generators/lib/hash/hash.rb
View file @
185e7f36
...
@@ -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
...
...
generators/oar-properties/lib/lib-oar-properties.rb
View file @
185e7f36
This diff is collapsed.
Click to expand it.
generators/oar-properties/oar-properties.rb
View file @
185e7f36
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment