[VOL-2580/2581] Fixes for parameter config

Change-Id: I792be08eb17a3d09dfc9e2374d4885cb3f758337
diff --git a/jjb/pipeline/voltha-scale-measurements.groovy b/jjb/pipeline/voltha-scale-measurements.groovy
index 9f17718..d7aad03 100644
--- a/jjb/pipeline/voltha-scale-measurements.groovy
+++ b/jjb/pipeline/voltha-scale-measurements.groovy
@@ -46,7 +46,6 @@
           '''
       }
     }
-
     stage('deploy-voltha') {
       steps {
         sh '''
@@ -57,6 +56,29 @@
           '''
       }
     }
+    stage('MIB-template') {
+      steps {
+        sh '''
+          if [ "$withMibTemplate" = true ] ; then
+            git clone https://github.com/opencord/voltha-openonu-adapter.git
+            cat voltha-openonu-adapter/templates/BBSM-12345123451234512345-00000000000001-v1.json | kubectl exec -it -n voltha $(kubectl get pods -n voltha | grep etcd-cluster | awk 'NR==1{print $1}') etcdctl put service/voltha/omci_mibs/templates/BBSM/12345123451234512345/00000000000001
+            rm -rf voltha-openonu-adapter
+          fi
+        '''
+      }
+    }
+    stage('disable-ONOS-apps') {
+      steps {
+         sh '''
+          #Check withOnosApps and disable apps accordingly
+          if [ "$withOnosApps" = false ] ; then
+            sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@localhost app deactivate org.opencord.olt
+            sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@localhost app deactivate org.opencord.aaa
+            sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@localhost app deactivate org.opencord.dhcpl2relay
+          fi
+         '''
+      }
+    }
     stage('activate-ONUs') {
       steps {
         sh '''
@@ -84,19 +106,6 @@
         '''
       }
     }
-    stage('disable-ONOS-apps') {
-      steps {
-         sh '''
-          #Check withOnosApps and disable apps accordingly
-          if [ "$withOnosApps" = false ] ; then
-            sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@localhost app deactivate org.opencord.olt
-            sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@localhost app deactivate org.opencord.aaa
-            sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@localhost app deactivate org.opencord.dhcpl2relay
-          fi
-         '''
-      }
-    }
-
     stage('ONOS-ports') {
       steps {
         sh '''    
diff --git a/jjb/voltha-scale.yaml b/jjb/voltha-scale.yaml
index 99bb9c2..db8bc45 100644
--- a/jjb/voltha-scale.yaml
+++ b/jjb/voltha-scale.yaml
@@ -57,6 +57,17 @@
           name: pollInterval
           default: 20
           description: 'Sleep time between ONU activation checks'
+      
+      - bool:
+          name: withOnosApps
+          default: false
+          description: 'Option to deactivate certain ONOS apps'
+
+      - bool:
+          name: withMibTemplate
+          default: false
+          description: 'Option to trigger MIB template command'
+    
 
     project-type: pipeline
     concurrent: true