Update integrationUISP.py

This commit is contained in:
Robert Chacón 2023-04-15 09:42:03 -06:00 committed by GitHub
parent eced3e2ac5
commit 3d6d32c300
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,10 +159,10 @@ def findAirfibers(devices, generatedPNDownloadMbps, generatedPNUploadMbps):
if device['overview']['downlinkCapacity'] is not None and device['overview']['uplinkCapacity'] is not None:
download = int(device['overview']['downlinkCapacity']/ 1000000)
upload = int(device['overview']['uplinkCapacity']/ 1000000)
# Make sure to use half of reported bandwidth for AF60/AF60-LRs
#if (device['identification']['model'] == "AF60-LR") or (device['identification']['model'] == "AF60"):
# download = int(download / 2)
# upload = int(download / 2)
# Make sure to factor in gigabit port for AF60/AF60-LRs
if (device['identification']['model'] == "AF60-LR") or (device['identification']['model'] == "AF60"):
download = min(download,950)
upload = min(upload,950)
if device['identification']['site']['id'] in foundAirFibersBySite:
if (download > foundAirFibersBySite[device['identification']['site']['id']]['download']) or (upload > foundAirFibersBySite[device['identification']['site']['id']]['upload']):
foundAirFibersBySite[device['identification']['site']['id']]['download'] = download