Allow Suspension UISP Flat Network

This commit is contained in:
Robert Chacón 2024-03-24 11:45:30 -06:00 committed by GitHub
parent 3aa72ee534
commit 086eaf0510
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,7 +45,16 @@ def buildFlatGraph():
if (site['qos']['downloadSpeed']) and (site['qos']['uploadSpeed']):
download = int(round(site['qos']['downloadSpeed']/1000000))
upload = int(round(site['qos']['uploadSpeed']/1000000))
if site['identification'] is not None and site['identification']['suspended'] is not None and site['identification']['suspended'] == True:
if uisp_suspended_strategy() == "ignore":
print("WARNING: Site " + name + " is suspended")
continue
if uisp_suspended_strategy() == "slow":
print("WARNING: Site " + name + " is suspended")
download = 1
upload = 1
if site['identification']['status'] == "disconnected":
print("WARNING: Site " + name + " is disconnected")
node = NetworkNode(id=id, displayName=name, type=NodeType.client, download=download, upload=upload, address=address, customerName=customerName)
net.addRawNode(node)
for device in devices: