Add schedules for testing onos-2.1

Change-Id: I7c8534c3009806e66e2d1f556e8e48084b0e1544
diff --git a/TestON/JenkinsFile/FabricJenkinsfileTrigger b/TestON/JenkinsFile/FabricJenkinsfileTrigger
index 7f62fe4..1e5a628 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 = "2.0"
+before_previous_version = "2.1"
 
 // Function that will initialize the configuration of the Fabric.
 funcs.initializeTrend( "Fabric" )
diff --git a/TestON/JenkinsFile/README b/TestON/JenkinsFile/README
index 73c9749..54bb6aa 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 = "2.0"
+     before_previous_version = "2.1"
 
 
 2. If you want to change the branch to be run for the Segment Routing tests :
@@ -21,13 +21,13 @@
   2) change the variable values on line 32:
      current_version = "master"
      previous_version = "1.15"
-     before_previous_version = "2.0"
+     before_previous_version = "2.1"
   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, 2.0 and 1.15 run on Fabric4, 3 and 2 respectively.
+        Currently, master, 2.1 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.15_20-builds_graph.jpg
diff --git a/TestON/JenkinsFile/SRHAJenkinsFile b/TestON/JenkinsFile/SRHAJenkinsFile
index 98021fd..9549ebf 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, 2.0 on Fabric3 and 1.15 on Fabric2 )
+// ( currently master on Fabric4, 2.1 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 9b85b89..dfd702c 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 2.0 on Fabric3 )
+// ( currently master on Fabric4, 1.15 on Fabric2 and 2.1 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 a1f7f29..739e308 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 = "2.0"
+before_previous_version = "2.1"
 
 // 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 7474285..68d75e9 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, 2.0, 1.15... )
+    // branch : branch of the onos. ( master, 2.1, 1.15... )
 
     testMachine = ( ( new StringBuilder( testMachine ) ).insert( testMachine.size() - 1, fabricOn( branch ) ) ).
             toString()
@@ -98,10 +98,11 @@
 
 def fabricOn( branch ){
     // gets the fabric machines with the branch of onos.
-    // branch : master, 2.0, 1.15...
+    // branch : master, 2.1, 1.15...
     // branch.reverse().take(4).reverse() will get last 4 characters of the string.
     switch ( branch.reverse().take( 3 ).reverse() ){
         case "ter": return "4"
+        case "2.1": return "3"
         case "2.0": return "3"
         case ".15": return "2"
         case ".14": return "3"
@@ -299,7 +300,7 @@
 def postLogs( testName, prefix ){
     // posting logs of the onos jobs specifically SR tests
     // testName : name of the test
-    // prefix : branch prefix ( master, 2.0, 1.15 ... )
+    // prefix : branch prefix ( master, 2.1, 1.15 ... )
 
     resultURL = ""
     if ( testType == "SR" ){
@@ -468,7 +469,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-2.0, onos-1.15 )
+    // branch : branch of the test ( master, onos-2.1, 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
@@ -597,6 +598,8 @@
         return "onos-1.15"
     else if ( branch == "2.0" )
         return "onos-2.0"
+    else if ( branch == "2.1" )
+        return "onos-2.1"
     else
         return "master"
 }
diff --git a/TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy b/TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy
index e849f37..0fcec01 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, 2.0, 1.15 ...
+    // wikiPrefix : master, 2.1, 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