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
0c03b9fe
Commit
0c03b9fe
authored
Apr 29, 2016
by
Jérémie Gaidamour
Browse files
[dev] check-cluster-homogeneity. Added a whitelist per nodes
parent
400b2bfa
Changes
2
Hide whitespace changes
Inline
Side-by-side
generators/input-validators/check-cluster-homogeneity.rb
View file @
0c03b9fe
...
...
@@ -106,6 +106,12 @@ eos
return
ignore_keys
end
def
cluster_ignore_keys
(
filename
)
file_hash
=
YAML
::
load
(
ERB
.
new
(
File
.
read
(
filename
)).
result
(
binding
))
file_hash
.
expand_square_brackets
()
if
file_hash
return
file_hash
end
def
cluster_homogeneity
(
refapi_hash
,
verbose
=
false
)
if
verbose
puts
"The change set is represented using the following syntax:"
...
...
@@ -115,8 +121,9 @@ def cluster_homogeneity(refapi_hash, verbose=false)
puts
''
end
ignore_keys
=
global_ignore_keys
()
ignore_keys
=
global_ignore_keys
()
cignore_keys
=
cluster_ignore_keys
(
"../input-validators/check-cluster-homogeneity.yaml.erb"
)
refapi_hash
=
load_yaml_file_hierarchy
(
"../../input/grid5000/"
)
count
=
{}
...
...
@@ -157,8 +164,10 @@ def cluster_homogeneity(refapi_hash, verbose=false)
# end of hack
# Remove keys that are specific to each nodes (ip, mac etc.)
ikeys
=
cignore_keys
[
site_uid
][
node_uid
]
rescue
nil
diffs
.
clone
.
each
{
|
diff
|
diffs
.
delete
(
diff
)
if
ignore_keys
.
include?
(
diff
[
0
]
+
diff
[
1
])
diffs
.
delete
(
diff
)
if
ikeys
&&
ikeys
.
include?
(
diff
[
0
]
+
diff
[
1
])
}
if
verbose
&&
!
diffs
.
empty?
...
...
generators/input-validators/check-cluster-homogeneity.yaml.erb
0 → 100644
View file @
0c03b9fe
# Ignored keys for check-cluster-homogeneity.rb
# ---
# SYNTAX:
# sophia:
# suno-[1-45]:
# - ~main_memory.ram_size
# sol-[1-50]:
# - ~main_memory.ram_size
# sol-29:
# - +network_adapters.myri0
---
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