Added option in startNet to start Mininet using sudo mn command
diff --git a/TestON/tests/FuncTopo/FuncTopo.params b/TestON/tests/FuncTopo/FuncTopo.params
deleted file mode 100755
index ca464ae..0000000
--- a/TestON/tests/FuncTopo/FuncTopo.params
+++ /dev/null
@@ -1,34 +0,0 @@
-<PARAMS>
-
- <testcases>10,9,10,9</testcases>
-
- <SCALE>1,3</SCALE>
- <availableNodes>3</availableNodes>
- <ENV>
- <cellName>functionality</cellName>
- <cellApps>drivers,openflow,proxyarp,mobility</cellApps>
- </ENV>
- <GIT>
- <pull>False</pull>
- <branch>master</branch>
- </GIT>
- <CTRL>
- <num>3</num>
- <ip1>OC1</ip1>
- <port1>6633</port1>
- <ip2>OC2</ip2>
- <port2>6633</port2>
- <ip3>OC3</ip3>
- <port3>6633</port3>
- </CTRL>
- <BENCH>
- <user>admin</user>
- <ip1>OCN</ip1>
- </BENCH>
- <MININET>
- <switch>7</switch>
- <links>20</links>
- <topo>~/mininet/custom/newFuncTopo.py</topo>
- </MININET>
-
-</PARAMS>
diff --git a/TestON/tests/FuncTopo/FuncTopo.py b/TestON/tests/FuncTopo/FuncTopo.py
index f691957..456f2be 100644
--- a/TestON/tests/FuncTopo/FuncTopo.py
+++ b/TestON/tests/FuncTopo/FuncTopo.py
@@ -13,6 +13,7 @@
def CASE10( self, main ):
import time
import os
+ import imp
"""
Startup sequence:
cell <name>
@@ -32,6 +33,10 @@
except NameError:
init = False
+ main.wrapper = imp.load_source( 'FuncTopoFunction', '/home/admin/' +
+ 'TestON/tests/FuncTopo/Dependency/' +
+ 'FuncTopoFunction.py')
+
#Local variables
cellName = main.params[ 'ENV' ][ 'cellName' ]
apps = main.params[ 'ENV' ][ 'cellApps' ]
@@ -42,13 +47,16 @@
main.numSwitch = int( main.params[ 'MININET' ][ 'switch' ] )
main.numLinks = int( main.params[ 'MININET' ][ 'links' ] )
main.numCtrls = main.params[ 'CTRL' ][ 'num' ]
+ main.hostsData = {}
PULLCODE = False
if main.params[ 'GIT' ][ 'pull' ] == 'True':
PULLCODE = True
main.case( "Setting up test environment" )
main.CLIs = []
+ main.nodes = []
for i in range( 1, int( main.numCtrls ) + 1 ):
main.CLIs.append( getattr( main, 'ONOScli' + str( i ) ) )
+ main.nodes.append( getattr( main, 'ONOS' + str( i ) ) )
# -- INIT SECTION, ONLY RUNS ONCE -- #
if init == False:
@@ -188,7 +196,32 @@
"s" )
#main.ONOSbench.logReport( globalONOSip[1], [ "INFO" ], "d" )
- def CASE1001( self, main )
- """
- Test topology discovery
- """
+ def CASE1001( self, main ):
+ """
+ Test topology discovery
+ """
+ main.case( "Topology discovery test" )
+ main.topoName = ""
+
+ 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( "Tree 4-3 topology" )
+ mnCmd = "mn --topo=tree,4,3 --controller=remote,ip=$OC1 --mac"
+ stepResult = main.wrapper.testTopology( main,
+ mnCmd=mnCmd,
+ clean=True)
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Tree 4-3 topology successful",
+ onfail="Tree 4-3 topology failed" )
+ """
diff --git a/TestON/tests/FuncTopo/FuncTopo.topo b/TestON/tests/FuncTopo/FuncTopo.topo
deleted file mode 100755
index e6613de..0000000
--- a/TestON/tests/FuncTopo/FuncTopo.topo
+++ /dev/null
@@ -1,52 +0,0 @@
-<TOPOLOGY>
- <COMPONENT>
-
- <ONOSbench>
- <host>OCN</host>
- <user>admin</user>
- <password>onos_test</password>
- <type>OnosDriver</type>
- <connect_order>1</connect_order>
- <COMPONENTS>
- <home>~/ONOS</home>
- </COMPONENTS>
- </ONOSbench>
-
- <ONOScli1>
- <host>OCN</host>
- <user>admin</user>
- <password>onos_test</password>
- <type>OnosCliDriver</type>
- <connect_order>2</connect_order>
- <COMPONENTS> </COMPONENTS>
- </ONOScli1>
-
- <ONOScli2>
- <host>OCN</host>
- <user>admin</user>
- <password>onos_test</password>
- <type>OnosCliDriver</type>
- <connect_order>3</connect_order>
- <COMPONENTS> </COMPONENTS>
- </ONOScli2>
-
- <ONOScli3>
- <host>OCN</host>
- <user>admin</user>
- <password>onos_test</password>
- <type>OnosCliDriver</type>
- <connect_order>4</connect_order>
- <COMPONENTS> </COMPONENTS>
- </ONOScli3>
-
- <Mininet1>
- <host>OCN</host>
- <user>admin</user>
- <password>onos_test</password>
- <type>MininetCliDriver</type>
- <connect_order>5</connect_order>
- <COMPONENTS> </COMPONENTS>
- </Mininet1>
-
- </COMPONENT>
-</TOPOLOGY>