mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Fix UISP Integration Bug - only use PtMP as parent if one link connects that site
This commit is contained in:
parent
0c8f40cdbd
commit
513f6eec89
@ -336,6 +336,16 @@ def findNodesBranchedOffPtMP(siteList, dataLinks, sites, rootSite, foundAirFiber
|
|||||||
if isTrueSite:
|
if isTrueSite:
|
||||||
if site['parent'] is not None:
|
if site['parent'] is not None:
|
||||||
parent = site['parent']
|
parent = site['parent']
|
||||||
|
# Check how many links connect site to parent
|
||||||
|
# If only one link conencts them, we can then consdier if it's a node off PtMP
|
||||||
|
howManyLinksToParent = 0
|
||||||
|
for link in dataLinks:
|
||||||
|
if (link['to']['site'] is not None) and (link['to']['site']['identification'] is not None):
|
||||||
|
if ('identification' in link['to']['site']) and (link['to']['site']['identification'] is not None) and link['from'] is not None and link['from']['site'] is not None and link['from']['site']['identification'] is not None:
|
||||||
|
if link['from']['site']['identification']['id'] == trueParent:
|
||||||
|
if link['to']['site']['identification']['id'] == id:
|
||||||
|
howManyLinksToParent += 1
|
||||||
|
if howManyLinksToParent == 1:
|
||||||
for link in dataLinks:
|
for link in dataLinks:
|
||||||
if (link['to']['site'] is not None) 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['to']['site']) and (link['to']['site']['identification'] is not None) and link['from'] is not None and link['from']['site'] is not None and link['from']['site']['identification'] is not None:
|
if ('identification' in link['to']['site']) and (link['to']['site']['identification'] is not None) and link['from'] is not None and link['from']['site'] is not None and link['from']['site']['identification'] is not None:
|
||||||
@ -356,7 +366,7 @@ def findNodesBranchedOffPtMP(siteList, dataLinks, sites, rootSite, foundAirFiber
|
|||||||
}
|
}
|
||||||
if usePtMPasParent:
|
if usePtMPasParent:
|
||||||
site['parent'] = apID
|
site['parent'] = apID
|
||||||
print('Site ' + name + ' will use PtMP AP as parent.')
|
print('Site ' + name + ' will use PtMP AP ' + link['from']['device']['identification']['name'] + ' as parent from site ' + link['from']['site']['identification']['name'])
|
||||||
return siteList, nodeOffPtMP
|
return siteList, nodeOffPtMP
|
||||||
|
|
||||||
def handleMultipleInternetNodes(sites, dataLinks, uispSite):
|
def handleMultipleInternetNodes(sites, dataLinks, uispSite):
|
||||||
|
Loading…
Reference in New Issue
Block a user