[ONOS-6593]Review and Refactor ONOS startup procedures in TestON
Change-Id: I509a8ee7a26c198957bebf59da5c85a0edb8b995
diff --git a/TestON/tests/FUNC/FUNCintent/dependencies/FuncIntentFunction.py b/TestON/tests/FUNC/FUNCintent/dependencies/FuncIntentFunction.py
index 9159e4d..d08154e 100644
--- a/TestON/tests/FUNC/FUNCintent/dependencies/FuncIntentFunction.py
+++ b/TestON/tests/FUNC/FUNCintent/dependencies/FuncIntentFunction.py
@@ -1911,7 +1911,16 @@
Confirms that all ONOS nodes have discovered all scapy hosts
"""
import collections
- hosts = main.topo.getAllHosts( main ) # Get host data from each ONOS node
+ try:
+ from tests.dependencies.topology import Topology
+ except Exception:
+ main.log.error( "Topology not found exiting the test" )
+ main.exit()
+ try:
+ main.topoRelated
+ except Exception:
+ main.topoRelated = Topology()
+ hosts = main.topoRelated.getAllHosts( main.numCtrls, False ) # Get host data from each ONOS node
hostFails = [] # Reset for each failed attempt
# Check for matching hosts on each node