From a327675714b5f8bf5bca0171c2b862489466232a Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Tue, 8 Jun 2021 10:42:04 +0200
Subject: [PATCH] new format - candidate

---
 test/data/gws-direct.json | 282 +++++++++++++++++++++++++-------------
 1 file changed, 186 insertions(+), 96 deletions(-)

diff --git a/test/data/gws-direct.json b/test/data/gws-direct.json
index 87d4449b..bd69c0cc 100644
--- a/test/data/gws-direct.json
+++ b/test/data/gws-direct.json
@@ -2,162 +2,252 @@
   {
     "nren": "ARNES",
     "isp": "Cogent",
-    "counters": {
-      "discards_in": [
-        {"hostname": "88.200.0.63", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.2.2.1.13.533"}
-      ],
-      "discards_out": [
-        {"hostname": "88.200.0.63", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.2.2.1.19.533"}
-      ],
-      "errors_in": [
-        {"hostname": "88.200.0.63", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.2.2.1.14.533"}
-      ],
-      "errors_out": [
-        {"hostname": "88.200.0.63", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.2.2.1.20.533"}
-      ],
-      "traffic_in": [
-        {"hostname": "88.200.0.63", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.31.1.1.1.6.531"},
-        {"hostname": "88.200.0.63", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.31.1.1.1.6.525"},
-        {"hostname": "88.200.0.63", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.31.1.1.1.6.553"},
-        {"hostname": "88.200.0.63", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.31.1.1.1.6.563"}
-      ],
-      "traffic_out": [
-        {"hostname": "88.200.0.63", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.31.1.1.1.10.531"},
-        {"hostname": "88.200.0.63", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.31.1.1.1.10.525"},
-        {"hostname": "88.200.0.63", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.31.1.1.1.10.553"},
-        {"hostname": "88.200.0.63", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.31.1.1.1.10.563"}
+    "hosts": {
+      "hostname": "88.200.0.63",
+      "community": "gn2nocT3st",
+      "interfaces": [
+        {
+          "tag": "a",
+          "counters": [
+            {"discards_in": "1.3.6.1.2.1.2.2.1.13.533"},
+            {"discards_out": "1.3.6.1.2.1.2.2.1.19.533"},
+            {"errors_in": "1.3.6.1.2.1.2.2.1.14.533"},
+            {"errors_out": "1.3.6.1.2.1.2.2.1.20.533"}
+          ]
+        },
+        {
+          "tag": "b",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.531"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.531"}
+          ]
+        },
+        {
+          "tag": "c",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.525"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.525"}
+          ]
+        },
+        {
+          "tag": "d",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.553"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.553"}
+          ]
+        },
+        {
+          "tag": "e",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.563"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.563"}
+          ]
+        }
       ]
     }
   },
   {
     "nren": "ARNES",
     "isp": "Telia",
-    "counters": {
-      "traffic_in": [
-        {"hostname": "62.40.124.6", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.31.1.1.1.6.611"},
-        {"hostname": "62.40.124.6", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.31.1.1.1.6.589"}
-      ],
-      "traffic_out": [
-        {"hostname": "62.40.124.6", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.31.1.1.1.10.611"},
-        {"hostname": "62.40.124.6", "community": "gn2nocT3st", "oid": "1.3.6.1.2.1.31.1.1.1.10.589"}
+    "hosts": {
+      "hostname": "62.40.124.6",
+      "community": "gn2nocT3st",
+      "interfaces": [
+        {
+          "tag": "a",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.611"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.611"}
+          ]
+        },
+        {
+          "tag": "b",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.589"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.589"}
+          ]
+        }
       ]
     }
   },
   {
     "nren": "CARNET",
     "isp": "Cogent",
-    "counters": {
-      "traffic_in": [
-        {"hostname": "62.40.124.10", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.6.35"}
-      ],
-      "traffic_out": [
-        {"hostname": "62.40.124.10", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.10.35"}
+    "hosts": {
+      "hostname": "62.40.124.10",
+      "community": "atlas1453",
+      "interfaces": [
+        {
+          "tag": "a",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.35"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.35"}
+          ]
+        }
       ]
     }
   },
   {
     "nren": "CARNET",
     "isp": "Telia",
-    "counters": {
-      "traffic_in": [
-        {"hostname": "62.40.125.150", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.6.48"}
-      ],
-      "traffic_out": [
-        {"hostname": "62.40.125.150", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.10.48"}
+    "hosts": {
+      "hostname": "62.40.125.150",
+      "community": "atlas1453",
+      "interfaces": [
+        {
+          "tag": "a",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.48"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.48"}
+          ]
+        }
       ]
     }
   },
   {
     "nren": "KIFU",
     "isp": "Cogent",
-    "counters": {
-      "traffic_in": [
-        {"hostname": "195.111.97.108", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.6.155"}
-      ],
-      "traffic_out": [
-        {"hostname": "195.111.97.108", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.10.155"}
+    "hosts": {
+      "hostname": "195.111.97.108",
+      "community": "atlas1453",
+      "interfaces": [
+        {
+          "tag": "a",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.155"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.155"}
+          ]
+        }
       ]
     }
   },
   {
     "nren": "KIFU",
     "isp": "Telia",
-    "counters": {
-      "traffic_in": [
-        {"hostname": "195.111.97.108", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.6.148"}
-      ],
-      "traffic_out": [
-        {"hostname": "195.111.97.108", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.10.148"}
+    "hosts": {
+      "hostname": "195.111.97.108",
+      "community": "atlas1453",
+      "interfaces": [
+        {
+          "tag": "a",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.148"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.148"}
+          ]
+        }
       ]
     }
   },
   {
     "nren": "RedIRIS",
     "isp": "Telia",
-    "counters": {
-      "traffic_in": [
-        {"hostname": "130.206.206.250", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.6.1487"},
-        {"hostname": "130.206.206.250", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.6.1488"},
-        {"hostname": "130.206.206.250", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.6.1489"},
-        {"hostname": "130.206.206.250", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.6.760"},
-        {"hostname": "130.206.206.250", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.6.796"}
-      ],
-      "traffic_out": [
-        {"hostname": "130.206.206.250", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.10.1487"},
-        {"hostname": "130.206.206.250", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.10.1488"},
-        {"hostname": "130.206.206.250", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.10.1489"},
-        {"hostname": "130.206.206.250", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.10.760"},
-        {"hostname": "130.206.206.250", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.10.796"}
+    "hosts": {
+      "hostname": "130.206.206.250",
+      "community": "atlas1453",
+      "interfaces": [
+        {
+          "tag": "a",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.1487"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.1487"}
+          ]
+        },
+        {
+          "tag": "b",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.1488"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.1488"}
+          ]
+        },
+        {
+          "tag": "c",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.1489"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.1489"}
+          ]
+        },
+        {
+          "tag": "d",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.760"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.760"}
+          ]
+        },
+        {
+          "tag": "e",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.796"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.796"}
+          ]
+        }
       ]
     }
   },
   {
     "nren": "RoEduNet",
     "isp": "Cogent",
-    "counters": {
-      "traffic_in": [
-        {"hostname": "149.6.50.10", "community": "dante", "oid": "1.3.6.1.2.1.31.1.1.1.6.531"}
-      ],
-      "traffic_out": [
-        {"hostname": "149.6.50.10", "community": "dante", "oid": "1.3.6.1.2.1.31.1.1.1.10.531"}
+    "hosts": {
+      "hostname": "149.6.50.10",
+      "community": "dante",
+      "interfaces": [
+        {
+          "tag": "a",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.531"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.531"}
+          ]
+        }
       ]
     }
   },
   {
     "nren": "RoEduNet",
     "isp": "Century Link",
-    "counters": {
-      "traffic_in": [
-        {"hostname": "212.162.45.194", "community": "dante", "oid": "1.3.6.1.2.1.31.1.1.1.6.9"}
-      ],
-      "traffic_out": [
-        {"hostname": "212.162.45.194", "community": "dante", "oid": "1.3.6.1.2.1.31.1.1.1.10.9"}
+    "hosts": {
+      "hostname": "212.162.45.194",
+      "community": "dante",
+      "interfaces": [
+        {
+          "tag": "a",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.9"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.9"}
+          ]
+        }
       ]
     }
   },
   {
     "nren": "EENet",
     "isp": "Telia",
-    "counters": {
-      "traffic_in": [
-        {"hostname": "193.40.133.2", "community": "geant-mon-telia", "oid": "1.3.6.1.2.1.31.1.1.1.6.263"}
-      ],
-      "traffic_out": [
-        {"hostname": "193.40.133.2", "community": "geant-mon-telia", "oid": "1.3.6.1.2.1.31.1.1.1.10.263"}
+    "hosts": {
+      "hostname": "193.40.133.2",
+      "community": "geant-mon-telia",
+      "interfaces": [
+        {
+          "tag": "a",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.263"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.263"}
+          ]
+        }
       ]
     }
   },
   {
     "nren": "PSNC",
     "isp": "Century Link",
-    "counters": {
-      "traffic_in": [
-        {"hostname": "212.191.126.6", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.6.675"},
-        {"hostname": "212.191.126.7", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.6.677"}
-      ],
-      "traffic_out": [
-        {"hostname": "212.191.126.6", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.10.675"},
-        {"hostname": "212.191.126.7", "community": "atlas1453", "oid": "1.3.6.1.2.1.31.1.1.1.10.677"}
+    "hosts": {
+      "hostname": "212.191.126.7",
+      "community": "atlas1453",
+      "interfaces": [
+        {
+          "tag": "a",
+          "counters": [
+            {"traffic_in": "1.3.6.1.2.1.31.1.1.1.6.677"},
+            {"traffic_out": "1.3.6.1.2.1.31.1.1.1.10.677"}
+          ]
+        }
       ]
     }
   }
-- 
GitLab