Update integrationUISP.py

This commit is contained in:
Robert Chacón 2023-04-11 16:13:26 -06:00 committed by GitHub
parent b00f99beec
commit f3bcf61475
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,8 +285,13 @@ def buildFullGraph():
if link['from']['site']['identification']['id'] == parent: if link['from']['site']['identification']['id'] == parent:
if link['to']['site']['identification']['id'] == id: if link['to']['site']['identification']['id'] == id:
if link['from']['device']['overview']['wirelessMode'] == 'ap-ptmp': 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") print("Building Topology")
net = NetworkGraph() net = NetworkGraph()
# Add all sites and client sites # Add all sites and client sites
@ -308,11 +313,14 @@ def buildFullGraph():
case "site": case "site":
nodeType = NodeType.site nodeType = NodeType.site
if id in nodeOffPtMP: if id in nodeOffPtMP:
parent = nodeOffPtMP[id] parent = nodeOffPtMP[id]['parent']
if name in siteBandwidth: if name in siteBandwidth:
# Use the CSV bandwidth values # Use the CSV bandwidth values
download = siteBandwidth[name]["download"] download = siteBandwidth[name]["download"]
upload = siteBandwidth[name]["upload"] upload = siteBandwidth[name]["upload"]
elif id in nodeOffPtMP:
download = nodeOffPtMP[id]['download']
upload = nodeOffPtMP[id]['upload']
elif id in foundAirFibersBySite: elif id in foundAirFibersBySite:
download = foundAirFibersBySite[id]['download'] download = foundAirFibersBySite[id]['download']
upload = foundAirFibersBySite[id]['upload'] upload = foundAirFibersBySite[id]['upload']