From dbb260a5d17ec851997f8c6652175ced850bd4a9 Mon Sep 17 00:00:00 2001
From: Emile Morel <emile.morel@inria.fr>
Date: Wed, 23 Apr 2014 15:13:15 +0200
Subject: [PATCH] [nancy] add switch for graphite on graphite.rb

---
 .../sites/nancy/clusters/graphite/nodes/graphite-1.json       | 4 ++++
 .../sites/nancy/clusters/graphite/nodes/graphite-2.json       | 4 ++++
 .../sites/nancy/clusters/graphite/nodes/graphite-3.json       | 4 ++++
 .../sites/nancy/clusters/graphite/nodes/graphite-4.json       | 4 ++++
 generators/input/sites/nancy/clusters/graphite.rb             | 4 ++++
 5 files changed, 20 insertions(+)

diff --git a/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-1.json b/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-1.json
index d2974234036..73b002b97a7 100644
--- a/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-1.json
+++ b/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-1.json
@@ -71,6 +71,8 @@
       "mountable": true,
       "mounted": false,
       "rate": null,
+      "switch": "sgraphene4",
+      "switch_port": 47,
       "vendor": "intel",
       "version": "I350"
     },
@@ -85,6 +87,8 @@
       "mountable": true,
       "mounted": false,
       "rate": null,
+      "switch": "sgraphene4",
+      "switch_port": 48,
       "vendor": "intel",
       "version": "I350"
     },
diff --git a/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-2.json b/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-2.json
index 8ab373037e9..cf7ee70a7fc 100644
--- a/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-2.json
+++ b/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-2.json
@@ -71,6 +71,8 @@
       "mountable": true,
       "mounted": false,
       "rate": null,
+      "switch": "sgraphene4",
+      "switch_port": 45,
       "vendor": "intel",
       "version": "I350"
     },
@@ -85,6 +87,8 @@
       "mountable": true,
       "mounted": false,
       "rate": null,
+      "switch": "sgraphene4",
+      "switch_port": 46,
       "vendor": "intel",
       "version": "I350"
     },
diff --git a/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-3.json b/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-3.json
index 0c4784d92f9..3e907a4c769 100644
--- a/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-3.json
+++ b/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-3.json
@@ -71,6 +71,8 @@
       "mountable": true,
       "mounted": false,
       "rate": null,
+      "switch": "sgraphene4",
+      "switch_port": 43,
       "vendor": "intel",
       "version": "I350"
     },
@@ -85,6 +87,8 @@
       "mountable": true,
       "mounted": false,
       "rate": null,
+      "switch": "sgraphene4",
+      "switch_port": 44,
       "vendor": "intel",
       "version": "I350"
     },
diff --git a/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-4.json b/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-4.json
index 98419b95174..a6566a5f1df 100644
--- a/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-4.json
+++ b/data/grid5000/sites/nancy/clusters/graphite/nodes/graphite-4.json
@@ -71,6 +71,8 @@
       "mountable": true,
       "mounted": false,
       "rate": null,
+      "switch": "sgraphene4",
+      "switch_port": 41,
       "vendor": "intel",
       "version": "I350"
     },
@@ -85,6 +87,8 @@
       "mountable": true,
       "mounted": false,
       "rate": null,
+      "switch": "sgraphene4",
+      "switch_port": 42,
       "vendor": "intel",
       "version": "I350"
     },
diff --git a/generators/input/sites/nancy/clusters/graphite.rb b/generators/input/sites/nancy/clusters/graphite.rb
index 73c22f816d9..0d449c52845 100644
--- a/generators/input/sites/nancy/clusters/graphite.rb
+++ b/generators/input/sites/nancy/clusters/graphite.rb
@@ -114,6 +114,8 @@ site :nancy do |site_uid|
           :device           => "eth2",
           :vendor           => "intel",
           :version          => "I350",
+          :switch           => lookup('graphite_manual', node_uid, 'network_interfaces', 'eth2', 'switch_name'),
+          :switch_port      => lookup('graphite_manual', node_uid, 'network_interfaces', 'eth2', 'switch_port'),
           :driver           => lookup('graphite_generated', node_uid, 'network_interfaces', 'eth2', 'driver'),
           :mac              => lookup('graphite_generated', node_uid, 'network_interfaces', 'eth2', 'mac')
         },
@@ -128,6 +130,8 @@ site :nancy do |site_uid|
           :device           => "eth3",
           :vendor           => "intel",
           :version          => "I350",
+          :switch           => lookup('graphite_manual', node_uid, 'network_interfaces', 'eth3', 'switch_name'),
+          :switch_port      => lookup('graphite_manual', node_uid, 'network_interfaces', 'eth3', 'switch_port'),
           :driver           => lookup('graphite_generated', node_uid, 'network_interfaces', 'eth3', 'driver'),
           :mac              => lookup('graphite_generated', node_uid, 'network_interfaces', 'eth3', 'mac')
         },
-- 
GitLab