Rewrote assignSwController function in mininetclidriver
diff --git a/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py b/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py
index ad30942..a953640 100644
--- a/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py
+++ b/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py
@@ -45,16 +45,19 @@
# Starts topology
startResult = startNewTopology( main, topoFile, args, mnCmd )
+ # Gets list of switches in mininet
+ assignSwitch( main )
+
+ # This function activates fwd app then does pingall as well as store
+ # hosts data in a variable main.hostsData
+ getHostsResult = getHostsData( main )
+
# Create topology object using sts
topoObjectResult = createTopoObject( main )
# Compare Topology
compareTopoResult = compareTopo( main )
- # This function activates fwd app then does pingall as well as store
- # hosts data in a variable main.hostsData
- getHostsResult = getHostsData( main )
-
testTopoResult = startResult and topoObjectResult and \
compareTopoResult and getHostsResult
@@ -224,6 +227,14 @@
return compareTopoResult
+def assignSwitch( main ):
+ """
+ Returns switch list using getSwitch in Mininet driver
+ """
+ switchList = main.Mininet1.getSwitch()
+ print switchList
+ return switchList
+
def getHostsData( main ):
"""
Use fwd app and pingall to discover all the hosts
diff --git a/TestON/tests/FuncTopo/FuncTopo.py b/TestON/tests/FuncTopo/FuncTopo.py
index 829c582..35d9049 100644
--- a/TestON/tests/FuncTopo/FuncTopo.py
+++ b/TestON/tests/FuncTopo/FuncTopo.py
@@ -48,6 +48,7 @@
main.numLinks = int( main.params[ 'MININET' ][ 'links' ] )
main.numCtrls = main.params[ 'CTRL' ][ 'num' ]
main.hostsData = {}
+ main.topoName = " "
PULLCODE = False
if main.params[ 'GIT' ][ 'pull' ] == 'True':
PULLCODE = True
@@ -150,7 +151,7 @@
onpass="Successfully installed ONOS package",
onfail="Failed to install ONOS package" )
- time.sleep( 20 )
+ time.sleep( 10 )
main.step( "Starting ONOS service" )
stopResult = main.TRUE
startResult = main.TRUE
@@ -174,17 +175,6 @@
onpass="ONOS service is ready",
onfail="ONOS service did not start properly" )
- main.step( "Start ONOS cli" )
- cliResult = main.TRUE
- for i in range( main.numCtrls ):
- cliResult = cliResult and \
- main.CLIs[ i ].startOnosCli( main.ONOSip[ i ] )
- stepResult = cliResult
- utilities.assert_equals( expect=main.TRUE,
- actual=stepResult,
- onpass="Successfully start ONOS cli",
- onfail="Failed to start ONOS cli" )
-
def CASE9( self, main ):
'''
Report errors/warnings/exceptions