Update integrationUISP.py

This commit is contained in:
Robert Chacón
2023-04-11 16:13:26 -06:00
committed by Herbert Wolverson
parent 00839dfe88
commit f3414257ad

View File

@@ -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']