From f3bcf614754779e230e375233c83ab5defc1c185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Tue, 11 Apr 2023 16:13:26 -0600 Subject: [PATCH] Update integrationUISP.py --- src/integrationUISP.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/integrationUISP.py b/src/integrationUISP.py index dce7eda7..543ce734 100644 --- a/src/integrationUISP.py +++ b/src/integrationUISP.py @@ -285,8 +285,13 @@ def buildFullGraph(): if link['from']['site']['identification']['id'] == parent: if link['to']['site']['identification']['id'] == id: if link['from']['device']['overview']['wirelessMode'] == 'ap-ptmp': - nodeOffPtMP[id] = link['from']['device']['identification']['id'] - + # Capacity of the PtMP client radio feeding the PoP will be used as the site bandwidth limit + download = int(round(link['to']['device']['overview']['downlinkCapacity']/1000000)) + upload = int(round(link['to']['device']['overview']['uplinkCapacity']/1000000)) + nodeOffPtMP[id] = { 'parent': link['from']['device']['identification']['id'], + 'download': download, + 'upload': upload + } print("Building Topology") net = NetworkGraph() # Add all sites and client sites @@ -308,11 +313,14 @@ def buildFullGraph(): case "site": nodeType = NodeType.site if id in nodeOffPtMP: - parent = nodeOffPtMP[id] + parent = nodeOffPtMP[id]['parent'] if name in siteBandwidth: # Use the CSV bandwidth values download = siteBandwidth[name]["download"] upload = siteBandwidth[name]["upload"] + elif id in nodeOffPtMP: + download = nodeOffPtMP[id]['download'] + upload = nodeOffPtMP[id]['upload'] elif id in foundAirFibersBySite: download = foundAirFibersBySite[id]['download'] upload = foundAirFibersBySite[id]['upload']