mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Update integrationUISP.py
This commit is contained in:
parent
27c5ce59bf
commit
b00f99beec
@ -273,6 +273,20 @@ def buildFullGraph():
|
|||||||
# p = findInSiteListById(siteList, s['parent'])['name']
|
# p = findInSiteListById(siteList, s['parent'])['name']
|
||||||
# print(s['name'] + " (" + str(s['cost']) + ") <-- " + p)
|
# print(s['name'] + " (" + str(s['cost']) + ") <-- " + p)
|
||||||
|
|
||||||
|
# Find Nodes Connected By PtMP
|
||||||
|
nodeOffPtMP = {}
|
||||||
|
for site in sites:
|
||||||
|
id = site['identification']['id']
|
||||||
|
name = site['identification']['name']
|
||||||
|
type = site['identification']['type']
|
||||||
|
parent = findInSiteListById(siteList, id)['parent']
|
||||||
|
if type == 'site':
|
||||||
|
for link in dataLinks:
|
||||||
|
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']
|
||||||
|
|
||||||
print("Building Topology")
|
print("Building Topology")
|
||||||
net = NetworkGraph()
|
net = NetworkGraph()
|
||||||
# Add all sites and client sites
|
# Add all sites and client sites
|
||||||
@ -293,6 +307,8 @@ def buildFullGraph():
|
|||||||
match type:
|
match type:
|
||||||
case "site":
|
case "site":
|
||||||
nodeType = NodeType.site
|
nodeType = NodeType.site
|
||||||
|
if id in nodeOffPtMP:
|
||||||
|
parent = nodeOffPtMP[id]
|
||||||
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"]
|
||||||
|
Loading…
Reference in New Issue
Block a user