Commit 7bcfecfd authored by Pascal Morillon's avatar Pascal Morillon

[rennes] Add PDUs resources

parent 168170bc
......@@ -62,6 +62,18 @@ 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
......
{
"model": "AMz-1623F-16-1",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.17420.1.2.9.1.11.0",
"total_unit": "dA"
}
}
}
],
"type": "pdu",
"uid": "paradent-pdu-1",
"vendor": "Amazing PDU"
}
\ No newline at end of file
{
"model": "AMz-1623F-16-1",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.17420.1.2.9.1.11.0",
"total_unit": "dA"
}
}
}
],
"type": "pdu",
"uid": "paradent-pdu-2",
"vendor": "Amazing PDU"
}
\ No newline at end of file
{
"model": "AMz-1623F-16-1",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.17420.1.2.9.1.11.0",
"total_unit": "dA"
}
}
}
],
"type": "pdu",
"uid": "paradent-pdu-3",
"vendor": "Amazing PDU"
}
\ No newline at end of file
{
"model": "AMz-1623F-16-1",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.17420.1.2.9.1.11.0",
"total_unit": "dA"
}
}
}
],
"type": "pdu",
"uid": "paradent-pdu-4",
"vendor": "Amazing PDU"
}
\ No newline at end of file
{
"model": "AMz-1623F-16-1",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.17420.1.2.9.1.11.0",
"total_unit": "dA"
}
}
}
],
"type": "pdu",
"uid": "paradent-pdu-5",
"vendor": "Amazing PDU"
}
\ No newline at end of file
{
"model": "AMz-1623F-16-1",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.17420.1.2.9.1.11.0",
"total_unit": "dA"
}
}
}
],
"type": "pdu",
"uid": "paradent-pdu-6",
"vendor": "Amazing PDU"
}
\ No newline at end of file
{
"model": "AMz-1623F-16-1",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.17420.1.2.9.1.11.0",
"total_unit": "dA"
}
}
}
],
"type": "pdu",
"uid": "paradent-pdu-7",
"vendor": "Amazing PDU"
}
\ No newline at end of file
{
"model": "AMz-1623F-16-1",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.17420.1.2.9.1.11.0",
"total_unit": "dA"
}
}
}
],
"type": "pdu",
"uid": "paradent-pdu-8",
"vendor": "Amazing PDU"
}
\ No newline at end of file
{
"model": "AP7851",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.318.1.1.12.1.16.0",
"total_unit": "W"
}
}
}
],
"type": "pdu",
"uid": "parapide-pdu-1",
"vendor": "APC"
}
\ No newline at end of file
{
"model": "AP7851",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.318.1.1.12.1.16.0",
"total_unit": "W"
}
}
}
],
"type": "pdu",
"uid": "parapide-pdu-2",
"vendor": "APC"
}
\ No newline at end of file
{
"model": "AP7851",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.318.1.1.12.1.16.0",
"total_unit": "W"
}
}
}
],
"type": "pdu",
"uid": "parapide-pdu-3",
"vendor": "APC"
}
\ No newline at end of file
{
"model": "AP7851",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.318.1.1.12.1.16.0",
"total_unit": "W"
}
}
}
],
"type": "pdu",
"uid": "parapide-pdu-4",
"vendor": "APC"
}
\ No newline at end of file
{
"model": "AP7921",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.318.1.1.12.1.16.0",
"total_unit": "W"
}
}
}
],
"type": "pdu",
"uid": "parapluie-pdu-1",
"vendor": "APC"
}
\ No newline at end of file
{
"model": "AP7921",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.318.1.1.12.1.16.0",
"total_unit": "W"
}
}
}
],
"type": "pdu",
"uid": "parapluie-pdu-2",
"vendor": "APC"
}
\ No newline at end of file
{
"model": "AP7921",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.318.1.1.12.1.16.0",
"total_unit": "W"
}
}
}
],
"type": "pdu",
"uid": "parapluie-pdu-3",
"vendor": "APC"
}
\ No newline at end of file
{
"model": "AP7921",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.318.1.1.12.1.16.0",
"total_unit": "W"
}
}
}
],
"type": "pdu",
"uid": "parapluie-pdu-4",
"vendor": "APC"
}
\ No newline at end of file
{
"model": "AP7921",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.318.1.1.12.1.16.0",
"total_unit": "W"
}
}
}
],
"type": "pdu",
"uid": "parapluie-pdu-5",
"vendor": "APC"
}
\ No newline at end of file
{
"model": "AP7921",
"sensors": [
{
"power": {
"per_outlets": false,
"snmp": {
"available": true,
"total_oid": "iso.3.6.1.4.1.318.1.1.12.1.16.0",
"total_unit": "W"
}
}
}
],
"type": "pdu",
"uid": "parapluie-pdu-6",
"vendor": "APC"
}
\ No newline at end of file
{
"compilation_server": false,
"description": "Grid5000 Rennes site",
"email_contact": "rennes-staff@lists.grid5000.fr",
"kavlan_ip_range": "10.24.0.0/14",
"latitude": 48.1,
"location": "Rennes, France",
"longitude": -1.6667,
"name": "Rennes",
"security_contact": "rennes-staff@lists.grid5000.fr",
"sys_admin_contact": "rennes-staff@lists.grid5000.fr",
"type": "site",
"uid": "rennes",
"user_support_contact": "rennes-staff@lists.grid5000.fr",
"virt_ip_range": "10.156.0.0/14",
"web": "http://www.irisa.fr"
"uid": "rennes"
}
\ No newline at end of file
site :rennes do |site_uid|
8.times do |i|
pdu "paradent-pdu-#{i+1}" do |pdu_uid|
vendor "Amazing PDU"
model "AMz-1623F-16-1"
sensors [
{
:power => {
:per_outlets => false,
:snmp => {
:available => true,
:total_oid => "iso.3.6.1.4.1.17420.1.2.9.1.11.0",
:total_unit => "dA"
}
}
}
]
end
end
4.times do |i|
pdu "parapide-pdu-#{i+1}" do |pdu_uid|
vendor "APC"
model "AP7851"
sensors [
{
:power => {
:per_outlets => false,
:snmp => {
:available => true,
:total_oid => "iso.3.6.1.4.1.318.1.1.12.1.16.0",
:total_unit => "W"
}
}
}
]
end
end
6.times do |i|
pdu "parapluie-pdu-#{i+1}" do |pdu_uid|
vendor "APC"
model "AP7921"
sensors [
{
:power => {
:per_outlets => false,
:snmp => {
:available => true,
:total_oid => "iso.3.6.1.4.1.318.1.1.12.1.16.0",
:total_unit => "W"
}
}
}
]
end
end
end
......@@ -194,6 +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 service(uid, *options, &block)
build_context(:services, uid, *options, &block)
end
......@@ -275,4 +278,4 @@ module G5K
end
end
end
\ No newline at end of file
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