Merge "Copy conf files used by mininet topology in SR tests and clean up params file"
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params
index 27a2bae..09d8b19 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params
@@ -12,17 +12,13 @@
</SCALE>
<DEPENDENCY>
- <wrapper1>startUp</wrapper1>
<topology>trellis_fabric.py</topology>
- <lib1>routinglib.py</lib1>
- <lib2>trellislib.py</lib2>
+ <lib>routinglib.py,trellislib.py</lib>
</DEPENDENCY>
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting,openflow,fpm</cellApps>
- <diffApps>netcfghostprovider</diffApps>
- <cellUser>sdn</cellUser>
+ <cellApps>drivers,segmentrouting,openflow,fpm,netcfghostprovider</cellApps>
</ENV>
<GIT>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRClusterRestart/SRClusterRestart.params b/TestON/tests/USECASE/SegmentRouting/SRClusterRestart/SRClusterRestart.params
index cf284ca..23057dd 100755
--- a/TestON/tests/USECASE/SegmentRouting/SRClusterRestart/SRClusterRestart.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRClusterRestart/SRClusterRestart.params
@@ -13,15 +13,12 @@
</SCALE>
<DEPENDENCY>
- <wrapper1>startUp</wrapper1>
<topology>cord_fabric.py</topology>
</DEPENDENCY>
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting</cellApps>
- <diffApps>openflow-base,netcfghostprovider,netcfglinksprovider</diffApps>
- <cellUser>sdn</cellUser>
+ <cellApps>drivers,segmentrouting,openflow-base,netcfghostprovider,netcfglinksprovider</cellApps>
</ENV>
<GIT>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDynamic/SRDynamic.params b/TestON/tests/USECASE/SegmentRouting/SRDynamic/SRDynamic.params
index 2fa1d4e..fba7e9f 100755
--- a/TestON/tests/USECASE/SegmentRouting/SRDynamic/SRDynamic.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRDynamic/SRDynamic.params
@@ -13,15 +13,12 @@
</SCALE>
<DEPENDENCY>
- <wrapper1>startUp</wrapper1>
<topology>cord_fabric.py</topology>
</DEPENDENCY>
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting</cellApps>
- <diffApps>openflow-base,netcfghostprovider,netcfglinksprovider</diffApps>
- <cellUser>sdn</cellUser>
+ <cellApps>drivers,segmentrouting,openflow-base,netcfghostprovider,netcfglinksprovider</cellApps>
</ENV>
<GIT>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRHighAvailability/SRHighAvailability.params b/TestON/tests/USECASE/SegmentRouting/SRHighAvailability/SRHighAvailability.params
index 9f61a70..cdb841b 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRHighAvailability/SRHighAvailability.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRHighAvailability/SRHighAvailability.params
@@ -13,15 +13,12 @@
</SCALE>
<DEPENDENCY>
- <wrapper1>startUp</wrapper1>
<topology>cord_fabric.py</topology>
</DEPENDENCY>
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting</cellApps>
- <diffApps>openflow-base,netcfghostprovider,netcfglinksprovider</diffApps>
- <cellUser>sdn</cellUser>
+ <cellApps>drivers,segmentrouting,openflow-base,netcfghostprovider,netcfglinksprovider</cellApps>
</ENV>
<GIT>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRLinkFailure/SRLinkFailure.params b/TestON/tests/USECASE/SegmentRouting/SRLinkFailure/SRLinkFailure.params
index 93e3dbe..a5d4811 100755
--- a/TestON/tests/USECASE/SegmentRouting/SRLinkFailure/SRLinkFailure.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRLinkFailure/SRLinkFailure.params
@@ -13,15 +13,12 @@
</SCALE>
<DEPENDENCY>
- <wrapper1>startUp</wrapper1>
<topology>cord_fabric.py</topology>
</DEPENDENCY>
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting</cellApps>
- <diffApps>openflow-base,netcfghostprovider,netcfglinksprovider</diffApps>
- <cellUser>sdn</cellUser>
+ <cellApps>drivers,segmentrouting,openflow-base,netcfghostprovider,netcfglinksprovider</cellApps>
</ENV>
<GIT>
diff --git a/TestON/tests/USECASE/SegmentRouting/SROnosFailure/SROnosFailure.params b/TestON/tests/USECASE/SegmentRouting/SROnosFailure/SROnosFailure.params
index cf284ca..23057dd 100755
--- a/TestON/tests/USECASE/SegmentRouting/SROnosFailure/SROnosFailure.params
+++ b/TestON/tests/USECASE/SegmentRouting/SROnosFailure/SROnosFailure.params
@@ -13,15 +13,12 @@
</SCALE>
<DEPENDENCY>
- <wrapper1>startUp</wrapper1>
<topology>cord_fabric.py</topology>
</DEPENDENCY>
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting</cellApps>
- <diffApps>openflow-base,netcfghostprovider,netcfglinksprovider</diffApps>
- <cellUser>sdn</cellUser>
+ <cellApps>drivers,segmentrouting,openflow-base,netcfghostprovider,netcfglinksprovider</cellApps>
</ENV>
<GIT>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRSanity/SRSanity.params b/TestON/tests/USECASE/SegmentRouting/SRSanity/SRSanity.params
index 2fa1d4e..fba7e9f 100755
--- a/TestON/tests/USECASE/SegmentRouting/SRSanity/SRSanity.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRSanity/SRSanity.params
@@ -13,15 +13,12 @@
</SCALE>
<DEPENDENCY>
- <wrapper1>startUp</wrapper1>
<topology>cord_fabric.py</topology>
</DEPENDENCY>
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting</cellApps>
- <diffApps>openflow-base,netcfghostprovider,netcfglinksprovider</diffApps>
- <cellUser>sdn</cellUser>
+ <cellApps>drivers,segmentrouting,openflow-base,netcfghostprovider,netcfglinksprovider</cellApps>
</ENV>
<GIT>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRSwitchFailure/SRSwitchFailure.params b/TestON/tests/USECASE/SegmentRouting/SRSwitchFailure/SRSwitchFailure.params
index 93e3dbe..a5d4811 100755
--- a/TestON/tests/USECASE/SegmentRouting/SRSwitchFailure/SRSwitchFailure.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRSwitchFailure/SRSwitchFailure.params
@@ -13,15 +13,12 @@
</SCALE>
<DEPENDENCY>
- <wrapper1>startUp</wrapper1>
<topology>cord_fabric.py</topology>
</DEPENDENCY>
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting</cellApps>
- <diffApps>openflow-base,netcfghostprovider,netcfglinksprovider</diffApps>
- <cellUser>sdn</cellUser>
+ <cellApps>drivers,segmentrouting,openflow-base,netcfghostprovider,netcfglinksprovider</cellApps>
</ENV>
<GIT>
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index 5198dbe..78c96cc 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -56,28 +56,20 @@
# Test variables
main.cellName = main.params[ 'ENV' ][ 'cellName' ]
main.apps = main.params[ 'ENV' ][ 'cellApps' ]
- main.diff = main.params[ 'ENV' ][ 'diffApps' ]
main.path = os.path.dirname( main.testFile )
main.topoPath = main.path + "/../dependencies/"
main.configPath = main.path + "/../dependencies/"
main.topology = main.params[ 'DEPENDENCY' ][ 'topology' ]
- wrapperFile1 = main.params[ 'DEPENDENCY' ][ 'wrapper1' ]
+ main.topologyLib = main.params[ 'DEPENDENCY' ][ 'lib' ] if 'lib' in main.params[ 'DEPENDENCY' ] else None
+ main.topologyConf = main.params[ 'DEPENDENCY' ][ 'conf' ] if 'conf' in main.params[ 'DEPENDENCY' ] else None
main.scale = ( main.params[ 'SCALE' ][ 'size' ] ).split( "," )
main.maxNodes = int( main.params[ 'SCALE' ][ 'max' ] )
- # main.ONOSport = main.params[ 'CTRL' ][ 'port' ]
main.startUpSleep = int( main.params[ 'SLEEP' ][ 'startup' ] )
stepResult = main.testSetUp.envSetup()
except Exception as e:
main.testSetUp.envSetupException( e )
- # Additional files for topology building
- try:
- main.topologyLib1 = main.params[ 'DEPENDENCY' ][ 'lib1' ]
- main.topologyLib2 = main.params[ 'DEPENDENCY' ][ 'lib2' ]
- except:
- pass
-
main.testSetUp.evnSetupConclusion( stepResult )
@staticmethod
@@ -94,9 +86,7 @@
- Connect to cli
"""
# main.scale[ 0 ] determines the current number of ONOS controller
- if main.diff:
- main.apps = main.apps + "," + main.diff
- else:
+ if not main.apps:
main.log.error( "App list is empty" )
main.log.info( "NODE COUNT = " + str( main.Cluster.numCtrls ) )
main.log.info( ''.join( main.Cluster.getIps() ) )
@@ -131,24 +121,27 @@
@staticmethod
def startMininet( main, topology, args="" ):
- try:
- copyResult1 = main.ONOSbench.scp( main.Mininet1,
- main.topoPath +
- main.topology,
- main.Mininet1.home,
- direction="to" )
- copyResult2 = main.ONOSbench.scp( main.Mininet1,
- main.topoPath +
- main.topologyLib1,
- main.Mininet1.home,
- direction="to" )
- copyResult3 = main.ONOSbench.scp( main.Mininet1,
- main.topoPath +
- main.topologyLib2,
- main.Mininet1.home,
- direction="to" )
- except:
- pass
+ copyResult = main.ONOSbench.scp( main.Mininet1,
+ main.topoPath + main.topology,
+ main.Mininet1.home,
+ direction="to" )
+ if main.topologyLib:
+ for lib in main.topologyLib.split(","):
+ copyResult = copyResult and main.ONOSbench.scp( main.Mininet1,
+ main.topoPath + lib,
+ main.Mininet1.home,
+ direction="to" )
+ if main.topologyConf:
+ for conf in main.topologyConf.split(","):
+ copyResult = copyResult and main.ONOSbench.scp( main.Mininet1,
+ main.topoPath + "conf/" + conf,
+ "~/",
+ direction="to" )
+ stepResult = copyResult
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Successfully copied topo files",
+ onfail="Failed to copy topo files" )
main.step( "Starting Mininet Topology" )
arg = "--onos-ip=%s %s" % (",".join([ctrl.ipAddress for ctrl in main.Cluster.runningNodes]), args)
main.topology = topology