Merge "Add mininet topology file"
diff --git a/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.params b/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.params
index 9bd9e6b..be4caec 100644
--- a/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.params
+++ b/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.params
@@ -9,7 +9,7 @@
</ENV>
<DEPENDENCY>
- <path>/tests/SCPFhostLat/dependencies/</path>
+ <path>/tests/SCPF/SCPFhostLat/dependencies/</path>
<topology>topo-perf-1h1s.py</topology>
</DEPENDENCY>
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() ) }
diff --git a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
index e905e5a..55cef23 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
+++ b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
@@ -88,7 +88,7 @@
commit = main.ONOSbench.getVersion() ####
commit = (commit.split(" "))[1]
- temp = testONpath.replace("bin","") + "tests/SCPFswitchLat/dependencies/"
+ temp = testONpath.replace("bin","") + "tests/SCPF/SCPFswitchLat/dependencies/"
main.ONOSbench.scp( main.Mininet1,
temp + "topo-perf-1sw.py",
main.Mininet1.home,