From fc5f2646f6cc7d6194ba4b30e4dff8fad9df7ff1 Mon Sep 17 00:00:00 2001
From: Elodie Bertoncello <elodie.bertoncello@inria.fr>
Date: Thu, 9 Aug 2012 15:24:19 +0200
Subject: [PATCH] [Grenoble] network API - add genepi-6 and correct ib link

---
 .../grenoble/network_equipments/aspen.json    | 403 ++++++++++++++----
 .../network_equipments/ib-grenoble.json       |  10 +-
 .../network_equipments/voltaire-1.json        |  32 ++
 .../network_equipments/voltaire-2.json        |  32 ++
 .../network_equipments/voltaire-3.json        |  32 ++
 .../input/sites/grenoble/net-links/aspen.yaml |  16 +-
 .../sites/grenoble/net-links/ib-grenoble.yaml |   6 +-
 .../sites/grenoble/net-links/voltaire-1.yaml  |  21 +
 .../sites/grenoble/net-links/voltaire-2.yaml  |  21 +
 .../sites/grenoble/net-links/voltaire-3.yaml  |  21 +
 10 files changed, 490 insertions(+), 104 deletions(-)
 create mode 100644 data/grid5000/sites/grenoble/network_equipments/voltaire-1.json
 create mode 100644 data/grid5000/sites/grenoble/network_equipments/voltaire-2.json
 create mode 100644 data/grid5000/sites/grenoble/network_equipments/voltaire-3.json
 create mode 100644 generators/input/sites/grenoble/net-links/voltaire-1.yaml
 create mode 100644 generators/input/sites/grenoble/net-links/voltaire-2.yaml
 create mode 100644 generators/input/sites/grenoble/net-links/voltaire-3.yaml

