Merge "Sleep 5s after onos-wait-for-start"
diff --git a/TestON/JenkinsFile/FabricJenkinsfileTrigger b/TestON/JenkinsFile/FabricJenkinsfileTrigger
index f5a7dc2..7f62fe4 100644
--- a/TestON/JenkinsFile/FabricJenkinsfileTrigger
+++ b/TestON/JenkinsFile/FabricJenkinsfileTrigger
@@ -31,7 +31,7 @@
 // set the versions of the onos.
 current_version = "master"
 previous_version = "1.15"
-before_previous_version = "1.14"
+before_previous_version = "2.0"
 
 // Function that will initialize the configuration of the Fabric.
 funcs.initializeTrend( "Fabric" )
diff --git a/TestON/JenkinsFile/README b/TestON/JenkinsFile/README
index 1e837e4..73c9749 100644
--- a/TestON/JenkinsFile/README
+++ b/TestON/JenkinsFile/README
@@ -12,7 +12,7 @@
   2) change the portion on line 31 :
      current_version = "master"
      previous_version = "1.15"
-     before_previous_version = "1.14"
+     before_previous_version = "2.0"
 
 
 2. If you want to change the branch to be run for the Segment Routing tests :
@@ -21,18 +21,18 @@
   2) change the variable values on line 32:
      current_version = "master"
      previous_version = "1.15"
-     before_previous_version = "1.14"
+     before_previous_version = "2.0"
   3) If you want certain branch to be run on different machine then change
      a) line 155 - 157:
         testcases[ "SR" ][ "nodeName" ][ <node you want> ] 0: Fabric2, 1: Fabric3, 2: Fabric4
      b) Then, go to dependencies/JenkinsCommonFuncs.groovy
         change def fabricOn( branch ) on line 86.
-        Currently, master, 1.15 and 1.14 run on Fabric4, 2 and 3 respectively.
-     c) Make sure to change the URLs on Wiki as well. If 1.14 runs on Fabric2 instead of Fabric3, then you
+        Currently, master, 2.0 and 1.15 run on Fabric4, 3 and 2 respectively.
+     c) Make sure to change the URLs on Wiki as well. If 1.15 runs on Fabric2 instead of Fabric3, then you
         have to update the URL from
-          https://jenkins.onosproject.org/view/QA/job/postjob-Fabric3/lastSuccessfulBuild/artifact/SRBridging_onos-1.14_20-builds_graph.jpg
+          https://jenkins.onosproject.org/view/QA/job/postjob-Fabric3/lastSuccessfulBuild/artifact/SRBridging_onos-1.15_20-builds_graph.jpg
           to
-          https://jenkins.onosproject.org/view/QA/job/postjob-Fabric2/lastSuccessfulBuild/artifact/SRBridging_onos-1.14_20-builds_graph.jpg
+          https://jenkins.onosproject.org/view/QA/job/postjob-Fabric2/lastSuccessfulBuild/artifact/SRBridging_onos-1.15_20-builds_graph.jpg
 
 
 3. If you want to upload additional logs for the Segment Routing tests:
diff --git a/TestON/JenkinsFile/SRHAJenkinsFile b/TestON/JenkinsFile/SRHAJenkinsFile
index b13290f..98021fd 100644
--- a/TestON/JenkinsFile/SRHAJenkinsFile
+++ b/TestON/JenkinsFile/SRHAJenkinsFile
@@ -36,7 +36,7 @@
 jobName = env.JOB_NAME
 
 // read the TestON.property depends on which branch it is running.
-// ( currently master on Fabric4, 1.15 on Fabric2 and 1.14 on Fabric3 )
+// ( currently master on Fabric4, 2.0 on Fabric3 and 1.15 on Fabric2 )
 def prop = null
 prop = funcs.getProperties()
 SRHA = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "SRHA" ]
diff --git a/TestON/JenkinsFile/SRJenkinsFile b/TestON/JenkinsFile/SRJenkinsFile
index 30fba24..9b85b89 100644
--- a/TestON/JenkinsFile/SRJenkinsFile
+++ b/TestON/JenkinsFile/SRJenkinsFile
@@ -36,7 +36,7 @@
 funcs.additionalInitForSR( jobName )
 
 // read the TestON.property depends on which branch it is running.
