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
6c9ae1e6
Commit
6c9ae1e6
authored
Jan 25, 2013
by
Pascal Morillon
Browse files
[admin] Update PDUs managemnt
parent
7a58ba31
Changes
13
Hide whitespace changes
Inline
Side-by-side
Rakefile
View file @
6c9ae1e6
...
...
@@ -55,6 +55,7 @@ namespace :g5k do
command
+=
" "
+
File
.
join
(
root_dir_input
,
site
,
"
#{
site
}
.rb"
)
command
+=
" "
+
File
.
join
(
root_dir_input
,
site
,
"clusters"
,
"
#{
host
}
.rb"
)
command
+=
" "
+
File
.
join
(
root_dir_input
,
site
,
"clusters"
,
"
#{
host
}
.yaml"
)
command
+=
" "
+
File
.
join
(
root_dir_input
,
site
,
"pdus.rb"
)
command
<<
" -s"
if
ENV
[
'DRY'
]
==
"yes"
# puts command
...
...
@@ -62,18 +63,6 @@ namespace :g5k do
end
end
namespace
:pdus
do
desc
"Generates the JSON files for PDUs informations"
task
:generate
do
raise
"Need SITE="
unless
site
=
ENV
[
'SITE'
]
root_dir_input
=
"
#{
ROOT_DIR
}
/generators/input/sites"
command
=
File
.
join
(
ROOT_DIR
,
"generators"
,
"grid5000"
)
command
+=
" "
+
File
.
join
(
root_dir_input
,
site
,
"pdus.rb"
)
command
<<
" -s"
if
ENV
[
'DRY'
]
==
"yes"
sh
command
end
end
# rake deadnodes:reasons
# rake deadnodes:tofix
namespace
:deadnodes
do
...
...
generators/input/sites/bordeaux/pdus.rb
0 → 100644
View file @
6c9ae1e6
generators/input/sites/grenoble/pdus.rb
0 → 100644
View file @
6c9ae1e6
generators/input/sites/lille/pdus.rb
0 → 100644
View file @
6c9ae1e6
generators/input/sites/luxembourg/pdus.rb
0 → 100644
View file @
6c9ae1e6
generators/input/sites/lyon/pdus.rb
0 → 100644
View file @
6c9ae1e6
generators/input/sites/nancy/pdus.rb
0 → 100644
View file @
6c9ae1e6
site
:nancy
do
|
site_uid
|
2
.
times
do
|
i
|
pdu
"graphene-pdu
#{
i
+
5
}
"
do
|
pdu_uid
|
vendor
"Eaton Corporation"
model
""
sensors
[
{
:power
=>
{
:per_outlets
=>
true
,
:snmp
=>
{
:available
=>
true
,
:total_oids
=>
[
"iso.3.6.1.4.1.534.6.6.7.5.5.1.3.0.1"
,
"iso.3.6.1.4.1.534.6.6.7.5.5.1.3.0.2"
],
:unit
=>
"W"
,
:outlet_prefix_oid
=>
"iso.3.6.1.4.1.534.6.6.7.6.5.1.3.0"
}
}
}
]
end
end
end
generators/input/sites/reims/pdus.rb
0 → 100644
View file @
6c9ae1e6
generators/input/sites/rennes/pdus.rb
View file @
6c9ae1e6
...
...
@@ -10,8 +10,8 @@ site :rennes do |site_uid|
:per_outlets
=>
false
,
:snmp
=>
{
:available
=>
true
,
:total_oid
=>
"iso.3.6.1.4.1.17420.1.2.9.1.11.0"
,
:
total_
unit
=>
"dA"
:total_oid
s
=>
[
"iso.3.6.1.4.1.17420.1.2.9.1.11.0"
]
,
:unit
=>
"dA"
}
}
}
...
...
@@ -29,8 +29,8 @@ site :rennes do |site_uid|
:per_outlets
=>
false
,
:snmp
=>
{
:available
=>
true
,
:total_oid
=>
"iso.3.6.1.4.1.318.1.1.12.1.16.0"
,
:
total_
unit
=>
"W"
:total_oid
s
=>
[
"iso.3.6.1.4.1.318.1.1.12.1.16.0"
]
,
:unit
=>
"W"
}
}
}
...
...
@@ -48,8 +48,8 @@ site :rennes do |site_uid|
:per_outlets
=>
false
,
:snmp
=>
{
:available
=>
true
,
:total_oid
=>
"iso.3.6.1.4.1.318.1.1.12.1.16.0"
,
:
total_
unit
=>
"W"
:total_oid
s
=>
[
"iso.3.6.1.4.1.318.1.1.12.1.16.0"
]
,
:unit
=>
"W"
}
}
}
...
...
generators/input/sites/sophia/pdus.rb
0 → 100644
View file @
6c9ae1e6
generators/input/sites/toulouse/pdus.rb
0 → 100644
View file @
6c9ae1e6
generators/lib/g5k_generator.rb
View file @
6c9ae1e6
...
...
@@ -194,9 +194,9 @@ module G5K
def
node
(
uid
,
*
options
,
&
block
)
build_context
(
:nodes
,
uid
,
*
options
,
&
block
)
end
#
def pdu(uid, *options, &block)
#
build_context(:pdus, uid, *options, &block)
#
end
def
pdu
(
uid
,
*
options
,
&
block
)
build_context
(
:pdus
,
uid
,
*
options
,
&
block
)
end
def
service
(
uid
,
*
options
,
&
block
)
build_context
(
:services
,
uid
,
*
options
,
&
block
)
end
...
...
generators/lib/grid5000/pdu.rb
0 → 100644
View file @
6c9ae1e6
module
Grid5000
class
Pdu
attr_reader
:properties
def
initialize
(
properties
)
@properties
=
properties
end
end
end
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