diff --git a/data/grid5000/sites/grenoble/network_equipments/aspen.json b/data/grid5000/sites/grenoble/network_equipments/aspen.json
index 15a530ae12b..44c7acd60d7 100644
--- a/data/grid5000/sites/grenoble/network_equipments/aspen.json
+++ b/data/grid5000/sites/grenoble/network_equipments/aspen.json
@@ -8,263 +8,478 @@
 
     },
     {
-      "kind": "node",
+
+    },
+    {
+      "kind": "switch",
       "naming_pattern": "%LINECARD%:%PORT%",
       "ports": [
         {
 
         },
         {
-          "uid": "genepi-1"
-        },
-        {
-          "uid": "genepi-2"
+          "port": "0/1",
+          "uid": "blade-2"
         },
         {
-          "uid": "genepi-3"
+          "port": "0/2",
+          "uid": "blade-2"
         },
         {
-          "uid": "genepi-4"
+          "port": "0/3",
+          "uid": "blade-2"
         },
         {
-          "uid": "genepi-5"
+          "port": "0/1",
+          "uid": "blade-1"
         },
         {
-          "uid": "genepi-6"
+          "port": "0/2",
+          "uid": "blade-1"
         },
         {
-          "uid": "genepi-7"
+          "port": "0/3",
+          "uid": "blade-1"
         },
         {
-          "uid": "genepi-8"
+          "port": "0/1",
+          "uid": "blade-3"
         },
         {
-          "uid": "genepi-9"
+          "port": "0/2",
+          "uid": "blade-3"
         },
         {
-          "uid": "genepi-10"
+          "port": "0/3",
+          "uid": "blade-3"
         },
         {
-          "uid": "genepi-11"
+          "port": "0/1",
+          "uid": "blade-4"
         },
         {
-          "uid": "genepi-12"
+          "port": "0/2",
+          "uid": "blade-4"
         },
         {
-          "uid": "genepi-13"
+          "port": "0/3",
+          "uid": "blade-4"
         },
         {
-          "uid": "genepi-14"
+
         },
         {
-          "uid": "genepi-15"
+
         },
         {
-          "uid": "genepi-16"
+
         },
         {
-          "uid": "genepi-17"
+
         },
         {
-          "uid": "genepi-18"
+
         },
         {
-          "uid": "genepi-19"
+
         },
         {
-          "uid": "genepi-20"
+
         },
         {
-          "uid": "genepi-21"
+
         },
         {
-          "uid": "genepi-22"
+
         },
         {
-          "uid": "genepi-23"
+
         },
         {
-          "uid": "genepi-24"
+          "uid": "voltaire-1"
         },
         {
-          "uid": "genepi-25"
+          "uid": "voltaire-2"
         },
         {
-          "uid": "genepi-26"
+
         },
         {
-          "uid": "genepi-27"
+
         },
         {
-          "uid": "genepi-28"
+
         },
         {
-          "uid": "genepi-29"
+
         },
         {
-          "uid": "genepi-30"
+
         },
         {
-          "uid": "genepi-31"
+
         },
         {
-          "uid": "genepi-32"
+
         },
         {
-          "uid": "genepi-33"
+          "kind": "node",
+          "port": "bmc",
+          "uid": "grimage-9"
         },
         {
-          "uid": "genepi-34"
+          "kind": "node",
+          "port": "bmc",
+          "uid": "grimage-10"
         }
       ],
       "rate": 1000000000
     },
     {
-      "kind": "switch",
+      "kind": "node",
       "naming_pattern": "%LINECARD%:%PORT%",
       "ports": [
         {
 
         },
         {
-          "port": "0/1",
-          "uid": "blade-1"
-        },
-        {
-          "port": "0/2",
-          "uid": "blade-1"
-        },
-        {
-          "port": "0/3",
-          "uid": "blade-1"
+          "kind": "other",
+          "port": "eth0",
+          "uid": "digmgt"
         },
         {
-          "port": "0/1",
-          "uid": "blade-2"
+          "kind": "other",
+          "port": "eth1",
+          "uid": "digmgt"
         },
         {
-          "port": "0/2",
-          "uid": "blade-2"
+          "kind": "other",
+          "port": "eth2",
+          "uid": "digmgt"
         },
         {
-          "port": "0/3",
-          "uid": "blade-2"
+          "kind": "other",
+          "port": "eth3",
+          "uid": "digmgt"
         },
         {
-          "port": "0/1",
-          "uid": "blade-3"
+          "port": "eth0",
+          "uid": "grimage-9"
         },
         {
-          "port": "0/2",
-          "uid": "blade-3"
+          "port": "eth1",
+          "uid": "grimage-9"
         },
         {
-          "port": "0/3",
-          "uid": "blade-3"
+          "port": "eth0",
+          "uid": "grimage-10"
         },
         {
-          "port": "0/1",
-          "uid": "blade-4"
+          "port": "eth1",
+          "uid": "grimage-10"
         },
         {
-          "port": "0/2",
-          "uid": "blade-4"
+          "kind": "other",
+          "port": "eth0",
+          "uid": "dignfs"
         },
         {
-          "port": "0/3",
-          "uid": "blade-4"
-        }
-      ],
-      "rate": 1000000000
-    },
-    {
-      "kind": "node",
-      "naming_pattern": "%LINECARD%:%PORT%",
-      "ports": [
-        {
-
+          "kind": "switch",
+          "uid": "fastiron-switch-ipmi"
         },
         {
+          "port": "eth0",
           "uid": "adonis-1"
         },
         {
+          "port": "eth0",
           "uid": "adonis-2"
         },
         {
+          "port": "eth0",
           "uid": "adonis-3"
         },
         {
+          "port": "eth0",
           "uid": "adonis-4"
         },
         {
+          "port": "eth0",
           "uid": "adonis-5"
         },
         {
+          "port": "eth0",
           "uid": "adonis-6"
         },
         {
+          "port": "eth0",
           "uid": "adonis-7"
         },
         {
+          "port": "eth0",
           "uid": "adonis-8"
         },
         {
+          "port": "eth0",
           "uid": "adonis-9"
         },
         {
+          "port": "eth0",
           "uid": "adonis-10"
+        },
+        {
+          "kind": "switch",
+          "uid": "voltaire-3"
+        },
+        {
+
+        },
+        {
+
+        },
+        {
+
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-16"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-34"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-18"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-30"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-14"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-24"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-20"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-22"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-28"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-32"
+        },
+        {
+
+        },
+        {
+
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-10"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-12"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-8"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-4"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-6"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-2"
         }
       ],
       "rate": 1000000000
     },
     {
-      "kind": "other",
+      "kind": "node",
       "naming_pattern": "%LINECARD%:%PORT%",
       "ports": [
         {
 
         },
         {
-          "port": "eth0",
-          "uid": "digmgt"
+          "kind": "switch",
+          "uid": "summit-grimage"
+        },
+        {
+
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-29"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-27"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-33"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-17"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-15"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-26"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-11"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-21"
+        },
+        {
+
+        },
+        {
+
         },
         {
+          "port": "eth1",
+          "uid": "genepi-31"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-23"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-25"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-19"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-13"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-9"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-5"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-7"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-3"
+        },
+        {
+          "port": "eth1",
+          "uid": "genepi-1"
+        },
+        {
+          "kind": "other",
           "port": "eth4",
           "uid": "digmgt"
         },
         {
-          "port": "eth5",
-          "rate": 100000000,
-          "uid": "digmgt"
+          "kind": "other",
+          "port": "eth0",
+          "uid": "alpes"
         },
         {
-          "port": "bmc",
-          "uid": "digmgt"
+          "port": "eth0",
+          "uid": "grimage-1"
         },
         {
-          "port": "eth1",
-          "rate": 100000000,
-          "uid": "dignfs"
+          "port": "eth0",
+          "uid": "grimage-2"
         },
         {
           "port": "eth0",
-          "uid": "dignfs"
+          "uid": "grimage-3"
         },
         {
-          "port": "bmc",
-          "uid": "dignfs"
+          "port": "eth0",
+          "uid": "grimage-4"
         },
         {
           "port": "eth0",
-          "uid": "alpes"
+          "uid": "grimage-5"
         },
         {
-          "port": "bmc",
-          "uid": "alpes"
+          "port": "eth0",
+          "uid": "grimage-6"
+        },
+        {
+          "port": "eth0",
+          "uid": "grimage-7"
+        },
+        {
+          "port": "eth0",
+          "uid": "grimage-8"
+        }
+      ],
+      "rate": 1000000000
+    },
+    {
+
+    },
+    {
+
+    },
+    {
+
+    },
+    {
+
+    },
+    {
+
+    },
+    {
+      "kind": "other",
+      "naming_pattern": "%LINECARD%:%PORT%",
+      "ports": [
+        {
+
+        },
+        {
+          "port": "eth2",
+          "rate": 10000000000,
+          "uid": "dignfs"
         },
         {
           "kind": "switch",
-          "uid": "ib-grenoble"
+          "uid": "summit-idpot"
         }
       ],
       "rate": 1000000000
diff --git a/data/grid5000/sites/grenoble/network_equipments/ib-grenoble.json b/data/grid5000/sites/grenoble/network_equipments/ib-grenoble.json
index 693c57067a1..1cda658d5c6 100644
--- a/data/grid5000/sites/grenoble/network_equipments/ib-grenoble.json
+++ b/data/grid5000/sites/grenoble/network_equipments/ib-grenoble.json
@@ -5,11 +5,17 @@
   "kind": "switch",
   "linecards": [
     {
-      "kind": "router",
+      "kind": "switch",
       "naming_pattern": "%LINECARD%/%PORT%",
       "ports": [
         {
-          "uid": "aspen"
+          "uid": "voltaire-1"
+        },
+        {
+          "uid": "voltaire-2"
+        },
+        {
+          "uid": "voltaire-3"
         }
       ],
       "rate": 10000000000
diff --git a/data/grid5000/sites/grenoble/network_equipments/voltaire-1.json b/data/grid5000/sites/grenoble/network_equipments/voltaire-1.json
new file mode 100644
index 00000000000..6ab697859dc
--- /dev/null
+++ b/data/grid5000/sites/grenoble/network_equipments/voltaire-1.json
@@ -0,0 +1,32 @@
+{
+  "channels": {
+    "naming_pattern": "Po%CHANNELID%"
+  },
+  "kind": "switch",
+  "linecards": [
+    {
+      "kind": "switch",
+      "naming_pattern": "%LINECARD%/%PORT%",
+      "ports": [
+        {
+          "uid": "ib-grenoble"
+        }
+      ],
+      "rate": 10000000000
+    }
+  ],
+  "model": "Infiniband",
+  "routes": {
+
+  },
+  "site": "grenoble",
+  "snmp_community": "public",
+  "type": "network_equipment",
+  "uid": "voltaire-1",
+  "vlans": {
+    "naming_pattern": "Vlan%VLANID%"
+  },
+  "weathermap": {
+    "use_cacti": "no"
+  }
+}
\ No newline at end of file
diff --git a/data/grid5000/sites/grenoble/network_equipments/voltaire-2.json b/data/grid5000/sites/grenoble/network_equipments/voltaire-2.json
new file mode 100644
index 00000000000..72c56caa72b
--- /dev/null
+++ b/data/grid5000/sites/grenoble/network_equipments/voltaire-2.json
@@ -0,0 +1,32 @@
+{
+  "channels": {
+    "naming_pattern": "Po%CHANNELID%"
+  },
+  "kind": "switch",
+  "linecards": [
+    {
+      "kind": "switch",
+      "naming_pattern": "%LINECARD%/%PORT%",
+      "ports": [
+        {
+          "uid": "ib-grenoble"
+        }
+      ],
+      "rate": 10000000000
+    }
+  ],
+  "model": "Infiniband",
+  "routes": {
+
+  },
+  "site": "grenoble",
+  "snmp_community": "public",
+  "type": "network_equipment",
+  "uid": "voltaire-2",
+  "vlans": {
+    "naming_pattern": "Vlan%VLANID%"
+  },
+  "weathermap": {
+    "use_cacti": "no"
+  }
+}
\ No newline at end of file
diff --git a/data/grid5000/sites/grenoble/network_equipments/voltaire-3.json b/data/grid5000/sites/grenoble/network_equipments/voltaire-3.json
new file mode 100644
index 00000000000..fdc83f08681
--- /dev/null
+++ b/data/grid5000/sites/grenoble/network_equipments/voltaire-3.json
@@ -0,0 +1,32 @@
+{
+  "channels": {
+    "naming_pattern": "Po%CHANNELID%"
+  },
+  "kind": "switch",
+  "linecards": [
+    {
+      "kind": "switch",
+      "naming_pattern": "%LINECARD%/%PORT%",
+      "ports": [
+        {
+          "uid": "ib-grenoble"
+        }
+      ],
+      "rate": 10000000000
+    }
+  ],
+  "model": "Infiniband",
+  "routes": {
+
+  },
+  "site": "grenoble",
+  "snmp_community": "public",
+  "type": "network_equipment",
+  "uid": "voltaire-3",
+  "vlans": {
+    "naming_pattern": "Vlan%VLANID%"
+  },
+  "weathermap": {
+    "use_cacti": "no"
+  }
+}
\ No newline at end of file
diff --git a/generators/input/sites/grenoble/net-links/aspen.yaml b/generators/input/sites/grenoble/net-links/aspen.yaml
index 366a58b5443..5235f307232 100644
--- a/generators/input/sites/grenoble/net-links/aspen.yaml
+++ b/generators/input/sites/grenoble/net-links/aspen.yaml
@@ -74,19 +74,19 @@ aspen:
         1:
           uid: digmgt
           port: eth0
-          kin: other
+          kind: other
         2:
           uid: digmgt
           port: eth1
-          kin: other
+          kind: other
         3:
           uid: digmgt
           port: eth2
-          kin: other
+          kind: other
         4:
           uid: digmgt
           port: eth3
-          kin: other
+          kind: other
         5:
           uid: grimage-9
           port: eth0
@@ -101,6 +101,7 @@ aspen:
           port: eth1
         9:
           uid: dignfs
+          kind: other
           port: eth0
         10:
           uid: fastiron-switch-ipmi
@@ -180,6 +181,9 @@ aspen:
         40:
           uid: genepi-4
           port: eth1
+        41:
+          uid: genepi-6
+          port: eth1
         42:
           uid: genepi-2
           port: eth1
@@ -248,11 +252,11 @@ aspen:
         23:
           uid: digmgt
           port: eth4
-          kin: other
+          kind: other
         24: 
           uid: alpes
           port: eth0
-          kin: other
+          kind: other
         25: 
           uid: grimage-1
           port: eth0
diff --git a/generators/input/sites/grenoble/net-links/ib-grenoble.yaml b/generators/input/sites/grenoble/net-links/ib-grenoble.yaml
index 81348e9cc8e..76a57a64d3d 100644
--- a/generators/input/sites/grenoble/net-links/ib-grenoble.yaml
+++ b/generators/input/sites/grenoble/net-links/ib-grenoble.yaml
@@ -13,9 +13,11 @@ ib-grenoble:
   linecards: 
     0: 
       naming_pattern: "%LINECARD%/%PORT%"
-      kind: router
+      kind: switch
       rate: 10000000000
       ports: 
-        0: aspen
+        0: voltaire-1
+        1: voltaire-2
+        2: voltaire-3
   channels: 
     naming_pattern: Po%CHANNELID%
diff --git a/generators/input/sites/grenoble/net-links/voltaire-1.yaml b/generators/input/sites/grenoble/net-links/voltaire-1.yaml
new file mode 100644
index 00000000000..74c3d19eb8e
--- /dev/null
+++ b/generators/input/sites/grenoble/net-links/voltaire-1.yaml
@@ -0,0 +1,21 @@
+--- 
+voltaire-1: 
+  model: Infiniband
+  kind: switch
+  site: grenoble
+  snmp_community: public
+  weathermap: 
+    use_cacti: "no"
+  vlans: 
+    naming_pattern: Vlan%VLANID%
+  routes: {}
+
+  linecards: 
+    0: 
+      naming_pattern: "%LINECARD%/%PORT%"
+      kind: switch
+      rate: 10000000000
+      ports: 
+        0: ib-grenoble 
+  channels: 
+    naming_pattern: Po%CHANNELID%
diff --git a/generators/input/sites/grenoble/net-links/voltaire-2.yaml b/generators/input/sites/grenoble/net-links/voltaire-2.yaml
new file mode 100644
index 00000000000..d3886cf2947
--- /dev/null
+++ b/generators/input/sites/grenoble/net-links/voltaire-2.yaml
@@ -0,0 +1,21 @@
+---
+voltaire-2: 
+  model: Infiniband
+  kind: switch
+  site: grenoble
+  snmp_community: public
+  weathermap: 
+    use_cacti: "no"
+  vlans: 
+    naming_pattern: Vlan%VLANID%
+  routes: {}
+
+  linecards: 
+    0: 
+      naming_pattern: "%LINECARD%/%PORT%"
+      kind: switch
+      rate: 10000000000
+      ports: 
+        0: ib-grenoble
+  channels: 
+    naming_pattern: Po%CHANNELID%
diff --git a/generators/input/sites/grenoble/net-links/voltaire-3.yaml b/generators/input/sites/grenoble/net-links/voltaire-3.yaml
new file mode 100644
index 00000000000..065512936b1
--- /dev/null
+++ b/generators/input/sites/grenoble/net-links/voltaire-3.yaml
@@ -0,0 +1,21 @@
+--- 
+voltaire-3: 
+  model: Infiniband
+  kind: switch
+  site: grenoble
+  snmp_community: public
+  weathermap: 
+    use_cacti: "no"
+  vlans: 
+    naming_pattern: Vlan%VLANID%
+  routes: {}
+
+  linecards: 
+    0: 
+      naming_pattern: "%LINECARD%/%PORT%"
+      kind: switch
+      rate: 10000000000
+      ports: 
+        0: ib-grenoble
+  channels: 
+    naming_pattern: Po%CHANNELID%
-- 
GitLab