-// ( currently master on Fabric4, 1.15 on Fabric2 and 1.14 on Fabric3 )
+// ( currently master on Fabric4, 1.15 on Fabric2 and 2.0 on Fabric3 )
 def prop = null
 prop = funcs.getProperties()
 SR = test_lists.getAllTheTests( prop[ "WikiPrefix" ] )[ "SR" ]
diff --git a/TestON/JenkinsFile/VM_BMJenkinsfileTrigger b/TestON/JenkinsFile/VM_BMJenkinsfileTrigger
index f2e8bc9..a1f7f29 100644
--- a/TestON/JenkinsFile/VM_BMJenkinsfileTrigger
+++ b/TestON/JenkinsFile/VM_BMJenkinsfileTrigger
@@ -30,7 +30,7 @@
 fileRelated.init()
 current_version = "master"
 previous_version = "1.15"
-before_previous_version = "1.14"
+before_previous_version = "2.0"
 
 // init trend graphs to be on VM.
 funcs.initializeTrend( "VM" );
diff --git a/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy b/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy
index 944fd2b..be3bb2b 100644
--- a/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy
+++ b/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy
@@ -83,7 +83,7 @@
 
 def additionalInitForSR( branch ){
     // additional setup for SegmentRouting tests to determine the machine depends on the branch it is running.
-    // branch : branch of the onos. ( master, 1.15, 1.14... )
+    // branch : branch of the onos. ( master, 2.0, 1.15... )
 
     testMachine = ( ( new StringBuilder( testMachine ) ).insert( testMachine.size() - 1, fabricOn( branch ) ) ).
             toString()
@@ -98,14 +98,15 @@
 
 def fabricOn( branch ){
     // gets the fabric machines with the branch of onos.
-    // branch : master, 1.15, 1.14...
+    // branch : master, 2.0, 1.15...
     // branch.reverse().take(4).reverse() will get last 4 characters of the string.
-    switch ( branch.reverse().take( 4 ).reverse() ){
-        case "ster": return "4"
-        case "1.15": return "2"
-        case "1.14": return "3"
-        case "1.13": return "2"
-        case "1.12": return "3"
+    switch ( branch.reverse().take( 3 ).reverse() ){
+        case "ter": return "4"
+        case "2.0": return "3"
+        case ".15": return "2"
+        case ".14": return "3"
+        case ".13": return "2"
+        case ".12": return "3"
         default: return "4"
     }
 }
@@ -294,7 +295,7 @@
 def postLogs( testName, prefix ){
     // posting logs of the onos jobs specifically SR tests
     // testName : name of the test
-    // prefix : branch prefix ( master, 1.15, 1.14 ... )
+    // prefix : branch prefix ( master, 2.0, 1.15 ... )
 
     resultURL = ""
     if ( testType == "SR" ){
@@ -463,7 +464,7 @@
     // stat_file : file name with full path for Rscript for the stat graph
     // pie_file : file name with full path for Rscript for the pie graph
     // type : type of the test ( USECASE, FUNC, HA )
-    // branch : branch of the test ( master, onos-1.15, onos-1.14 )
+    // branch : branch of the test ( master, onos-2.0, onos-1.15 )
     // testListPart : list of the test to be included
     // save_path : path that will save the graphs to
     // pieTestListPart : list of the test for pie graph
@@ -590,6 +591,8 @@
         return "onos-1.15"
     else if ( branch == "1.15" )
         return "onos-1.15"
+    else if ( branch == "2.0" )
+        return "master"
     else
         return "master"
 }
diff --git a/TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy b/TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy
index 1f9df18..e1f1495 100644
--- a/TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy
+++ b/TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy
@@ -26,7 +26,7 @@
 
 def getAllTheTests( wikiPrefix ){
     // This contains the dictionary of the test and the category of them
-    // wikiPrefix : master, 1.15, 1.14 ...
+    // wikiPrefix : master, 2.0, 1.15 ...
 
     // category: it will be used to distinguish which category to be run on which days ( basic,extra_A, extra_B ... )
     // day: it will be used to display the schedule of the test to be run to the slack. It is empty in the first place but will be