Commit 6c9ae1e6 authored by Pascal Morillon's avatar Pascal Morillon
Browse files

[admin] Update PDUs managemnt

parent 7a58ba31
......@@ -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
......
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
......@@ -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_oids => ["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_oids => ["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_oids => ["iso.3.6.1.4.1.318.1.1.12.1.16.0"],
:unit => "W"
}
}
}
......
......@@ -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
......
module Grid5000
class Pdu
attr_reader :properties
def initialize(properties)
@properties = properties
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment