Add mininet topology file
Change-Id: Icc079a83a034e920b498cf9f0886b2de4d85237e
diff --git a/TestON/tests/SCPF/SCPFportLat/SCPFportLat.params b/TestON/tests/SCPF/SCPFportLat/SCPFportLat.params
index 0d8687e..0a81dc6 100644
--- a/TestON/tests/SCPF/SCPFportLat/SCPFportLat.params
+++ b/TestON/tests/SCPF/SCPFportLat/SCPFportLat.params
@@ -9,6 +9,11 @@
<cellApps>drivers,metrics,openflow</cellApps>
</ENV>
+ <DEPENDENCY>
+ <path>/tests/SCPF/SCPFportLat/dependencies/</path>
+ <topology>topo-perf-2sw.py</topology>
+ </DEPENDENCY>
+
<GIT>
<autopull>off</autopull>
<checkout>master</checkout>
diff --git a/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py b/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py
index 35147ca..e6f62ef 100644
--- a/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py
+++ b/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py
@@ -21,6 +21,7 @@
init = False
#Load values from params file
+ main.testOnDirectory = os.path.dirname(os.getcwd())
checkoutBranch = main.params[ 'GIT' ][ 'checkout' ]
gitPull = main.params[ 'GIT' ][ 'autopull' ]
cellName = main.params[ 'ENV' ][ 'cellName' ]
@@ -34,6 +35,9 @@
topoCfgName = main.params['TEST']['topoConfigName']
resultPath = main.params['DB']['portEventResultPath']
skipMvn = main.params ['TEST']['mci']
+ main.topology = main.params['DEPENDENCY']['topology']
+ main.dependencyPath = main.testOnDirectory + \
+ main.params['DEPENDENCY']['path']
testONpath = re.sub( "(tests)$", "bin", main.testDir ) # TestON/bin
# -- INIT SECTION, ONLY RUNS ONCE -- #
@@ -135,6 +139,10 @@
verifyCellResult = main.ONOSbench.verifyCell()
main.step('Starting mininet topology ')
+ copyResult = main.ONOSbench.copyMininetFile(main.topology,
+ main.dependencyPath,
+ main.Mininet1.user_name,
+ main.Mininet1.ip_address)
main.Mininet1.startNet()
main.log.report( "Initializeing " + str( clusterCount ) + " node cluster." )
diff --git a/TestON/tests/SCPF/SCPFportLat/dependencies/topo-perf-2sw.py b/TestON/tests/SCPF/SCPFportLat/dependencies/topo-perf-2sw.py
new file mode 100644
index 0000000..ad88767
--- /dev/null
+++ b/TestON/tests/SCPF/SCPFportLat/dependencies/topo-perf-2sw.py
@@ -0,0 +1,19 @@
+'''
+imple 2 switch topology for topologoy performance test
+'''
+
+from mininet.topo import Topo
+
+class MyTopo( Topo ):
+ def __init__(self):
+ Topo.__init__(self)
+ s1 = self.addSwitch( "s1", dpid="0000000000000001")
+ s2 = self.addSwitch( "s2", dpid="0000000000000002")
+
+ h1 = self.addHost( "h1" )
+ h2 = self.addHost( "h2" )
+ self.addLink( s1, s2 )
+ self.addLink( s1, h1 )
+ self.addLink( s2, h2 )
+
+topos = { 'mytopo': ( lambda: MyTopo() ) }