Update integrationUISP.py

This commit is contained in:
Robert Chacón 2023-04-13 09:03:30 -06:00 committed by GitHub
parent 8f55f4ac4e
commit ec2ed8e4ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,22 +250,23 @@ def findNodesBranchedOffPtMP(siteList, dataLinks, sites):
if ('parent' in site['identification']) and (site['identification']['parent'] is not None): if ('parent' in site['identification']) and (site['identification']['parent'] is not None):
parent = site['identification']['parent']['id'] parent = site['identification']['parent']['id']
for link in dataLinks: for link in dataLinks:
if ('identification' in link['to']['site']) and (link['to']['site']['identification'] is not None): if (link['to']['site'] is not None) and (link['to']['site']['identification'] is not None):
if ('identification' in link['from']['site']) and (link['from']['site']['identification'] is not None): if ('identification' in link['to']['site']) and (link['to']['site']['identification'] is not None):
if link['from']['site']['identification']['id'] == parent: if ('identification' in link['from']['site']) and (link['from']['site']['identification'] is not None):
if link['to']['site']['identification']['id'] == id: if link['from']['site']['identification']['id'] == parent:
if link['from']['device']['overview']['wirelessMode'] == 'ap-ptmp': if link['to']['site']['identification']['id'] == id:
if 'overview' in link['to']['device']: if link['from']['device']['overview']['wirelessMode'] == 'ap-ptmp':
if ('downlinkCapacity' in link['to']['device']['overview']) and ('uplinkCapacity' in link['to']['device']['overview']): if 'overview' in link['to']['device']:
if (link['to']['device']['overview']['downlinkCapacity'] is not None) and (link['to']['device']['overview']['uplinkCapacity'] is not None): if ('downlinkCapacity' in link['to']['device']['overview']) and ('uplinkCapacity' in link['to']['device']['overview']):
# Capacity of the PtMP client radio feeding the PoP will be used as the site bandwidth limit if (link['to']['device']['overview']['downlinkCapacity'] is not None) and (link['to']['device']['overview']['uplinkCapacity'] is not None):
download = int(round(link['to']['device']['overview']['downlinkCapacity']/1000000)) # Capacity of the PtMP client radio feeding the PoP will be used as the site bandwidth limit
upload = int(round(link['to']['device']['overview']['uplinkCapacity']/1000000)) download = int(round(link['to']['device']['overview']['downlinkCapacity']/1000000))
nodeOffPtMP[id] = { 'parent': link['from']['device']['identification']['id'], upload = int(round(link['to']['device']['overview']['uplinkCapacity']/1000000))
'parentName': link['from']['device']['identification']['name'], nodeOffPtMP[id] = { 'parent': link['from']['device']['identification']['id'],
'download': download, 'parentName': link['from']['device']['identification']['name'],
'upload': upload 'download': download,
} 'upload': upload
}
return nodeOffPtMP return nodeOffPtMP
def buildFullGraph(): def buildFullGraph():