Update integrationUISP.py

This commit is contained in:
Robert Chacón 2023-04-14 16:02:21 -06:00 committed by GitHub
parent 5c5f9ee1e5
commit 9657796270
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -370,8 +370,6 @@ def buildFullGraph():
match type:
case "site":
nodeType = NodeType.site
if id in nodeOffPtMP:
parent = nodeOffPtMP[id]['parent']
if name in siteBandwidth:
# Use the CSV bandwidth values
download = siteBandwidth[name]["download"]
@ -381,13 +379,13 @@ def buildFullGraph():
if id in foundAirFibersBySite:
download = foundAirFibersBySite[id]['download']
upload = foundAirFibersBySite[id]['upload']
#print('Site ' + name + ' will use bandwidth from foundAirFibersBySite.')
# Use limits from nodeOffPtMP only if they're greater than what is already set
if id in nodeOffPtMP:
if (nodeOffPtMP[id]['download'] >= download) or (nodeOffPtMP[id]['upload'] >= upload):
download = nodeOffPtMP[id]['download']
upload = nodeOffPtMP[id]['upload']
#print('Site ' + name + ' will use bandwidth from nodeOffPtMP.')
# If no airFibers were found, and node originates off PtMP, treat as child node of that PtMP AP
else:
if id in nodeOffPtMP:
if (nodeOffPtMP[id]['download'] >= download) or (nodeOffPtMP[id]['upload'] >= upload):
download = nodeOffPtMP[id]['download']
upload = nodeOffPtMP[id]['upload']
siteBandwidth[name] = {
"download": download, "upload": upload}
case default: