From f2e9dc56af3277aebd4e2cc3cee00e2976ff4807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Lindsj=C3=B6?= Date: Sun, 11 Nov 2018 13:46:02 +0100 Subject: [PATCH] Calculate total speed from all interfaces in the connection list from ix-f export When the if_list contains more than one entry, add them together instead of choosing the largest value. --- peeringdb_server/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/peeringdb_server/models.py b/peeringdb_server/models.py index d2450d65..2ca64212 100644 --- a/peeringdb_server/models.py +++ b/peeringdb_server/models.py @@ -1645,8 +1645,7 @@ class IXLan(pdb_models.IXLanBase): speed = 0 for iface in connection.get("if_list", []): - if iface.get("if_speed", 0) > speed: - speed = iface["if_speed"] + speed += iface.get("if_speed", 0) for lan in connection.get("vlan_list", []): ipv4_valid = False