Update checkIntentState function in onosclidriver
diff --git a/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py b/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py
index 121a6dc..d4d3392 100644
--- a/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py
+++ b/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py
@@ -48,6 +48,9 @@
     testTopoResult = startResult and topoObjectResult and \
                      compareTopoResult and getHostsResult
 
+    # Restart ONOS to clear hosts test new mininet topology
+    restartResult = restartONOS( main )
+
     return testTopoResult
 
 def startNewTopology( main, topoFile='', args='', mnCmd='', clean=True ):
@@ -250,3 +253,51 @@
     print main.hostsData
 
     return getDataResult
+
+def restartONOS( main ):
+    """
+    Description:
+        Stop and start ONOS that clears hosts,devices etc. in order to test
+        new mininet topology
+    Return:
+        Retruns main.TRUE for a successful restart, main.FALSE otherwise.
+    """
+    stopResult = []
+    startResult = []
+    restartResult = main.TRUE
+
+    main.log.info( main.topoName + ": Stopping ONOS cluster" )
+    for node in main.nodes:
+        startResult.append( main.ONOSbench.onosStop( nodeIp=node.ip_address ) )
+
+    if all( result == main.TRUE for result in stopResult ):
+        main.log.info( main.topoName + ": Successfully stopped ONOS cluster" )
+    else:
+        restartResult = main.FALSE
+        main.log.error( main.topoName + ": Failed to stop ONOS cluster" )
+
+    time.sleep( 15 )
+
+    main.log.info( main.topoName + ": Starting ONOS cluster" )
+    for node in main.nodes:
+        startResult.append( main.ONOSbench.onosStart( nodeIp=node.ip_address ) )
+
+    if all( result == main.TRUE for result in startResult ):
+        main.log.info( main.topoName + ": Successfully start ONOS cluster" )
+    else:
+        restartResult = main.FALSE
+        main.log.error( main.topoName + ": Failed to start ONOS cluster" )
+
+    # Start ONOS CLIs again
+    main.log.info( main.topoName + ": Starting ONOS CLI" )
+    cliResult = main.TRUE
+    for i in range( main.numCtrls ):
+        cliResult = cliResult and \
+                    main.CLIs[ i ].startOnosCli( main.ONOSip[ i ] )
+
+    time.sleep( 15 )
+
+    return restartResult
+
+
+
diff --git a/TestON/tests/FuncTopo/FuncTopo.py b/TestON/tests/FuncTopo/FuncTopo.py
index eefdb39..829c582 100644
--- a/TestON/tests/FuncTopo/FuncTopo.py
+++ b/TestON/tests/FuncTopo/FuncTopo.py
@@ -178,7 +178,7 @@
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
             cliResult = cliResult and \
-                        main.CLIs[i].startOnosCli( main.ONOSip[ i ] )
+                        main.CLIs[ i ].startOnosCli( main.ONOSip[ i ] )
         stepResult = cliResult
         utilities.assert_equals( expect=main.TRUE,
                                  actual=stepResult,
@@ -201,13 +201,27 @@
             Test topology discovery
         """
         main.case( "Topology discovery test" )
+
+        main.topoName = "TREE3-3"
+        stepResult = main.TRUE
+        main.step( "Tree 3-3 topology" )
+        mnCmd = "mn --topo=tree,3,3 --controller=remote,ip=$OC1 --mac"
+        stepResult = main.wrapper.testTopology( main,
+                                                mnCmd=mnCmd,
+                                                clean=False )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Tree 3-3 topology successful",
+                                 onfail="Tree 3-3 topology failed" )
+
         main.step( "Torus 5-5 topology" )
         main.topoName = "TORUS5-5"
         mnCmd = "mn --topo=torus,5,5 --controller=remote,ip=$OC1 --mac"
         stepResult = main.wrapper.testTopology( main,
                                                 mnCmd=mnCmd,
-                                                clean=False)
+                                                clean=True )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=stepResult,
                                  onpass="Torus 5-5 topology successful",
                                  onfail="Torus 5-5 topology failed" )
+