Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reference-repository
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
grid5000
reference-repository
Commits
7a93bc77
Commit
7a93bc77
authored
4 years ago
by
Pierre Neyron
Browse files
Options
Downloads
Patches
Plain Diff
[spec] make oar_properties2 allow using only a subset of the nodes of an existing real cluster
parent
ce9c2ea5
No related branches found
No related tags found
1 merge request
!103
11903 set the chassis property
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
spec/oar_properties2_spec.rb
+2
-2
2 additions, 2 deletions
spec/oar_properties2_spec.rb
with
2 additions
and
2 deletions
spec/oar_properties2_spec.rb
+
2
−
2
View file @
7a93bc77
$LOAD_PATH
.
unshift
(
File
.
expand_path
(
File
.
dirname
(
__FILE__
)))
require
'spec_helper'
def
gen_stub
(
file
,
site
,
cluster
)
def
gen_stub
(
file
,
site
,
cluster
,
node_count
=
9999
)
data
=
load_data_hierarchy
data
[
'sites'
].
delete_if
{
|
k
,
v
|
site
!=
k
}
data
[
'sites'
].
each_pair
do
|
site_uid
,
s
|
...
...
@@ -17,7 +17,7 @@ def gen_stub(file, site, cluster)
nodes
=
c
[
'clustera'
][
'nodes'
]
nodes
.
keys
.
each
do
|
k
|
c
,
n
=
k
.
split
(
'-'
)
nodes
[
"clustera-
#{
n
}
"
]
=
nodes
[
k
]
nodes
[
"clustera-
#{
n
}
"
]
=
nodes
[
k
]
if
n
.
to_i
<=
node_count
nodes
.
delete
(
k
)
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment