Merge "Add SRDynamicConf tests"
diff --git a/TestON/JenkinsFile/FUNCJenkinsFile b/TestON/JenkinsFile/FUNCJenkinsFile
index 4a820eb..8592090 100644
--- a/TestON/JenkinsFile/FUNCJenkinsFile
+++ b/TestON/JenkinsFile/FUNCJenkinsFile
@@ -1,23 +1,16 @@
#!groovy
funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
+test_lists = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsTestONTests.groovy' )
+
funcs.initialize( "FUNC" );
// This is a Jenkinsfile for a scripted pipeline for the FUNC tests
def prop = null
prop = funcs.getProperties()
-FUNC = [
-"FUNCipv6Intent" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "FUNCipv6Intent", wiki_file:"FUNCipv6IntentWiki.txt" ],
-"FUNCoptical" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "FUNCoptical", wiki_file:"FUNCopticalWiki.txt" ],
-"FUNCflow" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "FUNCflow", wiki_file:"FUNCflowWiki.txt" ],
-"FUNCnetCfg": [ wiki_link:prop[ "WikiPrefix" ] + "-" + "FUNCnetCfg", wiki_file:"FUNCnetCfgWiki.txt" ],
-"FUNCovsdbtest" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "FUNCovsdbtestWiki", wiki_file:"FUNCovsdbtestWiki.txt" ],
-"FUNCnetconf" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "FUNCnetconf", wiki_file:"FUNCnetconfWiki.txt" ],
-"FUNCgroup" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "FUNCgroup", wiki_file:"FUNCgroupWiki.txt" ],
-"FUNCintent" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "FUNCintent", wiki_file:"FUNCintentWiki.txt" ],
-"FUNCintentRest" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "FUNCintentRest", wiki_file:"FUNCintentRestWiki.txt" ],
-"FUNCformCluster" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "FUNCformCluster", wiki_file:"FUNCformClusterWiki.txt" ]
-]
+FUNC = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "FUNC" ]
+
graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R"
graph_saved_directory = "/var/jenkins/workspace/postjob-VM/"
+
echo( "Testcases:" )
def testsToRun = null
testsToRun = funcs.getTestsToRun( prop[ "Tests" ] )
diff --git a/TestON/JenkinsFile/HAJenkinsFile b/TestON/JenkinsFile/HAJenkinsFile
index ea06e6a..79f887e 100644
--- a/TestON/JenkinsFile/HAJenkinsFile
+++ b/TestON/JenkinsFile/HAJenkinsFile
@@ -1,19 +1,12 @@
#!groovy
funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
+test_lists = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsTestONTests.groovy' )
+
funcs.initialize( "HA" );
// This is a Jenkinsfile for a scripted pipeline for the HA tests
def prop = null
prop = funcs.getProperties()
-HA = [
-"HAsanity" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "HA Sanity", wiki_file:"HAsanityWiki.txt" ],
-"HAswapNodes" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "HA Swap Nodes", wiki_file:"HAswapNodesWiki.txt" ],
-"HAscaling" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "HA Scaling", wiki_file:"HAscalingWiki.txt" ],
-"HAclusterRestart" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "HA Cluster Restart", wiki_file:"HAclusterRestartWiki.txt" ],
-"HAstopNodes" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "HA Stop Nodes", wiki_file:"HAstopNodes.txt" ],
-"HAfullNetPartition" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "HA Full Network Partition", wiki_file:"HAfullNetPartitionWiki.txt" ],
-"HAsingleInstanceRestart" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "HA Single Instance Restart", wiki_file:"HAsingleInstanceRestartWiki.txt" ],
-"HAupgrade" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "HA Upgrade", wiki_file:"HAupgradeWiki.txt" ],
-"HAupgradeRollback" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "HA Upgrade Rollback", wiki_file:"HAupgradeRollbackWiki.txt" ] ]
+HA = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "HA" ]
graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R"
graph_saved_directory = "/var/jenkins/workspace/postjob-VM/"
diff --git a/TestON/JenkinsFile/JenkinsCommonFuncs.groovy b/TestON/JenkinsFile/JenkinsCommonFuncs.groovy
index 91ae7f0..f8d162b 100644
--- a/TestON/JenkinsFile/JenkinsCommonFuncs.groovy
+++ b/TestON/JenkinsFile/JenkinsCommonFuncs.groovy
@@ -1,6 +1,7 @@
#!groovy
import groovy.time.*
generalFuncs = evaluate readTrusted( 'TestON/JenkinsFile/GeneralFuncs.groovy' )
+
def initializeTrend( machine ){
table_name = "executed_test_tests"
result_name = "executed_test_results"
@@ -329,4 +330,14 @@
echo ''' + database_command + '''
done '''
}
+def generateStatGraph( onos_branch, AllTheTests, stat_graph_generator_file, pie_graph_generator_file, graph_saved_directory ){
+ testListPart = createStatsList( "FUNC", AllTheTests[ "FUNC" ], true ) +
+ createStatsList( "HA", AllTheTests[ "HA" ], true ) +
+ createStatsList( "USECASE", AllTheTests[ "USECASE" ], false )
+ pieTestList = makeTestList( AllTheTests[ "FUNC" ], true ) +
+ makeTestList( AllTheTests[ "HA" ], true ) +
+ makeTestList( AllTheTests[ "USECASE" ], false )
+ generateCategoryStatsGraph( "false", "true", stat_graph_generator_file, pie_graph_generator_file, "ALL", onos_branch, testListPart, graph_saved_directory, pieTestList )
+}
+
return this;
diff --git a/TestON/JenkinsFile/JenkinsTestONTests.groovy b/TestON/JenkinsFile/JenkinsTestONTests.groovy
new file mode 100644
index 0000000..7874e80
--- /dev/null
+++ b/TestON/JenkinsFile/JenkinsTestONTests.groovy
@@ -0,0 +1,72 @@
+#!groovy
+
+def getAllTheTests( wikiPrefix ){
+ return [
+ "FUNC":[
+ "FUNCipv6Intent" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "FUNCipv6Intent", wiki_file:"FUNCipv6IntentWiki.txt" ],
+ "FUNCoptical" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "FUNCoptical", wiki_file:"FUNCopticalWiki.txt" ],
+ "FUNCflow" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "FUNCflow", wiki_file:"FUNCflowWiki.txt" ],
+ "FUNCnetCfg": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "FUNCnetCfg", wiki_file:"FUNCnetCfgWiki.txt" ],
+ "FUNCovsdbtest" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "FUNCovsdbtestWiki", wiki_file:"FUNCovsdbtestWiki.txt" ],
+ "FUNCnetconf" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "FUNCnetconf", wiki_file:"FUNCnetconfWiki.txt" ],
+ "FUNCgroup" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "FUNCgroup", wiki_file:"FUNCgroupWiki.txt" ],
+ "FUNCintent" : [ "basic":false, "extra_A":true, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "FUNCintent", wiki_file:"FUNCintentWiki.txt" ],
+ "FUNCintentRest" : [ "basic":false, "extra_A":false, "extra_B":true, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "FUNCintentRest", wiki_file:"FUNCintentRestWiki.txt" ],
+ "FUNCformCluster" :[ "basic":false, "extra_A":false, "extra_B":false, "new_Test":true, "day":"", wiki_link:wikiPrefix + "-" + "FUNCformCluster", wiki_file:"FUNCformClusterWiki.txt" ]
+ ],
+ "HA":[
+ "HAsanity" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "HA Sanity", wiki_file:"HAsanityWiki.txt" ],
+ "HAswapNodes" : [ "basic":false, "extra_A":false, "extra_B":true, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "HA Swap Nodes", wiki_file:"HAswapNodesWiki.txt" ],
+ "HAscaling" : [ "basic":false, "extra_A":false, "extra_B":true, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "HA Scaling", wiki_file:"HAscalingWiki.txt" ],
+ "HAclusterRestart" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "HA Cluster Restart", wiki_file:"HAclusterRestartWiki.txt" ],
+ "HAstopNodes" : [ "basic":false, "extra_A":true, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "HA Stop Nodes", wiki_file:"HAstopNodes.txt" ],
+ "HAfullNetPartition" : [ "basic":false, "extra_A":true, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "HA Full Network Partition", wiki_file:"HAfullNetPartitionWiki.txt" ],
+ "HAsingleInstanceRestart" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "HA Single Instance Restart", wiki_file:"HAsingleInstanceRestartWiki.txt" ],
+ "HAupgrade" : [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":true, "day":"", wiki_link:wikiPrefix + "-" + "HA Upgrade", wiki_file:"HAupgradeWiki.txt" ],
+ "HAupgradeRollback" : [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":true, "day":"", wiki_link:wikiPrefix + "-" + "HA Upgrade Rollback", wiki_file:"HAupgradeRollbackWiki.txt" ],
+ "HAkillNodes" : [ "basic":false, "extra_A":false, "extra_B":true, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "HA Kill Nodes", wiki_file:"HAkillNodes.txt" ]
+
+ ],
+ "SCPF":[
+ "SCPFswitchLat": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFcbench": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFportLat": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFflowTp1g": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFintentEventTp": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFhostLat": [ "basic":false, "extra_A":true, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFbatchFlowResp": [ "basic":false, "extra_A":true, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFintentRerouteLat": [ "basic":false, "extra_A":true, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFintentInstallWithdrawLat": [ "basic":false, "extra_A":true, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFflowTp1gWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFintentEventTpWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFintentRerouteLatWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFscalingMaxIntentsWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFintentInstallWithdrawLatWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFscaleTopo": [ "basic":false, "extra_A":false, "extra_B":false, "extra_C":true, "extra_D":false, "new_Test":false, day:"" ],
+ "SCPFscalingMaxIntents": [ "basic":false, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":true, "new_Test":false, day:"" ],
+ "SCPFmastershipFailoverLat": [ "basic":false, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":true, day:"" ]
+ ],
+ "USECASE":[
+ "FUNCvirNetNB" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "FUNCvirNetNB", wiki_file:"FUNCvirNetNBWiki.txt" ],
+ "FUNCbgpls" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "FUNCbgpls", wiki_file:"FUNCbgplsWiki.txt" ],
+ "VPLSBasic" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "VPLSBasic", wiki_file:"VPLSBasicWiki.txt" ],
+ "VPLSfailsafe" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "VPLSfailsafe", wiki_file:"VPLSfailsafeWiki.txt" ],
+ "PLATdockertest": [ "basic":true, "extra_A":true, "extra_B":false, "new_Test":false, "day":"", wiki_link:"Docker Images sanity test", wiki_file:"PLATdockertestTableWiki.txt" ],
+ "SRSanity": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "SR Sanity", wiki_file:"SRSanityWiki.txt" ],
+ "SRSwitchFailure": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "SR Switch Failure", wiki_file:"SRSwitchFailureWiki.txt" ],
+ "SRLinkFailure": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "SR Link Failure", wiki_file:"SRLinkFailureWiki.txt" ],
+ "SROnosFailure": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "SR Onos node Failure", wiki_file:"SROnosFailureWiki.txt" ],
+ "SRClusterRestart": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "SR Cluster Restart", wiki_file:"SRClusterRestartWiki.txt" ],
+ "SRDynamic": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "SR Dynamic Config", wiki_file:"SRDynamicWiki.txt" ],
+ "SRHighAvailability": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "SR High Availability", wiki_file:"SRHighAvailabilityWiki.txt" ],
+ "USECASE_SdnipFunction": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "SDNIP Function", wiki_file:"USECASE_SdnipFunctionWiki.txt" ],
+ "USECASE_SdnipFunctionCluster": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "SDNIP Function Cluster", wiki_file:"USECASE_SdnipFunctionClusterWiki.txt" ]
+ ],
+ "SR":[
+ "SRBridging": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "SR Bridging", wiki_file:"SRBridgingWiki.txt" ],
+ "SRRouting": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"", wiki_link:wikiPrefix + "-" + "SR Routing", wiki_file:"SRRoutingWiki.txt" ]
+ ]
+ ];
+}
+
+return this;
\ No newline at end of file
diff --git a/TestON/JenkinsFile/JenkinsfileTrigger b/TestON/JenkinsFile/JenkinsfileTrigger
index f258324..84fa15e 100644
--- a/TestON/JenkinsFile/JenkinsfileTrigger
+++ b/TestON/JenkinsFile/JenkinsfileTrigger
@@ -1,75 +1,12 @@
#!groovy
funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
-funcs.initializeTrend( "VM" );
+test_lists = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsTestONTests.groovy' )
+
previous_version = "1.12"
before_previous_version = "1.11"
-AllTheTests=
-[
- "FUNC":[
- "FUNCipv6Intent" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "FUNCoptical" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "FUNCflow" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "FUNCnetCfg": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "FUNCovsdbtest" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "FUNCnetconf" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "FUNCgroup" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "FUNCformCluster" :[ "basic":false, "extra_A":false, "extra_B":false, "new_Test":true, "day":"" ],
- "FUNCintent" : [ "basic":false, "extra_A":true, "extra_B":false, "new_Test":false, "day":"" ],
- "FUNCintentRest" : [ "basic":false, "extra_A":false, "extra_B":true, "new_Test":false, "day":"" ],
- ],
- "HA":[
- "HAsanity" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "HAclusterRestart" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "HAsingleInstanceRestart" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "HAupgrade" : [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":true, "day":"" ],
- "HAupgradeRollback" : [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":true, "day":"" ],
- "HAstopNodes" : [ "basic":false, "extra_A":true, "extra_B":false, "new_Test":false, "day":"" ],
- "HAfullNetPartition" : [ "basic":false, "extra_A":true, "extra_B":false, "new_Test":false, "day":"" ],
- "HAswapNodes" : [ "basic":false, "extra_A":false, "extra_B":true, "new_Test":false, "day":"" ],
- "HAscaling" : [ "basic":false, "extra_A":false, "extra_B":true, "new_Test":false, "day":"" ],
- "HAkillNodes" : [ "basic":false, "extra_A":false, "extra_B":true, "new_Test":false, "day":"" ]
- ],
- "SCPF":[
- "SCPFswitchLat": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFcbench": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFportLat": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFflowTp1g": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFintentEventTp": [ "basic":true, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFhostLat": [ "basic":false, "extra_A":true, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFbatchFlowResp": [ "basic":false, "extra_A":true, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFintentRerouteLat": [ "basic":false, "extra_A":true, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFintentInstallWithdrawLat": [ "basic":false, "extra_A":true, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFflowTp1gWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFintentEventTpWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFintentRerouteLatWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFscalingMaxIntentsWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFintentInstallWithdrawLatWithFlowObj": [ "basic":false, "extra_A":false, "extra_B":true, "extra_C":false, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFscaleTopo": [ "basic":false, "extra_A":false, "extra_B":false, "extra_C":true, "extra_D":false, "new_Test":false, day:"" ],
- "SCPFscalingMaxIntents": [ "basic":false, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":true, "new_Test":false, day:"" ],
- "SCPFmastershipFailoverLat": [ "basic":false, "extra_A":false, "extra_B":false, "extra_C":false, "extra_D":false, "new_Test":true, day:"" ]
- ],
- "USECASE":[
- "FUNCvirNetNB" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "FUNCbgpls" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "VPLSBasic" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "USECASE_SdnipFunction": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "USECASE_SdnipFunctionCluster": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "PLATdockertest": [ "basic":true, "extra_A":true, "extra_B":false, "new_Test":false, "day":"" ],
- "SRSanity": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "SRSwitchFailure": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "SRLinkFailure": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "SROnosFailure": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "SRClusterRestart": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "SRDynamic": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "SRHighAvailability": [ "basic":false, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "VPLSfailsafe" : [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ]
- ],
- "SR":[
- "SRBridging": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ],
- "SRRouting": [ "basic":true, "extra_A":false, "extra_B":false, "new_Test":false, "day":"" ]
- ]
-]
+funcs.initializeTrend( "VM" );
+
testcases = [
"FUNC" : [ tests : "" , nodeName : "VM" ],
"HA" : [ tests : "" , nodeName : "VM" ],
@@ -88,14 +25,28 @@
"VP" : "USECASE"
]
+manually_run = params.manual_run
onos_b = "master"
test_branch = ""
onos_tag = params.ONOSTag
isOldFlow = true
+
// Set tests based on day of week
def now = funcs.getCurrentTime()
print now.toString()
today = now[ Calendar.DAY_OF_WEEK ]
+
+if ( manually_run ){
+ onos_b = params.ONOSVersion
+} else {
+ if ( today == Calendar.SATURDAY ){
+ onos_b = previous_version
+ } else if( today == Calendar.SUNDAY ){
+ onos_b = before_previous_version
+ }
+}
+AllTheTests = test_lists.getAllTheTests( onos_b )
+
day = ""
SCPF_choices = ""
USECASE_choices = ""
@@ -106,7 +57,6 @@
pie_graph_generator_file = "testCategoryPiePassFail.R"
graph_saved_directory = "/var/jenkins/workspace/postjob-VM/"
-manually_run = params.manual_run
post_result = params.PostResult
if( !manually_run ){
slackSend( color:'#03CD9F',
@@ -123,7 +73,7 @@
if ( manually_run ){
organize_tests( params.Tests )
- onos_b = params.ONOSVersion
+
isOldFlow = params.isOldFlow
println "Tests to be run manually : "
}else{
@@ -134,7 +84,9 @@
testcases[ "SR" ][ "tests" ] = SR_choices
println "Defaulting to " + day + " tests:"
}
+
print_tests( testcases )
+
def runTest = [
"VM" : [:],
"BM" : [:]
@@ -150,7 +102,10 @@
finalList[ "BM" ] = runTestSeq( runTest[ "BM" ] )
parallel finalList
//finalList[ "BM" ].call()
-generateStatGraph()
+
+if ( !manually_run ){
+ funcs.generateStatGraph( onos_b, AllTheTests, stat_graph_generator_file, pie_graph_generator_file, graph_saved_directory )
+}
def testDivider( today ){
switch ( today ) {
@@ -183,12 +138,10 @@
break
case Calendar.SATURDAY:
saturday()
- onos_b= previous_version
day = "Saturday"
break
case Calendar.SUNDAY:
sunday()
- onos_b= before_previous_version
day = "Sunday"
isOldFlow = false
break
@@ -500,16 +453,4 @@
~/./return_cell.sh
'''
}
-}
-
-def generateStatGraph(){
- if( !manually_run ){
- testListPart = funcs.createStatsList( "FUNC", AllTheTests[ "FUNC" ], true ) +
- funcs.createStatsList( "HA", AllTheTests[ "HA" ], true ) +
- funcs.createStatsList( "USECASE", AllTheTests[ "USECASE" ], false )
- pieTestList = funcs.makeTestList( AllTheTests[ "FUNC" ], true ) +
- funcs.makeTestList( AllTheTests[ "HA" ], true ) +
- funcs.makeTestList( AllTheTests[ "USECASE" ], false )
- funcs.generateCategoryStatsGraph( "false", "true", stat_graph_generator_file, pie_graph_generator_file, "ALL", onos_b, testListPart, graph_saved_directory, pieTestList )
- }
}
\ No newline at end of file
diff --git a/TestON/JenkinsFile/Overall_Graph_Generator b/TestON/JenkinsFile/Overall_Graph_Generator
new file mode 100644
index 0000000..4e2280e
--- /dev/null
+++ b/TestON/JenkinsFile/Overall_Graph_Generator
@@ -0,0 +1,14 @@
+#!groovy
+funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
+test_lists = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsTestONTests.groovy' )
+
+stat_graph_generator_file = "testCategoryBuildStats.R"
+pie_graph_generator_file = "testCategoryPiePassFail.R"
+graph_saved_directory = "/var/jenkins/workspace/postjob-VM/"
+
+funcs.initializeTrend( "VM" )
+
+onos_branch = params.ONOSbranch
+AllTheTests = test_lists.getAllTheTests("")
+
+funcs.generateStatGraph( onos_branch, AllTheTests, stat_graph_generator_file, pie_graph_generator_file, graph_saved_directory )
\ No newline at end of file
diff --git a/TestON/JenkinsFile/SRJenkinsFile b/TestON/JenkinsFile/SRJenkinsFile
index 6e04cac..0cd424c 100644
--- a/TestON/JenkinsFile/SRJenkinsFile
+++ b/TestON/JenkinsFile/SRJenkinsFile
@@ -1,15 +1,16 @@
#!groovy
funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
+test_lists = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsTestONTests.groovy' )
+
funcs.initialize( "SR" );
// This is a Jenkinsfile for a scripted pipeline for the SR tests
def prop = null
prop = funcs.getProperties()
-SR = [
-"SRBridging" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "SR Bridging", wiki_file:"SRBridgingWiki.txt" ],
-"SRRouting" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "SR Routing", wiki_file:"SRRoutingWiki.txt" ]
-]
+SR = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "SR" ]
+
graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R"
graph_saved_directory = "/var/jenkins/workspace/postjob-VM/"
+
echo( "Testcases:" )
def testsToRun = null
testsToRun = funcs.getTestsToRun( prop[ "Tests" ] )
diff --git a/TestON/JenkinsFile/USECASEJenkinsFile b/TestON/JenkinsFile/USECASEJenkinsFile
index 3806fc3..34abfa9 100644
--- a/TestON/JenkinsFile/USECASEJenkinsFile
+++ b/TestON/JenkinsFile/USECASEJenkinsFile
@@ -1,25 +1,13 @@
#!groovy
funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
+test_lists = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsTestONTests.groovy' )
+
funcs.initialize( "USECASE" );
// This is a Jenkinsfile for a scripted pipeline for the USECASE tests
def prop = null
prop = funcs.getProperties()
-USECASE = [
- "FUNCvirNetNB" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "FUNCvirNetNB", wiki_file:"FUNCvirNetNBWiki.txt" ],
- "FUNCbgpls" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "FUNCbgpls", wiki_file:"FUNCbgplsWiki.txt" ],
- "VPLSBasic" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "VPLSBasic", wiki_file:"VPLSBasicWiki.txt" ],
- "VPLSfailsafe" : [ wiki_link:prop[ "WikiPrefix" ] + "-" + "VPLSfailsafe", wiki_file:"VPLSfailsafeWiki.txt" ],
- "PLATdockertest": [ wiki_link:"Docker Images sanity test", wiki_file:"PLATdockertestTableWiki.txt" ],
- "SRSanity": [ wiki_link:prop[ "WikiPrefix" ] + "-" + "SR Sanity", wiki_file:"SRSanityWiki.txt" ],
- "SRSwitchFailure": [ wiki_link:prop[ "WikiPrefix" ] + "-" + "SR Switch Failure", wiki_file:"SRSwitchFailureWiki.txt" ],
- "SRLinkFailure": [ wiki_link:prop[ "WikiPrefix" ] + "-" + "SR Link Failure", wiki_file:"SRLinkFailureWiki.txt" ],
- "SROnosFailure": [ wiki_link:prop[ "WikiPrefix" ] + "-" + "SR Onos node Failure", wiki_file:"SROnosFailureWiki.txt" ],
- "SRClusterRestart": [ wiki_link:prop[ "WikiPrefix" ] + "-" + "SR Cluster Restart", wiki_file:"SRClusterRestartWiki.txt" ],
- "SRDynamic": [ wiki_link:prop[ "WikiPrefix" ] + "-" + "SR Dynamic Config", wiki_file:"SRDynamicWiki.txt" ],
- "SRHighAvailability": [ wiki_link:prop[ "WikiPrefix" ] + "-" + "SR High Availability", wiki_file:"SRHighAvailabilityWiki.txt" ],
- "USECASE_SdnipFunction": [ wiki_link:prop[ "WikiPrefix" ] + "-" + "SDNIP Function", wiki_file:"USECASE_SdnipFunctionWiki.txt" ],
- "USECASE_SdnipFunctionCluster": [ wiki_link:prop[ "WikiPrefix" ] + "-" + "SDNIP Function Cluster", wiki_file:"USECASE_SdnipFunctionClusterWiki.txt" ]
-]
+USECASE = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "USECASE" ]
+
graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R"
graph_saved_directory = "/var/jenkins/workspace/postjob-BM/"
diff --git a/TestON/bin/cli.py b/TestON/bin/cli.py
index 8e48311..263d4b4 100755
--- a/TestON/bin/cli.py
+++ b/TestON/bin/cli.py
@@ -263,10 +263,16 @@
while index < len( args ):
option = args[ index ]
if index > 0:
- if re.match( "--params", option, flags=0 ):
+ if re.match( "--params-file", option, flags=0 ):
+ # The more specific match must be before --params
+ options[ 'paramsFile' ] = args[ index + 1 ]
+ elif re.match( "--topo-file", option, flags=0 ):
+ options[ 'topoFile' ] = args[ index + 1 ]
+ elif re.match( "--params", option, flags=0 ):
# check if there is a params
options[ 'params' ].append( args[ index + 1 ] )
- elif re.match( "logdir|mail|example|testdir|testcases|onoscell", option, flags = 0 ):
+ elif re.match( "logdir|mail|example|testdir|testcases|onoscell",
+ option, flags=0 ):
options[ option ] = args[ index + 1 ]
options = self.testcasesInRange( index + 1, option, args, options )
index += 2
@@ -292,6 +298,8 @@
options[ 'onoscell' ] = None
# init params as a empty list
options[ 'params' ] = []
+ options[ 'paramsFile' ] = None
+ options[ 'topoFile' ] = None
return options
def testcasesInRange( self, index, option, args, options ):
diff --git a/TestON/core/logger.py b/TestON/core/logger.py
index dc2b2b2..551bacc 100644
--- a/TestON/core/logger.py
+++ b/TestON/core/logger.py
@@ -43,9 +43,9 @@
for component in main.componentDictionary.keys():
logmsg = logmsg + "\n\t" + component + " Session Log : " + main.logdir + "/" + component + ".session" + ""
- logmsg = logmsg + "\n\tTest Script :" + path + "Tests/" + main.TEST + ".py" + ""
- logmsg = logmsg + "\n\tTest Params : " + path + "Tests/" + main.TEST + ".params" + ""
- logmsg = logmsg + "\n\tTopology : " + path + "Tests/" + main.TEST + ".topo" + ""
+ logmsg = logmsg + "\n\tTest Script : " + main.testFile + ""
+ logmsg = logmsg + "\n\tTest Params : " + main.testDir + "/" + main.paramsFile + ""
+ logmsg = logmsg + "\n\tTopology : " + main.testDir + "/" + main.topoFile + ""
logmsg = logmsg + "\n" + " " * 30 + "+" + "-" * 18 + "+" + "\n" + "-" * 27 + " { Script Exec Params } " + "-" * 27 + "\n" + " " * 30 + "+" + "-" * 18 + "+\n"
values = "\n\t" + str( main.params )
values = re.sub( ",", "\n\t", values )
diff --git a/TestON/core/teston.py b/TestON/core/teston.py
index 6794564..19449f4 100644
--- a/TestON/core/teston.py
+++ b/TestON/core/teston.py
@@ -90,6 +90,7 @@
self.test_target = None
self.lastcommand = None
self.testDir = tests_path
+ self.testsRoot = tests_path
self.configFile = config_path + "teston.cfg"
self.parsingClass = "xmlparser"
self.parserPath = core_path + "/xmlparser"
@@ -935,6 +936,7 @@
main.classPath = directory[ index: ].replace( '/', '.' ) + "." + main.TEST
break
openspeakfile = directory + "/" + main.TEST + ".ospk"
+ main.testDir = directory
main.testFile = directory + "/" + main.TEST + ".py"
if os.path.exists( openspeakfile ):
# Openspeak file found, compiling to python
@@ -962,8 +964,10 @@
testClass = getattr( testModule, main.TEST )
main.testObject = testClass()
load_parser()
- main.params = main.parser.parseParams( main.classPath )
- main.topology = main.parser.parseTopology( main.classPath )
+ main.paramsFile = main.TEST + ".params" if options.paramsFile is None else options.paramsFile
+ main.topoFile = main.TEST + ".topo" if options.topoFile is None else options.topoFile
+ main.params = main.parser.parseFile( main.testDir + "/" + main.paramsFile )
+ main.topology = main.parser.parseFile( main.testDir + "/" + main.topoFile )
def verifyParams( options ):
try:
@@ -1039,8 +1043,7 @@
-1 )
parsingClass = getattr( parsingModule, parsingClass )
main.parser = parsingClass()
- if hasattr( main.parser, "parseParams" ) and\
- hasattr( main.parser, "parseTopology" ) and\
+ if hasattr( main.parser, "parseFile" ) and\
hasattr( main.parser, "parse" ):
pass
else:
@@ -1072,8 +1075,7 @@
-1 )
parsingClass = getattr( parsingModule, parsingClass )
main.parser = parsingClass()
- if hasattr( main.parser, "parseParams" ) and\
- hasattr( main.parser, "parseTopology" ) and\
+ if hasattr( main.parser, "parseFile" ) and\
hasattr( main.parser, "parse" ):
pass
else:
diff --git a/TestON/core/xmlparser.py b/TestON/core/xmlparser.py
index 12a3f61..d7af564 100644
--- a/TestON/core/xmlparser.py
+++ b/TestON/core/xmlparser.py
@@ -27,6 +27,7 @@
import xmldict
import re
+import os.path
class xmlparser:
@@ -49,23 +50,10 @@
else:
print "File name is not correct"
- def parseParams( self, paramsPath ):
+ def parseFile( self, fileName ):
'''
- It will take the params file path and will return the params dictionary
+ It will take a file path of an xml file and return the contents as a dictionary
'''
- paramsPath = re.sub( "\.", "/", paramsPath )
- paramsPath = re.sub( "tests|examples", "", paramsPath )
- params = self.parse( main.tests_path + paramsPath + ".params" )
- paramsAsString = str( params )
- return eval( paramsAsString )
-
- def parseTopology( self, topologyPath ):
- '''
- It will take topology file path and will return topology dictionary
- '''
- topologyPath = re.sub( "\.", "/", topologyPath )
- topologyPath = re.sub( "tests|examples", "", topologyPath )
- topology = self.parse( main.tests_path + topologyPath + ".topo" )
- topoAsString = str( topology )
- return eval( topoAsString )
+ contents = self.parse( fileName )
+ return eval( str( contents ) )
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index d9b333a..2f3bfda 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -478,10 +478,20 @@
isReachable = main.FALSE
failedPings += 1
pingResponse += "\n"
+ if not isReachable:
+ main.log.warn( "Cannot ping between {} and {}".format( host, temp ) )
main.log.info( pingResponse + "Failed pings: " + str( failedPings ) )
return isReachable
except pexpect.TIMEOUT:
main.log.exception( self.name + ": TIMEOUT exception" )
+ response = self.handle.before
+ # NOTE: Send ctrl-c to make sure command is stopped
+ self.handle.sendline( "\x03" )
+ self.handle.expect( "Interrupt" )
+ response += self.handle.before + self.handle.after
+ self.handle.expect( "mininet>" )
+ response += self.handle.before + self.handle.after
+ main.log.debug( response )
return main.FALSE
except pexpect.EOF:
main.log.error( self.name + ": EOF exception found" )
@@ -536,11 +546,21 @@
isReachable = main.FALSE
failedPingsTotal += 1
pingResponse += "\n"
+ if not isReachable:
+ main.log.warn( "Cannot ping between {} and {}".format( host, temp ) )
main.log.info( pingResponse + "Failed pings: " + str( failedPingsTotal ) )
return isReachable
except pexpect.TIMEOUT:
main.log.exception( self.name + ": TIMEOUT exception" )
+ response = self.handle.before
+ # NOTE: Send ctrl-c to make sure command is stopped
+ self.handle.sendline( "\x03" )
+ self.handle.expect( "Interrupt" )
+ response += self.handle.before + self.handle.after
+ self.handle.expect( "mininet>" )
+ response += self.handle.before + self.handle.after
+ main.log.debug( response )
return main.FALSE
except pexpect.EOF:
main.log.error( self.name + ": EOF exception found" )
@@ -596,6 +616,14 @@
except pexpect.TIMEOUT:
main.log.exception( self.name + ": TIMEOUT exception" )
+ response = self.handle.before
+ # NOTE: Send ctrl-c to make sure command is stopped
+ self.handle.sendline( "\x03" )
+ self.handle.expect( "Interrupt" )
+ response += self.handle.before + self.handle.after
+ self.handle.expect( "mininet>" )
+ response += self.handle.before + self.handle.after
+ main.log.debug( response )
return main.FALSE
except pexpect.EOF:
main.log.error( self.name + ": EOF exception found" )
@@ -686,7 +714,6 @@
self.name +
": PACKET LOST, HOST IS NOT REACHABLE" )
return main.FALSE
-
except pexpect.EOF:
main.log.error( self.name + ": EOF exception found" )
main.log.error( self.name + ": " + self.handle.before )
@@ -736,6 +763,14 @@
isReachable = main.FALSE
except pexpect.TIMEOUT:
main.log.exception( self.name + ": TIMEOUT exception" )
+ response = self.handle.before
+ # NOTE: Send ctrl-c to make sure command is stopped
+ self.handle.sendline( "\x03" )
+ self.handle.expect( "Interrupt" )
+ response += self.handle.before + self.handle.after
+ self.handle.expect( "mininet>" )
+ response += self.handle.before + self.handle.after
+ main.log.debug( response )
isReachable = main.FALSE
except pexpect.EOF:
main.log.error( self.name + ": EOF exception found" )
@@ -1224,6 +1259,8 @@
else:
pattern = "inet6\saddr:\s([\w,:]*)/\d+\sScope:Global"
ipAddressSearch = re.search( pattern, response )
+ if not ipAddressSearch:
+ return None
main.log.info(
self.name +
": IP-Address of Host " +
diff --git a/TestON/tests/CHOTestMonkey/CHOTestMonkey.py b/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
index 3efb3cc..3e02799 100644
--- a/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
+++ b/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
@@ -173,7 +173,7 @@
main.step( "Start Mininet topology" )
newTopo = main.params[ 'TOPO' ][ main.topoIndex ][ 'fileName' ]
mininetDir = main.Mininet1.home + "/custom/"
- topoPath = main.testDir + "/" + main.TEST + "/dependencies/topologies/" + newTopo
+ topoPath = main.testDir + "/dependencies/topologies/" + newTopo
main.ONOSbench.secureCopy( main.Mininet1.user_name, main.Mininet1.ip_address, topoPath, mininetDir, direction="to" )
topoPath = mininetDir + newTopo
startStatus = main.Mininet1.startNet( topoFile=topoPath )
diff --git a/TestON/tests/FUNC/FUNCintent/FUNCintent.py b/TestON/tests/FUNC/FUNCintent/FUNCintent.py
index bd100f4..daa17cb 100644
--- a/TestON/tests/FUNC/FUNCintent/FUNCintent.py
+++ b/TestON/tests/FUNC/FUNCintent/FUNCintent.py
@@ -374,10 +374,6 @@
stepResult = main.Cluster.active( 0 ).CLI.setCfg( component=cmd,
propName="useFlowObjectives", value="true" )
- stepResult &= main.Cluster.active( 0 ).CLI.setCfg( component=cmd,
- propName="defaultFlowObjectiveCompiler",
- value='org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler' )
-
utilities.assert_equals( expect=main.TRUE,
actual=stepResult,
onpass="Successfully activated Flow Objectives",
diff --git a/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py b/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
index dda829e..2ee7260 100644
--- a/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
+++ b/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
@@ -379,10 +379,6 @@
stepResult = main.Cluster.active( 0 ).CLI.setCfg( component=cmd,
propName="useFlowObjectives", value="true" )
- stepResult &= main.Cluster.active( 0 ).CLI.setCfg( component=cmd,
- propName="defaultFlowObjectiveCompiler",
- value='org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler' )
-
utilities.assert_equals( expect=main.TRUE,
actual=stepResult,
onpass="Successfully activated Flow Objectives",
diff --git a/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py b/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py
index db9f217..2b63a64 100644
--- a/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py
+++ b/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py
@@ -165,9 +165,6 @@
stepResult = main.Cluster.active( 0 ).CLI.setCfg( component=cmd,
propName="useFlowObjectives", value="true" )
- stepResult &= main.Cluster.active( 0 ).CLI.setCfg( component=cmd,
- propName="defaultFlowObjectiveCompiler",
- value='org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler' )
utilities.assert_equals( expect=main.TRUE,
actual=stepResult,
diff --git a/TestON/tests/HA/HAbackupRecover/HAbackupRecover.params b/TestON/tests/HA/HAbackupRecover/HAbackupRecover.params
index 7091a1d..f0db32f 100644
--- a/TestON/tests/HA/HAbackupRecover/HAbackupRecover.params
+++ b/TestON/tests/HA/HAbackupRecover/HAbackupRecover.params
@@ -28,7 +28,6 @@
<ONOS_Configuration>
<org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
<useFlowObjectives>false</useFlowObjectives>
- <defaultFlowObjectiveCompiler>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</defaultFlowObjectiveCompiler>
</org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
</ONOS_Configuration>
<ENV>
diff --git a/TestON/tests/HA/HAclusterRestart/HAclusterRestart.params b/TestON/tests/HA/HAclusterRestart/HAclusterRestart.params
index bbf11ae..75e8876 100644
--- a/TestON/tests/HA/HAclusterRestart/HAclusterRestart.params
+++ b/TestON/tests/HA/HAclusterRestart/HAclusterRestart.params
@@ -28,7 +28,6 @@
<ONOS_Configuration>
<org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
<useFlowObjectives>false</useFlowObjectives>
- <defaultFlowObjectiveCompiler>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</defaultFlowObjectiveCompiler>
</org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
</ONOS_Configuration>
<ENV>
diff --git a/TestON/tests/HA/HAcontinuousStopNodes/HAcontinuousStopNodes.params b/TestON/tests/HA/HAcontinuousStopNodes/HAcontinuousStopNodes.params
index 3d96b4c..758572f 100644
--- a/TestON/tests/HA/HAcontinuousStopNodes/HAcontinuousStopNodes.params
+++ b/TestON/tests/HA/HAcontinuousStopNodes/HAcontinuousStopNodes.params
@@ -30,7 +30,6 @@
<ONOS_Configuration>
<org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
<useFlowObjectives>false</useFlowObjectives>
- <defaultFlowObjectiveCompiler>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</defaultFlowObjectiveCompiler>
</org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
</ONOS_Configuration>
<ENV>
diff --git a/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.params b/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.params
index fe4cd80..61ce3b5 100644
--- a/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.params
+++ b/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.params
@@ -30,7 +30,6 @@
<ONOS_Configuration>
<org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
<useFlowObjectives>false</useFlowObjectives>
- <defaultFlowObjectiveCompiler>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</defaultFlowObjectiveCompiler>
</org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
</ONOS_Configuration>
<ENV>
diff --git a/TestON/tests/HA/HAkillNodes/HAkillNodes.params b/TestON/tests/HA/HAkillNodes/HAkillNodes.params
index 409bd1f..6e9587c 100644
--- a/TestON/tests/HA/HAkillNodes/HAkillNodes.params
+++ b/TestON/tests/HA/HAkillNodes/HAkillNodes.params
@@ -30,7 +30,6 @@
<ONOS_Configuration>
<org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
<useFlowObjectives>false</useFlowObjectives>
- <defaultFlowObjectiveCompiler>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</defaultFlowObjectiveCompiler>
</org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
</ONOS_Configuration>
<ENV>
diff --git a/TestON/tests/HA/HAsanity/HAsanity.params b/TestON/tests/HA/HAsanity/HAsanity.params
index 5a9f8f9..c61a207 100644
--- a/TestON/tests/HA/HAsanity/HAsanity.params
+++ b/TestON/tests/HA/HAsanity/HAsanity.params
@@ -29,7 +29,6 @@
<ONOS_Configuration>
<org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
<useFlowObjectives>false</useFlowObjectives>
- <defaultFlowObjectiveCompiler>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</defaultFlowObjectiveCompiler>
</org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
</ONOS_Configuration>
<ENV>
diff --git a/TestON/tests/HA/HAscaling/HAscaling.params b/TestON/tests/HA/HAscaling/HAscaling.params
index 233a55d..8b6fb37 100644
--- a/TestON/tests/HA/HAscaling/HAscaling.params
+++ b/TestON/tests/HA/HAscaling/HAscaling.params
@@ -33,7 +33,6 @@
<ONOS_Configuration>
<org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
<useFlowObjectives>false</useFlowObjectives>
- <defaultFlowObjectiveCompiler>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</defaultFlowObjectiveCompiler>
</org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
</ONOS_Configuration>
<ENV>
diff --git a/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.params b/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.params
index e93e655..549ceab 100644
--- a/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.params
+++ b/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.params
@@ -27,7 +27,6 @@
<ONOS_Configuration>
<org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
<useFlowObjectives>false</useFlowObjectives>
- <defaultFlowObjectiveCompiler>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</defaultFlowObjectiveCompiler>
</org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
</ONOS_Configuration>
<ENV>
diff --git a/TestON/tests/HA/HAstopNodes/HAstopNodes.params b/TestON/tests/HA/HAstopNodes/HAstopNodes.params
index de7f775..3f74ff0 100644
--- a/TestON/tests/HA/HAstopNodes/HAstopNodes.params
+++ b/TestON/tests/HA/HAstopNodes/HAstopNodes.params
@@ -30,7 +30,6 @@
<ONOS_Configuration>
<org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
<useFlowObjectives>false</useFlowObjectives>
- <defaultFlowObjectiveCompiler>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</defaultFlowObjectiveCompiler>
</org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
</ONOS_Configuration>
<ENV>
diff --git a/TestON/tests/HA/HAswapNodes/HAswapNodes.params b/TestON/tests/HA/HAswapNodes/HAswapNodes.params
index f78f98d..1df9ed4 100644
--- a/TestON/tests/HA/HAswapNodes/HAswapNodes.params
+++ b/TestON/tests/HA/HAswapNodes/HAswapNodes.params
@@ -32,7 +32,6 @@
<ONOS_Configuration>
<org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
<useFlowObjectives>false</useFlowObjectives>
- <defaultFlowObjectiveCompiler>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</defaultFlowObjectiveCompiler>
</org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
</ONOS_Configuration>
<ENV>
diff --git a/TestON/tests/HA/HAupgrade/HAupgrade.params b/TestON/tests/HA/HAupgrade/HAupgrade.params
index ba5d077..3379327 100644
--- a/TestON/tests/HA/HAupgrade/HAupgrade.params
+++ b/TestON/tests/HA/HAupgrade/HAupgrade.params
@@ -30,7 +30,6 @@
<ONOS_Configuration>
<org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
<useFlowObjectives>false</useFlowObjectives>
- <defaultFlowObjectiveCompiler>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</defaultFlowObjectiveCompiler>
</org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
</ONOS_Configuration>
<ENV>
diff --git a/TestON/tests/HA/HAupgradeRollback/HAupgradeRollback.params b/TestON/tests/HA/HAupgradeRollback/HAupgradeRollback.params
index ba5d077..3379327 100644
--- a/TestON/tests/HA/HAupgradeRollback/HAupgradeRollback.params
+++ b/TestON/tests/HA/HAupgradeRollback/HAupgradeRollback.params
@@ -30,7 +30,6 @@
<ONOS_Configuration>
<org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
<useFlowObjectives>false</useFlowObjectives>
- <defaultFlowObjectiveCompiler>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</defaultFlowObjectiveCompiler>
</org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
</ONOS_Configuration>
<ENV>
diff --git a/TestON/tests/PLAT/PLATdockertest/PLATdockertest.py b/TestON/tests/PLAT/PLATdockertest/PLATdockertest.py
index d871fae..bc4f3c3 100644
--- a/TestON/tests/PLAT/PLATdockertest/PLATdockertest.py
+++ b/TestON/tests/PLAT/PLATdockertest/PLATdockertest.py
@@ -91,7 +91,7 @@
NODElist = main.params[ "SCALE" ][ "nodelist" ].split( ',' )
main.log.info( "onos container names are: " + ",".join( NODElist ) )
IPlist = list()
- main.testOnDirectory = re.sub( "(/tests)$", "", main.testDir )
+ main.testOnDirectory = re.sub( "(/tests)$", "", main.testsRoot )
CTIDlist = list()
main.log.info( "Check docker status, it not running, try restart it" )
diff --git a/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.params b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.params
index 09c7fc2..b5b769a 100755
--- a/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.params
+++ b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.params
@@ -54,7 +54,6 @@
<ONOS_Configuration>
<org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
<useFlowObjectives>true</useFlowObjectives>
- <defaultFlowObjectiveCompiler>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</defaultFlowObjectiveCompiler>
</org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
</ONOS_Configuration>
</CASE10>
diff --git a/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.params b/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.params
index 73759e5..d7f8c7d 100755
--- a/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.params
+++ b/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.params
@@ -42,7 +42,6 @@
<ONOS_Configuration>
<org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
<useFlowObjectives>true</useFlowObjectives>
- <defaultFlowObjectiveCompiler>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</defaultFlowObjectiveCompiler>
</org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
</ONOS_Configuration>
</CASE10>
diff --git a/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.params b/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.params
index 3a069ca..ad3099e 100644
--- a/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.params
+++ b/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.params
@@ -78,7 +78,6 @@
<intentManager>org.onosproject.net.intent.impl.IntentManager</intentManager>
<intentConfigRegi>org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator</intentConfigRegi>
<nullProvider>org.onosproject.provider.nil.NullProviders</nullProvider>
- <linkCollectionIntent>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</linkCollectionIntent>
<intentPerfInstaller>org.onosproject.intentperf.IntentPerfInstaller</intentPerfInstaller>
</CFG>
<DATABASE>
diff --git a/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py b/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py
index 629dad7..bdd9dd7 100644
--- a/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py
+++ b/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py
@@ -71,7 +71,6 @@
main.intentManagerCfg = main.params[ 'CFG' ][ 'intentManager' ]
main.intentConfigRegiCfg = main.params[ 'CFG' ][ 'intentConfigRegi' ]
main.nullProviderCfg = main.params[ 'CFG' ][ 'nullProvider' ]
- main.linkCollectionIntentCfg = main.params[ 'CFG' ][ 'linkCollectionIntent' ]
main.intentPerfInstallerCfg = main.params[ 'CFG' ][ 'intentPerfInstaller' ]
main.neighbor = ( main.params[ 'TEST' ][ 'neighbors' ] ).split( "," )
main.timeout = int( main.params[ 'SLEEP' ][ 'timeout' ] )
@@ -111,9 +110,6 @@
if main.flowObj:
main.Cluster.active( 0 ).CLI.setCfg( main.intentConfigRegiCfg,
"useFlowObjectives", value="true" )
- main.Cluster.active( 0 ).CLI.setCfg( main.intentConfigRegiCfg,
- "defaultFlowObjectiveCompiler",
- value=main.linkCollectionIntentCfg )
time.sleep( main.startUpSleep )
# balanceMasters
diff --git a/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.params b/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.params
index 126c311..5ab7277 100644
--- a/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.params
+++ b/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.params
@@ -56,7 +56,6 @@
<intentManager>org.onosproject.net.intent.impl.IntentManager</intentManager>
<intentConfigRegi>org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator</intentConfigRegi>
<nullProvider>org.onosproject.provider.nil.NullProviders</nullProvider>
- <linkCollectionIntent>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</linkCollectionIntent>
</CFG>
<CTRL>
<USER>sdn</USER>
diff --git a/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.py b/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.py
index ef1cfb9..8b798bd 100644
--- a/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.py
+++ b/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.py
@@ -69,7 +69,6 @@
main.intentManagerCfg = main.params[ 'CFG' ][ 'intentManager' ]
main.intentConfigRegiCfg = main.params[ 'CFG' ][ 'intentConfigRegi' ]
main.nullProviderCfg = main.params[ 'CFG' ][ 'nullProvider' ]
- main.linkCollectionIntentCfg = main.params[ 'CFG' ][ 'linkCollectionIntent' ]
main.verifyAttempts = int( main.params[ 'ATTEMPTS' ][ 'verify' ] )
main.cfgRetry = int( main.params[ 'ATTEMPTS' ][ 'cfg' ] )
main.maxInvalidRun = int( main.params[ 'ATTEMPTS' ][ 'maxInvalidRun' ] )
@@ -134,10 +133,6 @@
stepResult = stepResult and \
main.Cluster.active( 0 ).CLI.setCfg( main.intentConfigRegiCfg,
"useFlowObjectives", value="true" )
- stepResult = stepResult and \
- main.Cluster.active( 0 ).CLI.setCfg( main.intentConfigRegiCfg,
- "defaultFlowObjectiveCompiler",
- value=main.linkCollectionIntentCfg )
time.sleep( main.startUpSleep )
# balanceMasters
diff --git a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
index 8a758e3..7501bf5 100644
--- a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
+++ b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
@@ -73,7 +73,6 @@
<intentManager>org.onosproject.net.intent.impl.IntentManager</intentManager>
<intentConfigRegi>org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator</intentConfigRegi>
<nullProvider>org.onosproject.provider.nil.NullProviders</nullProvider>
- <linkCollectionIntent>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</linkCollectionIntent>
</CFG>
<CTRL>
<USER>sdn</USER>
diff --git a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
index f5f1f19..7a8a294 100644
--- a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
+++ b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
@@ -77,7 +77,6 @@
main.intentManagerCfg = main.params[ 'CFG' ][ 'intentManager' ]
main.intentConfigRegiCfg = main.params[ 'CFG' ][ 'intentConfigRegi' ]
main.nullProviderCfg = main.params[ 'CFG' ][ 'nullProvider' ]
- main.linkCollectionIntentCfg = main.params[ 'CFG' ][ 'linkCollectionIntent' ]
main.warmUp = int( main.params[ 'TEST' ][ 'warmUp' ] )
main.ingress = main.params[ 'TEST' ][ 'ingress' ]
main.egress = main.params[ 'TEST' ][ 'egress' ]
@@ -151,10 +150,6 @@
main.Cluster.active( 0 ).CLI.setCfg( main.intentConfigRegiCfg,
"useFlowObjectives",
value="true" )
- stepResult = stepResult and \
- main.Cluster.active( 0 ).CLI.setCfg( main.intentConfigRegiCfg,
- "defaultFlowObjectiveCompiler",
- value=main.linkCollectionIntentCfg )
if stepResult:
main.cfgCheck = True
break
diff --git a/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.params b/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.params
index 26fb3f5..5c1ea16 100644
--- a/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.params
+++ b/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.params
@@ -33,7 +33,6 @@
<CFG>
<intentConfigRegi>org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator</intentConfigRegi>
<nullProvider>org.onosproject.provider.nil.NullProviders</nullProvider>
- <linkCollectionIntent>org.onosproject.net.intent.impl.compiler.LinkCollectionIntentObjectiveCompiler</linkCollectionIntent>
</CFG>
<GIT>
<pull>False</pull>
diff --git a/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py b/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
index 674b925..9897b4c 100644
--- a/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
+++ b/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
@@ -66,7 +66,6 @@
main.rerouteSleep = int( main.params[ 'SLEEP' ][ 'reroute' ] )
main.intentConfigRegiCfg = main.params[ 'CFG' ][ 'intentConfigRegi' ]
main.nullProviderCfg = main.params[ 'CFG' ][ 'nullProvider' ]
- main.linkCollectionIntentCfg = main.params[ 'CFG' ][ 'linkCollectionIntent' ]
main.verifyAttempts = int( main.params[ 'ATTEMPTS' ][ 'verify' ] )
main.ingress = main.params[ 'LINK' ][ 'ingress' ]
main.egress = main.params[ 'LINK' ][ 'egress' ]
@@ -211,9 +210,6 @@
if main.flowObj:
main.Cluster.active( 0 ).CLI.setCfg( main.intentConfigRegiCfg,
"useFlowObjectives", value="true" )
- main.Cluster.active( 0 ).CLI.setCfg( main.intentConfigRegiCfg,
- "defaultFlowObjectiveCompiler",
- value=main.linkCollectionIntentCfg )
main.step( 'Starting mininet topology' )
mnStatus = main.Mininet1.startNet( topoFile='~/mininet/custom/rerouteTopo.py' )
utilities.assert_equals( expect=main.TRUE,
diff --git a/TestON/tests/USECASE/SegmentRouting/SRClusterRestart/SRClusterRestart.params b/TestON/tests/USECASE/SegmentRouting/SRClusterRestart/SRClusterRestart.params
index 05222f0..9a0a8a1 100755
--- a/TestON/tests/USECASE/SegmentRouting/SRClusterRestart/SRClusterRestart.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRClusterRestart/SRClusterRestart.params
@@ -20,7 +20,7 @@
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting,openflow,netcfghostprovider,netcfglinksprovider</cellApps>
+ <cellApps>drivers,hostprovider,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 d32d1a6..541c836 100755
--- a/TestON/tests/USECASE/SegmentRouting/SRDynamic/SRDynamic.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRDynamic/SRDynamic.params
@@ -20,7 +20,7 @@
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting,openflow,netcfghostprovider,netcfglinksprovider</cellApps>
+ <cellApps>drivers,hostprovider,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 517e8f0..236a21c 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRHighAvailability/SRHighAvailability.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRHighAvailability/SRHighAvailability.params
@@ -20,7 +20,7 @@
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting,openflow,netcfghostprovider,netcfglinksprovider</cellApps>
+ <cellApps>drivers,hostprovider,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 7c546d4..098f9da 100755
--- a/TestON/tests/USECASE/SegmentRouting/SRLinkFailure/SRLinkFailure.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRLinkFailure/SRLinkFailure.params
@@ -20,7 +20,7 @@
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting,openflow,netcfghostprovider,netcfglinksprovider</cellApps>
+ <cellApps>drivers,hostprovider,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 05222f0..9a0a8a1 100755
--- a/TestON/tests/USECASE/SegmentRouting/SROnosFailure/SROnosFailure.params
+++ b/TestON/tests/USECASE/SegmentRouting/SROnosFailure/SROnosFailure.params
@@ -20,7 +20,7 @@
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting,openflow,netcfghostprovider,netcfglinksprovider</cellApps>
+ <cellApps>drivers,hostprovider,segmentrouting,openflow-base,netcfghostprovider,netcfglinksprovider</cellApps>
</ENV>
<GIT>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
index dddc584..07f1260 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
@@ -18,6 +18,7 @@
ipv4=1,
ipv6=0,
countFlowsGroups=False,
+ linkFailure=False,
description="Ping between all ipv4 hosts in the topology" )
def CASE2( self, main ):
@@ -35,6 +36,7 @@
ipv4=0,
ipv6=1,
countFlowsGroups=False,
+ linkFailure=False,
description="Ping between all ipv6 hosts in the topology" )
def CASE3( self, main ):
@@ -52,6 +54,7 @@
ipv4=1,
ipv6=1,
countFlowsGroups=False,
+ linkFailure=False,
description="Ping between all ipv4 and ipv6 hosts in the topology" )
def CASE4( self, main ):
@@ -70,6 +73,7 @@
ipv6=0,
description="Ping between all ipv4 hosts in the topology and check connectivity to external hosts",
checkExternalHost=True,
+ linkFailure=False,
countFlowsGroups=False )
def CASE5( self, main ):
@@ -88,6 +92,7 @@
ipv6=1,
description="Ping between all ipv6 hosts in the topology and check connectivity to external hosts",
checkExternalHost=True,
+ linkFailure=False,
countFlowsGroups=False )
def CASE6( self, main ):
@@ -106,6 +111,7 @@
ipv6=1,
description="Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external hosts",
checkExternalHost=True,
+ linkFailure=False,
countFlowsGroups=False )
def CASE7( self, main ):
@@ -127,6 +133,7 @@
description="Ping between from ipv4 hosts to external host configured with route-add command.",
checkExternalHost=False,
countFlowsGroups=False,
+ linkFailure=False,
staticRouteConfigure=True )
def CASE8( self, main ):
@@ -148,6 +155,7 @@
description="Ping between from ipv6 hosts to external host configured with route-add command.",
checkExternalHost=False,
countFlowsGroups=False,
+ linkFailure=False,
staticRouteConfigure=True )
def CASE9( self, main ):
@@ -169,8 +177,198 @@
description="Ping between from ipv4 and ipv6 hosts to external hosts configured with route-add command.",
checkExternalHost=False,
countFlowsGroups=False,
+ linkFailure=False,
staticRouteConfigure=True )
+ def CASE101( self, main ):
+ """
+ Kill and recover links
+ Ping between all ipv4 hosts in the topology.
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=101,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=1,
+ ipv6=0,
+ countFlowsGroups=False,
+ linkFailure=True,
+ description="Test link failures with IPv4 hosts",
+ switchFailure=False )
+
+ def CASE102( self, main ):
+ """
+ Kill and recover links
+ Ping between all ipv6 hosts in the topology.
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=102,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=0,
+ ipv6=1,
+ countFlowsGroups=False,
+ linkFailure=True,
+ description="Test link failures with IPv6 hosts",
+ switchFailure=False )
+
+ def CASE103( self, main ):
+ """
+ Kill and recover links
+ Ping between all ipv4 and ipv6 hosts in the topology.
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=103,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=1,
+ ipv6=1,
+ countFlowsGroups=False,
+ linkFailure=True,
+ description="Test link failures with IPv4 and IPv6 hosts",
+ switchFailure=False )
+
+ def CASE104( self, main ):
+ """
+ Kill and recover links
+ Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=104,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=1,
+ ipv6=0,
+ description="Test link failures with IPv4 hosts (including external hosts)",
+ checkExternalHost=True,
+ linkFailure=True,
+ switchFailure=False )
+
+ def CASE105( self, main ):
+ """
+ Kill and recover links
+ Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=105,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=0,
+ ipv6=1,
+ description="Test link failures with IPv6 hosts (including external hosts)",
+ checkExternalHost=True,
+ linkFailure=True,
+ switchFailure=False )
+
+ def CASE106( self, main ):
+ """
+ Kill and recover links
+ Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=106,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=1,
+ ipv6=1,
+ description="Test link failures with IPv4 and IPv6 hosts (including external hosts)",
+ checkExternalHost=True,
+ linkFailure=True,
+ switchFailure=False )
+
+ def CASE107( self, main ):
+ """
+ Kill and recover links
+ Ping between ipv4 hosts and an external host that is not configured in
+ external router config, but reachable through the use of route-add command.
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=107,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=1,
+ ipv6=0,
+ description="Test link failures with IPv4 hosts (including external host configured with route-add command)",
+ checkExternalHost=False,
+ countFlowsGroups=False,
+ linkFailure=True,
+ staticRouteConfigure=True,
+ switchFailure=False )
+
+ def CASE108( self, main ):
+ """
+ Kill and recover links
+ Ping between ipv6 hosts and an external host that is not configured in
+ external router config, but reachable through the use of route-add command.
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=108,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=0,
+ ipv6=1,
+ description="Test link failures with IPv6 hosts (including external host configured with route-add command)",
+ checkExternalHost=False,
+ countFlowsGroups=False,
+ linkFailure=True,
+ staticRouteConfigure=True,
+ switchFailure=False )
+
+ def CASE109( self, main ):
+ """
+ Kill and recover links
+ Ping between ipv4 and pv6 hosts and external hosts that is not configured in
+ external router config, but reachable through the use of route-add command.
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=109,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=1,
+ ipv6=1,
+ description="Test link failures with IPv4 and IPv6 hosts (including external host configured with route-add command)",
+ checkExternalHost=False,
+ countFlowsGroups=False,
+ linkFailure=True,
+ staticRouteConfigure=True,
+ switchFailure=False )
+
def CASE201( self, main ):
"""
Kill and recover spine switches
@@ -187,6 +385,7 @@
ipv4=1,
ipv6=0,
countFlowsGroups=False,
+ linkFailure=False,
description="Test switch failures with IPv4 hosts",
switchFailure=True )
@@ -206,6 +405,7 @@
ipv4=0,
ipv6=1,
countFlowsGroups=False,
+ linkFailure=False,
description="Test switch failures with IPv6 hosts",
switchFailure=True )
@@ -225,6 +425,7 @@
ipv4=1,
ipv6=1,
countFlowsGroups=False,
+ linkFailure=False,
description="Test switch failures with IPv4 and IPv6 hosts",
switchFailure=True )
@@ -245,6 +446,7 @@
ipv6=0,
description="Test switch failures with IPv4 hosts (including external hosts)",
checkExternalHost=True,
+ linkFailure=False,
switchFailure=True )
def CASE205( self, main ):
@@ -264,6 +466,7 @@
ipv6=1,
description="Test switch failures with IPv6 hosts (including external hosts)",
checkExternalHost=True,
+ linkFailure=False,
switchFailure=True )
def CASE206( self, main ):
@@ -283,6 +486,7 @@
ipv6=1,
description="Test switch failures with IPv4 and IPv6 hosts (including external hosts)",
checkExternalHost=True,
+ linkFailure=False,
switchFailure=True )
def CASE207( self, main ):
@@ -304,6 +508,7 @@
description="Test switch failures with IPv4 hosts (including external host configured with route-add command)",
checkExternalHost=False,
countFlowsGroups=False,
+ linkFailure=False,
staticRouteConfigure=True,
switchFailure=True )
@@ -326,6 +531,7 @@
description="Test switch failures with IPv6 hosts (including external host configured with route-add command)",
checkExternalHost=False,
countFlowsGroups=False,
+ linkFailure=False,
staticRouteConfigure=True,
switchFailure=True )
@@ -348,5 +554,187 @@
description="Test switch failures with IPv4 and IPv6 hosts (including external host configured with route-add command)",
checkExternalHost=False,
countFlowsGroups=False,
+ linkFailure=False,
staticRouteConfigure=True,
switchFailure=True )
+
+ def CASE301( self, main ):
+ """
+ Kill and recover ONOS nodes
+ Ping between all ipv4 hosts in the topology.
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=301,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=1,
+ ipv6=0,
+ countFlowsGroups=False,
+ description="Test node failures with IPv4 hosts",
+ nodeFailure=True )
+
+ def CASE302( self, main ):
+ """
+ Kill and recover ONOS nodes
+ Ping between all ipv6 hosts in the topology.
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=302,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=0,
+ ipv6=1,
+ countFlowsGroups=False,
+ description="Test node failures with IPv6 hosts",
+ nodeFailure=True )
+
+ def CASE303( self, main ):
+ """
+ Kill and recover ONOS nodes
+ Ping between all ipv4 and ipv6 hosts in the topology.
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=303,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=1,
+ ipv6=1,
+ countFlowsGroups=False,
+ description="Test node failures with IPv4 and IPv6 hosts",
+ nodeFailure=True )
+
+ def CASE304( self, main ):
+ """
+ Kill and recover ONOS nodes
+ Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=304,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=1,
+ ipv6=0,
+ description="Test node failures with IPv4 hosts (including external hosts)",
+ checkExternalHost=True,
+ nodeFailure=True )
+
+ def CASE305( self, main ):
+ """
+ Kill and recover ONOS nodes
+ Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=305,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=0,
+ ipv6=1,
+ description="Test node failures with IPv6 hosts (including external hosts)",
+ checkExternalHost=True,
+ nodeFailure=True )
+
+ def CASE306( self, main ):
+ """
+ Kill and recover ONOS nodes
+ Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=306,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=1,
+ ipv6=1,
+ description="Test node failures with IPv4 and IPv6 hosts (including external hosts)",
+ checkExternalHost=True,
+ nodeFailure=True )
+
+ def CASE307( self, main ):
+ """
+ Kill and recover ONOS nodes
+ Ping between ipv4 hosts and an external host that is not configured in
+ external router config, but reachable through the use of route-add command.
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=307,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=1,
+ ipv6=0,
+ description="Test node failures with IPv4 hosts (including external host configured with route-add command)",
+ checkExternalHost=False,
+ countFlowsGroups=False,
+ staticRouteConfigure=True,
+ nodeFailure=True )
+
+ def CASE308( self, main ):
+ """
+ Kill and recover ONOS nodes
+ Ping between ipv6 hosts and an external host that is not configured in
+ external router config, but reachable through the use of route-add command.
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=308,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=0,
+ ipv6=1,
+ description="Test node failures with IPv6 hosts (including external host configured with route-add command)",
+ checkExternalHost=False,
+ countFlowsGroups=False,
+ staticRouteConfigure=True,
+ nodeFailure=True )
+
+ def CASE309( self, main ):
+ """
+ Kill and recover ONOS nodes
+ Ping between ipv4 and pv6 hosts and external hosts that is not configured in
+ external router config, but reachable through the use of route-add command.
+ """
+
+ from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+ SRRoutingTest.runTest( main,
+ test_idx=309,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=1,
+ ipv6=1,
+ description="Test node failures with IPv4 and IPv6 hosts (including external host configured with route-add command)",
+ checkExternalHost=False,
+ countFlowsGroups=False,
+ staticRouteConfigure=True,
+ nodeFailure=True )
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
index eb747b0..f5a7dfb 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
@@ -21,6 +21,7 @@
from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run
import time
+import json
class SRRoutingTest ():
@@ -32,7 +33,8 @@
@staticmethod
def runTest( main, test_idx, onosNodes, dhcp, routers, ipv4, ipv6,
description, countFlowsGroups=False, checkExternalHost=False,
- staticRouteConfigure=False, switchFailure=False ):
+ staticRouteConfigure=False, switchFailure=False, linkFailure=False,
+ nodeFailure=False ):
skipPackage = False
init = False
@@ -53,7 +55,7 @@
if staticRouteConfigure:
main.cfgName += '_static=1'
- main.resultFileName = 'CASE%02d' % test_idx
+ main.resultFileName = 'CASE%03d' % test_idx
main.Cluster.setRunningNode( onosNodes )
run.installOnos( main, skipPackage=skipPackage, cliSleep=5,
@@ -75,6 +77,8 @@
run.loadCount( main )
if switchFailure:
run.loadSwitchFailureChart( main )
+ if linkFailure:
+ run.loadLinkFailureChart( main )
# wait some time
time.sleep( 5 )
@@ -95,7 +99,7 @@
time.sleep( 60 )
# ping hosts
- run.pingAll( main, 'CASE%02d' % test_idx, acceptableFailed=5, basedOnIp=True )
+ run.pingAll( main, 'CASE%03d' % test_idx, acceptableFailed=5, basedOnIp=True )
# check flows / groups numbers
if countFlowsGroups:
@@ -105,14 +109,55 @@
if switchFailure:
for switch, expected in main.switchFailureChart.items():
run.killSwitch( main, switch, expected['switches_after_failure'], expected['links_after_failure'] )
- run.pingAll( main, 'CASE%02d' % test_idx, acceptableFailed=5, basedOnIp=True )
+ run.pingAll( main, 'CASE%03d' % test_idx, acceptableFailed=5, basedOnIp=True )
if countFlowsGroups:
run.checkFlowsGroupsFromFile(main)
run.recoverSwitch( main, switch, expected['switches_before_failure'], expected['links_before_failure'] )
- run.pingAll( main, 'CASE%02d' % test_idx, acceptableFailed=5, basedOnIp=True )
+ run.pingAll( main, 'CASE%03d' % test_idx, acceptableFailed=5, basedOnIp=True )
if countFlowsGroups:
run.checkFlowsGroupsFromFile(main)
+ # Test link failures
+ if linkFailure:
+ for link_batch_name, info in main.linkFailureChart.items():
+
+ linksToRemove = info['links'].values()
+ linksBefore = info['links_before']
+ linksAfter = info['links_after']
+
+ run.killLinkBatch( main, linksToRemove, linksAfter )
+ run.pingAll( main, 'CASE%03d' % test_idx, acceptableFailed=5, basedOnIp=True )
+
+ run.restoreLinkBatch( main, linksToRemove, linksBefore )
+ run.pingAll( main, 'CASE%03d' % test_idx, acceptableFailed=5, basedOnIp=True )
+ if countFlowsGroups:
+ run.checkFlowsGroupsFromFile(main)
+
+ # Test node failures
+ if nodeFailure:
+ numCtrls = len( main.Cluster.runningNodes )
+ links = len( json.loads( main.Cluster.next().links() ) )
+ switches = len( json.loads( main.Cluster.next().devices() ) )
+ for ctrl in xrange( numCtrls ):
+ # Kill node
+ run.killOnos( main, [ ctrl ], switches, links, ( numCtrls - 1 ) )
+ time.sleep( float( main.params[ 'timers' ][ 'SwitchDiscovery' ] ) )
+ main.Cluster.active(0).CLI.balanceMasters()
+ time.sleep( float( main.params[ 'timers' ][ 'SwitchDiscovery' ] ) )
+ run.pingAll( main, 'CASE%03d' % test_idx, acceptableFailed=5, basedOnIp=True )
+ if countFlowsGroups:
+ run.checkFlowsGroupsFromFile( main )
+
+ # Recover node
+ run.recoverOnos( main, [ ctrl ], switches, links, numCtrls )
+ time.sleep( float( main.params[ 'timers' ][ 'SwitchDiscovery' ] ) )
+ main.Cluster.active(0).CLI.balanceMasters()
+ time.sleep( float( main.params[ 'timers' ][ 'SwitchDiscovery' ] ) )
+ run.pingAll( main, 'CASE%03d' % test_idx, acceptableFailed=5, basedOnIp=True )
+ if countFlowsGroups:
+ run.checkFlowsGroupsFromFile( main )
+
+ # Cleanup
if hasattr( main, 'Mininet1' ):
run.cleanup( main )
else:
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+ "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+ "link2" : ["leaf2", "spine101"],
+ "link3" : ["leaf3", "spine101"],
+ "link4" : ["leaf4", "spine101"],
+ "link5" : ["leaf5", "spine101"] },
+ "links_before" : 40,
+ "links_after" : 22 },
+ "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+ "link2" : ["leaf2", "spine102"],
+ "link3" : ["leaf3", "spine102"],
+ "link4" : ["leaf4", "spine102"],
+ "link5" : ["leaf5", "spine102"] },
+ "links_before" : 40,
+ "links_after" : 22 }
+
+
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+ "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+ "link2" : ["leaf2", "spine101"],
+ "link3" : ["leaf3", "spine101"],
+ "link4" : ["leaf4", "spine101"],
+ "link5" : ["leaf5", "spine101"] },
+ "links_before" : 40,
+ "links_after" : 22 },
+ "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+ "link2" : ["leaf2", "spine102"],
+ "link3" : ["leaf3", "spine102"],
+ "link4" : ["leaf4", "spine102"],
+ "link5" : ["leaf5", "spine102"] },
+ "links_before" : 40,
+ "links_after" : 22 }
+
+
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_static=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_static=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_static=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+ "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+ "link2" : ["leaf2", "spine101"],
+ "link3" : ["leaf3", "spine101"],
+ "link4" : ["leaf4", "spine101"],
+ "link5" : ["leaf5", "spine101"] },
+ "links_before" : 40,
+ "links_after" : 22 },
+ "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+ "link2" : ["leaf2", "spine102"],
+ "link3" : ["leaf3", "spine102"],
+ "link4" : ["leaf4", "spine102"],
+ "link5" : ["leaf5", "spine102"] },
+ "links_before" : 40,
+ "links_after" : 22 }
+
+
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+ "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+ "link2" : ["leaf2", "spine101"],
+ "link3" : ["leaf3", "spine101"],
+ "link4" : ["leaf4", "spine101"],
+ "link5" : ["leaf5", "spine101"] },
+ "links_before" : 40,
+ "links_after" : 22 },
+ "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+ "link2" : ["leaf2", "spine102"],
+ "link3" : ["leaf3", "spine102"],
+ "link4" : ["leaf4", "spine102"],
+ "link5" : ["leaf5", "spine102"] },
+ "links_before" : 40,
+ "links_after" : 22 }
+
+
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+ "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+ "link2" : ["leaf2", "spine101"],
+ "link3" : ["leaf3", "spine101"],
+ "link4" : ["leaf4", "spine101"],
+ "link5" : ["leaf5", "spine101"] },
+ "links_before" : 40,
+ "links_after" : 22 },
+ "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+ "link2" : ["leaf2", "spine102"],
+ "link3" : ["leaf3", "spine102"],
+ "link4" : ["leaf4", "spine102"],
+ "link5" : ["leaf5", "spine102"] },
+ "links_before" : 40,
+ "links_after" : 22 }
+
+
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_static=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_static=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_static=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+ "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+ "link2" : ["leaf2", "spine101"],
+ "link3" : ["leaf3", "spine101"],
+ "link4" : ["leaf4", "spine101"],
+ "link5" : ["leaf5", "spine101"] },
+ "links_before" : 40,
+ "links_after" : 22 },
+ "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+ "link2" : ["leaf2", "spine102"],
+ "link3" : ["leaf3", "spine102"],
+ "link4" : ["leaf4", "spine102"],
+ "link5" : ["leaf5", "spine102"] },
+ "links_before" : 40,
+ "links_after" : 22 }
+
+
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+ "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+ "link2" : ["leaf2", "spine101"],
+ "link3" : ["leaf3", "spine101"],
+ "link4" : ["leaf4", "spine101"],
+ "link5" : ["leaf5", "spine101"] },
+ "links_before" : 40,
+ "links_after" : 22 },
+ "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+ "link2" : ["leaf2", "spine102"],
+ "link3" : ["leaf3", "spine102"],
+ "link4" : ["leaf4", "spine102"],
+ "link5" : ["leaf5", "spine102"] },
+ "links_before" : 40,
+ "links_after" : 22 }
+
+
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+ "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+ "link2" : ["leaf2", "spine101"],
+ "link3" : ["leaf3", "spine101"],
+ "link4" : ["leaf4", "spine101"],
+ "link5" : ["leaf5", "spine101"] },
+ "links_before" : 40,
+ "links_after" : 22 },
+ "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+ "link2" : ["leaf2", "spine102"],
+ "link3" : ["leaf3", "spine102"],
+ "link4" : ["leaf4", "spine102"],
+ "link5" : ["leaf5", "spine102"] },
+ "links_before" : 40,
+ "links_after" : 22 }
+
+
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_static=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_static=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_static=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+ "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+ "link2" : ["leaf2", "spine101"],
+ "link3" : ["leaf3", "spine101"],
+ "link4" : ["leaf4", "spine101"],
+ "link5" : ["leaf5", "spine101"] },
+ "links_before" : 40,
+ "links_after" : 22 },
+ "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+ "link2" : ["leaf2", "spine102"],
+ "link3" : ["leaf3", "spine102"],
+ "link4" : ["leaf4", "spine102"],
+ "link5" : ["leaf5", "spine102"] },
+ "links_before" : 40,
+ "links_after" : 22 }
+
+
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRSanity/SRSanity.params b/TestON/tests/USECASE/SegmentRouting/SRSanity/SRSanity.params
index d32d1a6..541c836 100755
--- a/TestON/tests/USECASE/SegmentRouting/SRSanity/SRSanity.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRSanity/SRSanity.params
@@ -20,7 +20,7 @@
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting,openflow,netcfghostprovider,netcfglinksprovider</cellApps>
+ <cellApps>drivers,hostprovider,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 7c546d4..098f9da 100755
--- a/TestON/tests/USECASE/SegmentRouting/SRSwitchFailure/SRSwitchFailure.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRSwitchFailure/SRSwitchFailure.params
@@ -20,7 +20,7 @@
<ENV>
<cellName>productionCell</cellName>
- <cellApps>drivers,segmentrouting,openflow,netcfghostprovider,netcfglinksprovider</cellApps>
+ <cellApps>drivers,hostprovider,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 d8c537e..5455847 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -66,6 +66,7 @@
main.forConfig = "conf/"
main.forHost = "host/"
main.forSwitchFailure = "switchFailure/"
+ main.forLinkFailure = "linkFailure/"
main.topology = main.params[ 'DEPENDENCY' ][ 'topology' ]
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
@@ -96,8 +97,8 @@
# main.scale[ 0 ] determines the current number of ONOS controller
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() ) )
+ main.log.info( "Cluster size: " + str( main.Cluster.numCtrls ) )
+ main.log.info( "Cluster ips: " + ', '.join( main.Cluster.getIps() ) )
main.dynamicHosts = [ 'in1', 'out1' ]
main.testSetUp.ONOSSetUp( main.Cluster, newCell=True, cellName=main.cellName,
skipPack=skipPackage,
@@ -155,6 +156,12 @@
main.switchFailureChart = json.load( sfc )
@staticmethod
+ def loadLinkFailureChart( main ):
+ with open( "%s%s.linkFailureChart" % ( main.configPath + main.forLinkFailure,
+ main.cfgName ) ) as sfc:
+ main.linkFailureChart = json.load( sfc )
+
+ @staticmethod
def startMininet( main, topology, args="" ):
copyResult = main.ONOSbench.scp( main.Mininet1,
main.topoPath + main.topology,
@@ -273,7 +280,7 @@
@staticmethod
def checkFlows( main, minFlowCount, tag="", dumpflows=True, sleep=10 ):
main.step(
- " Check whether the flow count is bigger than %s" % minFlowCount )
+ "Check whether the flow count is bigger than %s" % minFlowCount )
if tag == "":
tag = 'CASE%d' % main.CurrentTestCaseNumber
count = utilities.retry( main.Cluster.active( 0 ).CLI.checkFlowCount,
@@ -473,6 +480,54 @@
onfail="Failed to turn off link?" )
@staticmethod
+ def killLinkBatch( main, links, linksAfter, switches=7):
+ """
+ links = list of links (src, dst) to bring down.
+ """
+
+ main.step("Killing a batch of links {0}".format(links))
+
+ for end1, end2 in links:
+ main.Network.link( END1=end1, END2=end2, OPTION="down")
+ main.Network.link( END1=end2, END2=end1, OPTION="down")
+
+ main.linkSleep = float( main.params[ 'timers' ][ 'LinkDiscovery' ] )
+ main.log.info(
+ "Waiting %s seconds for links down to be discovered" % main.linkSleep )
+ time.sleep( main.linkSleep )
+
+ topology = utilities.retry( main.Cluster.active( 0 ).CLI.checkStatus,
+ main.FALSE,
+ kwargs={ 'numoswitch': switches,
+ 'numolink': linksAfter },
+ attempts=10,
+ sleep=main.linkSleep )
+
+ @staticmethod
+ def restoreLinkBatch( main, links, linksAfter, switches=7):
+ """
+ links = list of link (src, dst) to bring up again.
+ """
+
+ main.step("Restoring a batch of links {0}".format(links))
+
+ for end1, end2 in links:
+ main.Network.link( END1=end1, END2=end2, OPTION="up")
+ main.Network.link( END1=end2, END2=end1, OPTION="up")
+
+ main.linkSleep = float( main.params[ 'timers' ][ 'LinkDiscovery' ] )
+ main.log.info(
+ "Waiting %s seconds for links down to be discovered" % main.linkSleep )
+ time.sleep( main.linkSleep )
+
+ topology = utilities.retry( main.Cluster.active( 0 ).CLI.checkStatus,
+ main.FALSE,
+ kwargs={ 'numoswitch': switches,
+ 'numolink': linksAfter },
+ attempts=10,
+ sleep=main.linkSleep )
+
+ @staticmethod
def restoreLink( main, end1, end2, dpid1, dpid2, port1, port2, switches,
links ):
"""
@@ -588,7 +643,7 @@
switches, links, nodes: number of expected switches, links and nodes after KillOnos, ex.: '4', '6'
Completely Kill an ONOS instance and verify the ONOS cluster can see the proper change
"""
- main.step( "Killing ONOS instance" )
+ main.step( "Killing ONOS instances with index(es): {}".format( nodes ) )
for i in nodes:
killResult = main.ONOSbench.onosDie( main.Cluster.runningNodes[ i ].ipAddress )
@@ -635,7 +690,7 @@
switches, links, nodes: number of expected switches, links and nodes after recoverOnos, ex.: '4', '6'
Recover an ONOS instance and verify the ONOS cluster can see the proper change
"""
- main.step( "Recovering ONOS instance" )
+ main.step( "Recovering ONOS instances with index(es): {}".format( nodes ) )
[ main.ONOSbench.onosStart( main.Cluster.runningNodes[ i ].ipAddress ) for i in nodes ]
for i in nodes:
isUp = main.ONOSbench.isup( main.Cluster.runningNodes[ i ].ipAddress )
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/trellislib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/trellislib.py
index f4c1df0..b87ec9f 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/trellislib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/trellislib.py
@@ -4,6 +4,7 @@
Libraries for Trellis hosts.
"""
+import time
import sys
sys.path.append('..')
from mininet.node import Host
@@ -46,26 +47,40 @@
def config(self, **kwargs):
super(DualHomedRoutedHost, self).config(**kwargs)
- intf0 = self.intfs[0].name
- intf1 = self.intfs[1].name
- self.bond0 = "%s-bond0" % self.name
- self.cmd('modprobe bonding')
- self.cmd('ip link add %s type bond' % self.bond0)
- self.cmd('ip link set %s down' % intf0)
- self.cmd('ip link set %s down' % intf1)
- self.cmd('ip link set %s master %s' % (intf0, self.bond0))
- self.cmd('ip link set %s master %s' % (intf1, self.bond0))
- self.cmd('ip addr flush dev %s' % intf0)
- self.cmd('ip addr flush dev %s' % intf1)
- self.cmd('ip link set %s up' % self.bond0)
+ self.bondIntfs( self.intfs[0], self.intfs[1] )
for ip in self.ips:
self.cmd('ip addr add %s dev %s' % (ip, self.bond0))
self.cmd('ip route add default via %s' % self.gateway)
- default_intf = self.defaultIntf()
- default_intf.name = self.bond0
- self.nameToIntf[self.bond0] = default_intf
+
+ def bondIntfs( self, intf1, intf2, bondedName="bond0" ):
+ '''
+ Bond two interfaces together
+ intf1 - the first interface to bond
+ intf2 - the second interface to bond
+ bondedName - the prefix of the new interface name
+ '''
+ # Setup bonded interface
+ # TODO: support multiple bonded interfaces. Maybe just changed self.bond0 to a list of bonded intf names?
+ self.bond0 = "%s-%s" % ( self.name, bondedName )
+ self.cmd('modprobe bonding')
+ self.cmd('ip link add %s type bond' % self.bond0)
+ self.cmd('ip link set %s down' % intf1.name)
+ self.cmd('ip link set %s down' % intf2.name)
+ self.cmd('ip link set %s master %s' % (intf1.name, self.bond0))
+ self.cmd('ip link set %s master %s' % (intf2.name, self.bond0))
+ self.cmd('ip addr flush dev %s' % intf1.name)
+ self.cmd('ip addr flush dev %s' % intf2.name)
+ self.cmd('ip link set %s up' % self.bond0)
+ # NOTE: Issues with bonded intfs in mn data structures. Either only show bonded intf
+ # or create a custom class to handle bonded infs??
+ lowestIntf = min( [ intf1, intf2 ] )
+ highestIntf = max( [ intf1, intf2 ] )
+ lowestIntf.name = self.bond0
+ self.nameToIntf[self.bond0] = lowestIntf
+ del self.intfs[ self.ports[ highestIntf ] ]
+ del self.ports[ highestIntf ]
def terminate(self, **kwargs):
self.cmd('ip link set %s down' % self.bond0)
@@ -231,19 +246,36 @@
def config(self, **kwargs):
super(DualHomedDhcpClient, self).config(**kwargs)
- intf0 = self.intfs[0].name
- intf1 = self.intfs[1].name
- self.bond0 = "%s-bond0" % self.name
+ self.bondIntfs( self.intfs[0], self.intfs[1] )
+ self.cmd('dhclient -q -4 -nw -pf %s %s' % (self.pidFile, self.bond0))
+
+ def bondIntfs( self, intf1, intf2, bondedName="bond0" ):
+ '''
+ Bond two interfaces together
+ intf1 - the first interface to bond
+ intf2 - the second interface to bond
+ bondedName - the prefix of the new interface name
+ '''
+ # Setup bonded interface
+ # TODO: support multiple bonded interfaces. Maybe just changed self.bond0 to a list of bonded intf names?
+ self.bond0 = "%s-%s" % ( self.name, bondedName )
self.cmd('modprobe bonding')
self.cmd('ip link add %s type bond' % self.bond0)
- self.cmd('ip link set %s down' % intf0)
- self.cmd('ip link set %s down' % intf1)
- self.cmd('ip link set %s master %s' % (intf0, self.bond0))
- self.cmd('ip link set %s master %s' % (intf1, self.bond0))
- self.cmd('ip addr flush dev %s' % intf0)
- self.cmd('ip addr flush dev %s' % intf1)
+ self.cmd('ip link set %s down' % intf1.name)
+ self.cmd('ip link set %s down' % intf2.name)
+ self.cmd('ip link set %s master %s' % (intf1.name, self.bond0))
+ self.cmd('ip link set %s master %s' % (intf2.name, self.bond0))
+ self.cmd('ip addr flush dev %s' % intf1.name)
+ self.cmd('ip addr flush dev %s' % intf2.name)
self.cmd('ip link set %s up' % self.bond0)
- self.cmd('dhclient -q -4 -nw -pf %s %s' % (self.pidFile, self.bond0))
+ # NOTE: Issues with bonded intfs in mn data structures. Either only show bonded intf
+ # or create a custom class to handle bonded infs??
+ lowestIntf = min( [ intf1, intf2 ] )
+ highestIntf = max( [ intf1, intf2 ] )
+ lowestIntf.name = self.bond0
+ self.nameToIntf[self.bond0] = lowestIntf
+ del self.intfs[ self.ports[ highestIntf ] ]
+ del self.ports[ highestIntf ]
def terminate(self, **kwargs):
self.cmd('ip link set %s down' % self.bond0)
@@ -278,22 +310,7 @@
super(TrellisHost, self).config(**kwargs)
if self.dualHomed:
- # Setup bond0 interface
- intf0 = self.intfs[0].name
- intf1 = self.intfs[1].name
- self.bond0 = "%s-bond0" % self.name
- self.cmd('modprobe bonding')
- self.cmd('ip link add %s type bond' % self.bond0)
- self.cmd('ip link set %s down' % intf0)
- self.cmd('ip link set %s down' % intf1)
- self.cmd('ip link set %s master %s' % (intf0, self.bond0))
- self.cmd('ip link set %s master %s' % (intf1, self.bond0))
- self.cmd('ip addr flush dev %s' % intf0)
- self.cmd('ip addr flush dev %s' % intf1)
- self.cmd('ip link set %s up' % self.bond0)
- defaultIntf = self.defaultIntf()
- defaultIntf.name = self.bond0
- self.nameToIntf[self.bond0] = defaultIntf
+ self.bondIntfs( self.intfs[0], self.intfs[1] )
self.cmd('ip %s addr flush dev %s' % ("-4" if self.ipv6 else "", self.defaultIntf()))
@@ -307,6 +324,7 @@
self.nameToIntf[self.vlanIntf] = defaultIntf
if self.dhcpClient:
+ time.sleep(3)
self.cmd('dhclient -q -%s -nw -pf %s -lf %s %s' % (6 if self.ipv6 else 4, self.pidFile, self.leaseFile, self.defaultIntf()))
else:
# Setup IP addresses
@@ -321,6 +339,34 @@
self.cmd('touch %s' % self.leasesFile)
self.cmd('%s -q -%s -pf %s -cf %s %s' % (self.binFile, 6 if self.ipv6 else 4, self.pidFile, self.configFile, self.defaultIntf()))
+ def bondIntfs( self, intf1, intf2, bondedName="bond0" ):
+ '''
+ Bond two interfaces together
+ intf1 - the first interface to bond
+ intf2 - the second interface to bond
+ bondedName - the prefix of the new interface name
+ '''
+ # Setup bonded interface
+ # TODO: support multiple bonded interfaces. Maybe just changed self.bond0 to a list of bonded intf names?
+ self.bond0 = "%s-%s" % ( self.name, bondedName )
+ self.cmd('modprobe bonding')
+ self.cmd('ip link add %s type bond' % self.bond0)
+ self.cmd('ip link set %s down' % intf1.name)
+ self.cmd('ip link set %s down' % intf2.name)
+ self.cmd('ip link set %s master %s' % (intf1.name, self.bond0))
+ self.cmd('ip link set %s master %s' % (intf2.name, self.bond0))
+ self.cmd('ip addr flush dev %s' % intf1.name)
+ self.cmd('ip addr flush dev %s' % intf2.name)
+ self.cmd('ip link set %s up' % self.bond0)
+ # NOTE: Issues with bonded intfs in mn data structures. Either only show bonded intf
+ # or create a custom class to handle bonded infs??
+ lowestIntf = min( [ intf1, intf2 ] )
+ highestIntf = max( [ intf1, intf2 ] )
+ lowestIntf.name = self.bond0
+ self.nameToIntf[self.bond0] = lowestIntf
+ del self.intfs[ self.ports[ highestIntf ] ]
+ del self.ports[ highestIntf ]
+
def terminate(self, **kwargs):
if self.vlan:
self.cmd('ip link remove link %s' % self.vlanIntf)
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py b/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py
index a45bdef..573f16d 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py
@@ -33,7 +33,7 @@
"""
import os
main.case( "Setup the Mininet testbed" )
- main.dependencyPath = main.testDir + \
+ main.dependencyPath = main.testsRoot + \
main.params[ 'DEPENDENCY' ][ 'path' ]
main.topology = main.params[ 'DEPENDENCY' ][ 'topology' ]
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
index 499df34..b984b1d 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
@@ -33,7 +33,7 @@
"""
import imp
main.case( "Setup the Mininet testbed" )
- main.dependencyPath = main.testDir + \
+ main.dependencyPath = main.testsRoot + \
main.params[ 'DEPENDENCY' ][ 'path' ]
main.topology = main.params[ 'DEPENDENCY' ][ 'topology' ]
diff --git a/TestON/tests/dependencies/ONOSSetup.py b/TestON/tests/dependencies/ONOSSetup.py
index ca10d3a..ee339be 100644
--- a/TestON/tests/dependencies/ONOSSetup.py
+++ b/TestON/tests/dependencies/ONOSSetup.py
@@ -46,7 +46,7 @@
except ( NameError, AttributeError ):
main.Cluster = Cluster( main.ONOScell.nodes )
main.ONOSbench = main.Cluster.controllers[ 0 ].Bench
- main.testOnDirectory = re.sub( "(/tests)$", "", main.testDir )
+ main.testOnDirectory = re.sub( "(/tests)$", "", main.testsRoot )
def gitPulling( self, includeCaseDesc=True ):
"""