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
148e4a81
Commit
148e4a81
authored
6 years ago
by
Lucas Nussbaum
Browse files
Options
Downloads
Patches
Plain Diff
[dev] introduce get_sites convenience method
parent
e39d7383
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Rakefile
+1
-1
1 addition, 1 deletion
Rakefile
lib/refrepo/gen/wiki/mw_utils.rb
+1
-1
1 addition, 1 deletion
lib/refrepo/gen/wiki/mw_utils.rb
lib/refrepo/utils.rb
+4
-0
4 additions, 0 deletions
lib/refrepo/utils.rb
lib/refrepo/valid/oar-properties.rb
+0
-7
0 additions, 7 deletions
lib/refrepo/valid/oar-properties.rb
with
6 additions
and
9 deletions
Rakefile
+
1
−
1
View file @
148e4a81
...
...
@@ -13,7 +13,7 @@ VALIDATORS_DIR = "./generators/input-validators"
WIKI_DIR
=
"./generators/wiki"
# Get the list of sites as the list of directories in input/grid5000/sites
G5K_SITES
=
(
Dir
::
entries
(
'input/grid5000/sites'
)
-
[
'.'
,
'..'
]).
sort
G5K_SITES
=
RefRepo
::
Utils
::
get_sites
namespace
:puppet
do
...
...
This diff is collapsed.
Click to expand it.
lib/refrepo/gen/wiki/mw_utils.rb
+
1
−
1
View file @
148e4a81
...
...
@@ -114,7 +114,7 @@ module G5K
return
Marshal
.
load
(
Marshal
.
dump
(
@@global_hash
))
end
SITES
=
get_global_hash
[
'sites'
].
keys
.
sort
SITES
=
RefRepo
::
Utils
::
get_sites
end
#Defines MediaWiki helpers
...
...
This diff is collapsed.
Click to expand it.
lib/refrepo/utils.rb
+
4
−
0
View file @
148e4a81
...
...
@@ -17,6 +17,10 @@ module RefRepo::Utils
d
=
open
(
"
#{
conf
[
'uri'
]
}
/
#{
conf
[
'version'
]
}
/
#{
path
}
"
,
o
).
read
return
JSON
::
parse
(
d
)
end
def
self
.
get_sites
return
(
Dir
::
entries
(
'input/grid5000/sites'
)
-
[
'.'
,
'..'
]).
sort
end
end
# Various monkey patches
...
...
This diff is collapsed.
Click to expand it.
lib/refrepo/valid/oar-properties.rb
+
0
−
7
View file @
148e4a81
...
...
@@ -22,13 +22,6 @@ IGNORED_PROPERTIES=%w{chassis chunks thread}
G5K_PROPERTIES
=
%w{api_timestamp available_upto besteffort chunks cluster cluster_priority comment core cpu cpuarch cpucore cpufreq cpuset cputype deploy desktop_computing disk disk_reservation_count diskpath disktype drain eth_count eth_rate expiry_date finaud_decision gpu gpu_count grub host ib ib_count ib_rate id ip last_available_upto last_job_date links maintenance max_walltime memcore memcpu memnode mic myri myri_count myri_rate network_address next_finaud_decision next_state nodemodel production rconsole scheduler_priority slash_16 slash_17 slash_18 slash_19 slash_20 slash_21 slash_22 state state_num subnet_address subnet_prefix suspended_jobs switch type virtual vlan wattmeter opa opa_count opa_rate}
.
sort
-
IGNORED_PROPERTIES
class
Hash
def
slice
(
*
extract
)
h2
=
self
.
select
{
|
key
,
value
|
extract
.
include?
(
key
)
}
h2
end
end
module
RefRepo::Valid::OarProperties
def
self
.
check
(
options
)
ret
=
true
...
...
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