mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-17 02:11:38 +02:00
Fixed timeout logic for waiting for onos device discovery in opticalUtils.py
Change-Id: I6e019cf8eafed296f4b4a345ac18c7ddc62acee0
This commit is contained in:
parent
a9e4476e51
commit
bbab1a1908
@ -469,16 +469,15 @@ class LINCSwitch(OpticalSwitch):
|
||||
devs = response.get('devices')
|
||||
|
||||
# Wait for all devices to be registered. There is a chance that this is only a subgraph.
|
||||
if (len(devices) > len(devs)):
|
||||
continue
|
||||
if (len(devices) == len(devs)):
|
||||
|
||||
# Wait for all devices to available
|
||||
available = True
|
||||
for d in devs:
|
||||
if d['id'] in devlist:
|
||||
available &= d['available']
|
||||
if available:
|
||||
break
|
||||
# Wait for all devices to available
|
||||
available = True
|
||||
for d in devs:
|
||||
if d['id'] in devlist:
|
||||
available &= d['available']
|
||||
if available:
|
||||
break
|
||||
|
||||
if (time >= TIMEOUT):
|
||||
error('***ERROR: ONOS did not register devices within %s seconds\n' % TIMEOUT)
|
||||
|
Loading…
x
Reference in New Issue
Block a user