Merge "[VOL-3034] updates to manual templates"
diff --git a/jjb/cord-test/voltha.yaml b/jjb/cord-test/voltha.yaml
index 086e382..c19d8f0 100644
--- a/jjb/cord-test/voltha.yaml
+++ b/jjb/cord-test/voltha.yaml
@@ -431,7 +431,7 @@
           Jenkinsfile: 'Jenkinsfile-voltha-build'
           oltDebVersion: 'openolt_asgvolt64.deb'
           configurePod: true
-          profile: '1T8GEM'
+          profile: 'Default'
           with-kind: true
           time: '11'
 
@@ -445,6 +445,6 @@
           release: 'master'
           branch: 'master'
           test-repo: 'voltha-system-tests'
-          profile: '1T8GEM'
+          profile: 'Default'
           power-switch: True
           pipeline-script: 'voltha-dt-physical-functional-tests.groovy'
diff --git a/jjb/device-management.yaml b/jjb/device-management.yaml
index cd8b9f6..ea1b9fc 100644
--- a/jjb/device-management.yaml
+++ b/jjb/device-management.yaml
@@ -15,7 +15,7 @@
           branch: 'master'
           oltDebVersion: 'openolt_asfvolt16-2.3.0-bc6e0853e0e8bf6bd7e4223d4a7ee0dd35ce634d.deb'
           profile: 'Default'
-          withPatchset: true
+          time-trigger: "@daily"
 
 - job-template:
     id: 'device-management-patch-test'
@@ -144,18 +144,18 @@
 
       - string:
           name: gerritProject
-          default: '$GERRIT_PROJECT'
+          default: 'device-management'
           description: 'Name of the Gerrit project'
 
       - string:
-          name: gerritChangeNumber
-          default: '$GERRIT_CHANGE_NUMBER'
-          description: 'Changeset number in Gerrit'
+          name: gerritRefSpec
+          default: '$GERRIT_REFSPEC'
+          description: 'Refspec for the Gerrit patchset'
 
       - string:
-          name: gerritPatchsetNumber
-          default: '$GERRIT_PATCHSET_NUMBER'
-          description: 'PatchSet number in Gerrit'
+          name: gerritEventCommentText
+          default: '$GERRIT_EVENT_COMMENT_TEXT'
+          description: 'Comment text from gerrit commit'
 
       - string:
           name: cordRepoUrl
@@ -215,11 +215,6 @@
           default: true
           description: "Re-install OLT software"
 
-      - bool:
-          name: withPatchset
-          default: true
-          description: "Build with Gerrit patchset"
-
       - string:
           name: extraRobotArgs
           default: '-i sanity'
diff --git a/jjb/pipeline/device-management-physical-build-and-tests.groovy b/jjb/pipeline/device-management-physical-build-and-tests.groovy
index ee16151..6c183ff 100644
--- a/jjb/pipeline/device-management-physical-build-and-tests.groovy
+++ b/jjb/pipeline/device-management-physical-build-and-tests.groovy
@@ -21,14 +21,6 @@
 localKindVolthaValuesFile = null
 localSadisConfigFile = null
 
-// The pipeline assumes these variables are always defined
-if ( ! params.withPatchset ) {
-  GERRIT_EVENT_COMMENT_TEXT = ""
-  GERRIT_PROJECT = ""
-  GERRIT_CHANGE_NUMBER = ""
-  GERRIT_PATCHSET_NUMBER = ""
-}
-
 pipeline {
 
   /* no label, executor is determined by JJB */
@@ -92,11 +84,11 @@
       steps {
         sh """
            pushd $WORKSPACE/
-           echo "${gerritProject}" "${gerritChangeNumber}" "${gerritPatchsetNumber}"
-           echo "${GERRIT_REFSPEC}"
            git clone https://gerrit.opencord.org/${gerritProject}
            cd "${gerritProject}"
-           git fetch https://gerrit.opencord.org/${gerritProject} "${GERRIT_REFSPEC}" && git checkout FETCH_HEAD
+           if [[ ! -z "${gerritRefSpec}" ]]; then
+               git fetch https://gerrit.opencord.org/${gerritProject} "${gerritRefSpec}" && git checkout FETCH_HEAD
+           fi
            popd
            """
       }
@@ -206,6 +198,7 @@
           sh returnStdout: false, script: """
               helm repo add cord https://charts.opencord.org
               helm repo update
+              helm del --purge voltha-kafka-dump || true
               helm install -n voltha-kafka-dump cord/voltha-kafka-dump
           """
         }
@@ -308,7 +301,7 @@
         sh returnStdout: false, script: """
         # Note: Gerrit comment text will be prefixed by "Patch set n:" and a blank line
         REGEX="hardware test with delay\$"
-        [[ "$GERRIT_EVENT_COMMENT_TEXT" =~ \$REGEX ]] && sleep 10m || true
+        [[ "${gerritEventCommentText}" =~ \$REGEX ]] && sleep 10m || true
         """
       }
     }
diff --git a/jjb/pipeline/omec-deploy-staging.groovy b/jjb/pipeline/omec-deploy-staging.groovy
index 87f8aa3..e24ab0e 100644
--- a/jjb/pipeline/omec-deploy-staging.groovy
+++ b/jjb/pipeline/omec-deploy-staging.groovy
@@ -36,27 +36,27 @@
 
   stages {
     stage('Environment Setup') {
-        steps {
-            script {
-                if (params.useProductionCluster) {
-                    dp_context = "production-edge-demo"
-                    omec_cp = "~/pod-configs/deployment-configs/aether/apps/gcp-prd/omec-cp.yaml"
-                    omec_dp = "~/pod-configs/deployment-configs/aether/apps/menlo-demo/omec-dp-cbrs.yaml"
-                    accelleran_cbrs_common = "~/pod-configs/deployment-configs/aether/apps/menlo-demo/accelleran-cbrs-common.yaml"
-                    accelleran_cbrs_cu = "~/pod-configs/deployment-configs/aether/apps/menlo-demo/accelleran-cbrs-cu.yaml"
-                    sh script: "ssh ${env.vm} 'cp ~/.kube/omec_production_config ~/.kube/config'"
-                    println "Using PRODUCTION cluster."
-                } else {
-                    dp_context = "staging-edge-onf-menlo"
-                    omec_cp = "~/pod-configs/deployment-configs/aether/apps/gcp-stg/omec-cp.yaml"
-                    omec_dp = "~/pod-configs/deployment-configs/aether/apps/menlo-stg/omec-dp.yaml"
-                    accelleran_cbrs_common = "~/pod-configs/deployment-configs/aether/apps/menlo-stg/accelleran-cbrs-common.yaml"
-                    accelleran_cbrs_cu = "~/pod-configs/deployment-configs/aether/apps/menlo-stg/accelleran-cbrs-cu.yaml"
-                    sh script: "ssh ${env.vm} 'cp ~/.kube/omec_staging_config ~/.kube/config'"
-                    println "Using STAGING cluster."
-                }
-            }
+      steps {
+        script {
+          if (params.useProductionCluster) {
+            dp_context = "production-edge-demo"
+            omec_cp = "~/pod-configs/deployment-configs/aether/apps/gcp-prd/omec-cp.yaml"
+            omec_dp = "~/pod-configs/deployment-configs/aether/apps/menlo-demo/omec-dp-cbrs.yaml"
+            accelleran_cbrs_common = "~/pod-configs/deployment-configs/aether/apps/menlo-demo/accelleran-cbrs-common.yaml"
+            accelleran_cbrs_cu = "~/pod-configs/deployment-configs/aether/apps/menlo-demo/accelleran-cbrs-cu.yaml"
+            sh script: "ssh ${env.vm} 'cp ~/.kube/omec_production_config ~/.kube/config'"
+            println "Using PRODUCTION cluster."
+          } else {
+            dp_context = "staging-edge-onf-menlo"
+            omec_cp = "~/pod-configs/deployment-configs/aether/apps/gcp-stg/omec-cp.yaml"
+            omec_dp = "~/pod-configs/deployment-configs/aether/apps/menlo-stg/omec-dp.yaml"
+            accelleran_cbrs_common = "~/pod-configs/deployment-configs/aether/apps/menlo-stg/accelleran-cbrs-common.yaml"
+            accelleran_cbrs_cu = "~/pod-configs/deployment-configs/aether/apps/menlo-stg/accelleran-cbrs-cu.yaml"
+            sh script: "ssh ${env.vm} 'cp ~/.kube/omec_staging_config ~/.kube/config'"
+            println "Using STAGING cluster."
+          }
         }
+      }
     }
     stage('Reset Staging') {
       steps {
@@ -216,5 +216,19 @@
           """
       }
     }
+
+    stage('Wait for Pods') {
+      steps {
+        sh label: 'Wait for pods', script: """
+          ssh ${env.vm} '
+              kubectl config use-context staging-central-gcp
+              ~/helm-charts/scripts/wait_for_pods.sh omec
+
+              kubectl config use-context ${dp_context}
+              ~/helm-charts/scripts/wait_for_pods.sh omec
+            '
+          """
+      }
+    }
   }
 }
diff --git a/jjb/pipeline/voltha-scale-test.groovy b/jjb/pipeline/voltha-scale-test.groovy
new file mode 100644
index 0000000..b5785e3
--- /dev/null
+++ b/jjb/pipeline/voltha-scale-test.groovy
@@ -0,0 +1,360 @@
+// Copyright 2019-present Open Networking Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// deploy VOLTHA using kind-voltha and performs a scale test
+
+pipeline {
+
+  /* no label, executor is determined by JJB */
+  agent {
+    label "${params.buildNode}"
+  }
+  options {
+      timeout(time: 30, unit: 'MINUTES')
+  }
+  environment {
+    KUBECONFIG="$HOME/.kube/config"
+    VOLTCONFIG="$HOME/.volt/config"
+    SSHPASS="karaf"
+    PATH="$WORKSPACE/kind-voltha/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+    TYPE="minimal"
+    FANCY=0
+    WITH_SIM_ADAPTERS="no"
+    WITH_RADIUS="yes"
+    WITH_BBSIM="yes"
+    LEGACY_BBSIM_INDEX="no"
+    DEPLOY_K8S="no"
+    CONFIG_SADIS="external"
+    WITH_KAFKA="kafka.default.svc.cluster.local"
+    WITH_ETCD="etcd-cluster-client.default.svc.cluster.local"
+
+    // install everything in the default namespace
+    VOLTHA_NS="default"
+    ADAPTER_NS="default"
+    INFRA_NS="default"
+    BBSIM_NS="default"
+
+    // configurable options
+    WITH_EAPOL="${withEapol}"
+    WITH_DHCP="${withDhcp}"
+    WITH_IGMP="${withIgmp}"
+    VOLTHA_LOG_LEVEL="${logLevel}"
+    NUM_OF_BBSIM="${olts}"
+    NUM_OF_OPENONU="${openonuAdapterReplicas}"
+    NUM_OF_ONOS="${onosReplicas}"
+    NUM_OF_ATOMIX="${atomixReplicas}"
+
+    VOLTHA_CHART="${volthaChart}"
+    VOLTHA_BBSIM_CHART="${bbsimChart}"
+    VOLTHA_ADAPTER_OPEN_OLT_CHART="${openoltAdapterChart}"
+    VOLTHA_ADAPTER_OPEN_ONU_CHART="${openonuAdapterChart}"
+  }
+
+  stages {
+    stage ('Cleanup') {
+      steps {
+        sh returnStdout: false, script: """
+        test -e $WORKSPACE/kind-voltha/voltha && cd $WORKSPACE/kind-voltha && ./voltha down
+
+        for hchart in \$(helm list -q | grep -E -v 'docker-registry|kafkacat|etcd-operator');
+        do
+            echo "Purging chart: \${hchart}"
+            helm delete --purge "\${hchart}"
+        done
+        bash /home/cord/voltha-scale/wait_for_pods.sh
+
+        cd $WORKSPACE
+        rm -rf $WORKSPACE/*
+        """
+      }
+    }
+    stage('Clone kind-voltha') {
+      steps {
+        checkout([
+          $class: 'GitSCM',
+          userRemoteConfigs: [[ url: "https://gerrit.opencord.org/kind-voltha", ]],
+          branches: [[ name: "master", ]],
+          extensions: [
+            [$class: 'WipeWorkspace'],
+            [$class: 'RelativeTargetDirectory', relativeTargetDir: "kind-voltha"],
+            [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
+          ],
+        ])
+      }
+    }
+    stage('Clone voltha-system-tests') {
+      steps {
+        checkout([
+          $class: 'GitSCM',
+          userRemoteConfigs: [[ url: "https://gerrit.opencord.org/voltha-system-tests", ]],
+          branches: [[ name: "master", ]],
+          extensions: [
+            [$class: 'WipeWorkspace'],
+            [$class: 'RelativeTargetDirectory', relativeTargetDir: "voltha-system-tests"],
+            [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
+          ],
+        ])
+        script {
+          sh(script:"""
+            if [ ${volthaSystemTestsChange} != '' ] ; then
+              cd voltha-system-tests;
+              git fetch https://gerrit.opencord.org/voltha-system-tests ${volthaSystemTestsChange} && git checkout FETCH_HEAD
+            fi
+            """)
+        }
+      }
+    }
+    stage('Deploy common infrastructure') {
+      // includes monitoring, kafka, etcd
+      steps {
+        sh '''
+        helm install -n kafka incubator/kafka --version 0.13.3 --set replicas=3 --set persistence.enabled=false --set zookeeper.replicaCount=3 --set zookeeper.persistence.enabled=false --version=0.15.3
+
+        helm install --set clusterName=etcd-cluster --set autoCompactionRetention=1 --set clusterSize=3 --set defaults.log_level=WARN --namespace default -n etcd-cluster onf/voltha-etcd-cluster
+
+        if [ ${withMonitoring} = true ] ; then
+          helm install -n nem-monitoring cord/nem-monitoring \
+          --set prometheus.alertmanager.enabled=false,prometheus.pushgateway.enabled=false \
+          --set kpi_exporter.enabled=false,dashboards.xos=false,dashboards.onos=false,dashboards.aaa=false,dashboards.voltha=false
+        fi
+
+        # TODO download this file from https://github.com/opencord/helm-charts/blob/master/scripts/wait_for_pods.sh
+        bash /home/cord/voltha-scale/wait_for_pods.sh
+        '''
+      }
+    }
+    stage('Deploy Voltha') {
+      steps {
+        script {
+          // TODO install etcd outside kind-voltha (no need to redeploy the operator everytime)
+          sh returnStdout: false, script: """
+            export EXTRA_HELM_FLAGS+='--set enablePerf=true,pon=${pons},onu=${onus} '
+
+            # BBSim custom image handling
+            IFS=: read -r bbsimRepo bbsimTag <<< ${bbsimImg}
+            EXTRA_HELM_FLAGS+="--set images.bbsim.repository=\$bbsimRepo,images.bbsim.tag=\$bbsimTag "
+
+            # VOLTHA and ofAgent custom image handling
+            IFS=: read -r rwCoreRepo rwCoreTag <<< ${rwCoreImg}
+            IFS=: read -r ofAgentRepo ofAgentTag <<< ${ofAgentImg}
+            EXTRA_HELM_FLAGS+="--set images.rw_core.repository=\$rwCoreRepo,images.rw_core.tag=\$rwCoreTag,images.ofagent_go.repository=\$ofAgentRepo,images.ofagent_go.tag=\$ofAgentTag "
+
+            # OpenOLT custom image handling
+            IFS=: read -r openoltAdapterRepo openoltAdapterTag <<< ${openoltAdapterImg}
+            EXTRA_HELM_FLAGS+="--set images.adapter_open_olt.repository=\$openoltAdapterRepo,images.adapter_open_olt.tag=\$openoltAdapterTag "
+
+            # OpenONU custom image handling
+            IFS=: read -r openonuAdapterRepo openonuAdapterTag <<< ${openonuAdapterImg}
+            EXTRA_HELM_FLAGS+="--set images.adapter_open_onu.repository=\$openonuAdapterRepo,images.adapter_open_onu.tag=\$openonuAdapterTag "
+
+            # ONOS custom image handling
+            IFS=: read -r onosRepo onosTag <<< ${onosImg}
+            EXTRA_HELM_FLAGS+="--set images.onos.repository=\$onosRepo,images.onos.tag=\$onosTag "
+
+
+            cd $WORKSPACE/kind-voltha/
+
+            ./voltha up
+          """
+        }
+      }
+    }
+    stage('Configuration') {
+      steps {
+        sh '''
+          # Always deactivate org.opencord.kafka
+          sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 app deactivate org.opencord.kafka
+
+          #Setting link discovery
+          sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.provider.lldp.impl.LldpLinkProvider enabled ${withLLDP}
+
+          #Setting LOG level to ${logLevel}
+          sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 log:set ${logLevel}
+          kubectl exec $(kubectl get pods | grep -E "bbsim[0-9]" | awk 'NR==1{print $1}') -- bbsimctl log ${logLevel} false
+
+          if [ ${withEapol} = false ] || [ ${withFlows} = false ]; then
+            sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 app deactivate org.opencord.aaa
+          fi
+
+          if [ ${withDhcp} = false ] || [ ${withFlows} = false ]; then
+            sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 app deactivate org.opencord.dhcpl2relay
+          fi
+
+          if [ ${withIgmp} = false ] || [ ${withFlows} = false ]; then
+            # FIXME will actually affected the tests only after VOL-3054 is addressed
+            sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 app deactivate org.opencord.igmpproxy
+            sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 app deactivate org.opencord.mcast
+          fi
+
+          if [ ${withFlows} = false ]; then
+            sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 app deactivate org.opencord.olt
+          fi
+
+          if [ ${withMibTemplate} = true ] ; then
+            rm -f BBSM-12345123451234512345-00000000000001-v1.json
+            wget https://raw.githubusercontent.com/opencord/voltha-openonu-adapter/master/templates/BBSM-12345123451234512345-00000000000001-v1.json
+            cat BBSM-12345123451234512345-00000000000001-v1.json | kubectl exec -it $(kubectl get pods | grep etcd-cluster | awk 'NR==1{print $1}') etcdctl put service/voltha/omci_mibs/templates/BBSM/12345123451234512345/00000000000001
+          fi
+        '''
+      }
+    }
+    stage('Run Test') {
+      steps {
+        timeout(time: 11, unit: 'MINUTES') {
+          sh '''
+            ROBOT_PARAMS="-v olt:${olts} \
+              -v pon:${pons} \
+              -v onu:${onus} \
+              -v workflow:${workflow} \
+              -v withEapol:${withEapol} \
+              -v withDhcp:${withDhcp} \
+              -v withIgmp:${withIgmp} \
+              --noncritical non-critical \
+              -e teardown "
+
+            if [ ${withEapol} = false ] ; then
+              ROBOT_PARAMS+="-e authentication "
+            fi
+
+            if [ ${withDhcp} = false ] ; then
+              ROBOT_PARAMS+="-e dhcp "
+            fi
+
+            if [ ${provisionSubscribers} = false ] ; then
+              ROBOT_PARAMS+="-e provision -e flow-after "
+            fi
+
+            if [ ${withFlows} = false ] ; then
+              ROBOT_PARAMS+="-i setup -i activation "
+            fi
+
+            mkdir -p $WORKSPACE/RobotLogs
+            cd voltha-system-tests
+            make vst_venv
+            source ./vst_venv/bin/activate
+            robot -d $WORKSPACE/RobotLogs \
+            $ROBOT_PARAMS tests/scale/Voltha_Scale_Tests.robot
+          '''
+        }
+      }
+    }
+    stage('Collect results') {
+      steps {
+        sh '''
+          cd voltha-system-tests
+          source ./vst_venv/bin/activate
+          python tests/scale/collect-result.py -r $WORKSPACE/RobotLogs/output.xml -p $WORKSPACE/plots > $WORKSPACE/execution-time.txt
+          cat $WORKSPACE/execution-time.txt
+        '''
+      }
+    }
+  }
+  post {
+    always {
+      plot([
+        csvFileName: 'scale-test.csv',
+        csvSeries: [
+          [file: 'plots/plot-voltha-onus.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
+          [file: 'plots/plot-onos-ports.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
+          [file: 'plots/plot-voltha-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
+          [file: 'plots/plot-onos-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
+          [file: 'plots/plot-onos-auth.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
+          [file: 'plots/plot-voltha-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
+          [file: 'plots/plot-onos-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
+          [file: 'plots/plot-onos-dhcp.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
+        ],
+        group: 'Voltha-Scale-Numbers', numBuilds: '20', style: 'line', title: "Scale Test (OLTs: ${olts}, PONs: ${pons}, ONUs: ${onus})", yaxis: 'Time (s)', useDescr: true
+      ])
+      step([$class: 'RobotPublisher',
+        disableArchiveOutput: false,
+        logFileName: 'RobotLogs/log.html',
+        otherFiles: '',
+        outputFileName: 'RobotLogs/output.xml',
+        outputPath: '.',
+        passThreshold: 100,
+        reportFileName: 'RobotLogs/report.html',
+        unstableThreshold: 0]);
+      // count how many ONUs have been activated
+      sh '''
+        mkdir -p $WORKSPACE/logs
+        echo "#-of-ONUs" > $WORKSPACE/logs/voltha-devices-count.txt
+        echo $(voltctl device list | grep -v OLT | grep ACTIVE | wc -l) >> $WORKSPACE/logs/voltha-devices-count.txt
+      '''
+      // count how many ports have been discovered
+      sh '''
+        echo "#-of-ports" > $WORKSPACE/logs/onos-ports-count.txt
+        echo $(sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 ports -e | grep BBSM | wc -l) >> $WORKSPACE/logs/onos-ports-count.txt
+      '''
+      // count how many flows have been provisioned
+      sh '''
+        echo "#-of-flows" > $WORKSPACE/logs/onos-flows-count.txt
+        echo $(sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 flows -s | grep ADDED | wc -l) >> $WORKSPACE/logs/onos-flows-count.txt
+      '''
+      // dump and count the authenticated users
+      sh '''
+        if [ ${withOnosApps} = true ] && [ ${bbsimAuth} ] ; then
+          echo $(sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 aaa-users) >> $WORKSPACE/logs/onos-aaa-users.txt
+
+          echo "#-of-authenticated-users" > $WORKSPACE/logs/onos-aaa-count.txt
+          echo $(sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 aaa-users | grep AUTHORIZED_STATE | wc -l) >> $WORKSPACE/logs/onos-aaa-count.txt
+        fi
+      '''
+      // dump and count the dhcp users
+      sh '''
+        if [ ${withOnosApps} = true ] && [ ${bbsimDhcp} ] ; then
+          echo $(sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 dhcpl2relay-allocations) >> $WORKSPACE/logs/onos-dhcp-allocations.txt
+
+          echo "#-of-dhcp-allocations" > $WORKSPACE/logs/onos-dhcp-count.txt
+          echo $(sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 dhcpl2relay-allocations | grep DHCPACK | wc -l) >> $WORKSPACE/logs/onos-dhcp-count.txt
+        fi
+      '''
+      // check which containers were used in this build
+      sh '''
+        kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq
+        kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq
+      '''
+      // dump all the VOLTHA devices informations
+      sh '''
+        voltctl device list -o json > $WORKSPACE/logs/device-list.json
+        python -m json.tool $WORKSPACE/logs/device-list.json > $WORKSPACE/logs/voltha-devices-list.json
+      '''
+      // dump all the BBSim(s) ONU informations
+      sh '''
+      BBSIM_IDS=$(kubectl get pods | grep bbsim | grep -v server | awk '{print $1}')
+      IDS=($BBSIM_IDS)
+
+      for bbsim in "${IDS[@]}"
+      do
+        kubectl exec -t $bbsim bbsimctl onu list > $WORKSPACE/logs/$bbsim-device-list.txt
+      done
+      '''
+      // get ports and flows from ONOS
+      sh '''
+        sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 ports > $WORKSPACE/logs/onos-ports-list.txt
+        sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 flows -s > $WORKSPACE/logs/onos-flows-list.txt
+      '''
+      // get all the logs from kubernetes PODs
+      sh '''
+        kubectl get pods -o wide > $WORKSPACE/logs/pods.txt
+        kubectl logs -l app=adapter-open-olt > $WORKSPACE/logs/open-olt-logs.logs
+        kubectl logs -l app=adapter-open-onu > $WORKSPACE/logs/open-onu-logs.logs
+        kubectl logs -l app=rw-core > $WORKSPACE/logs/voltha-rw-core-logs.logs
+        kubectl logs -l app=ofagent > $WORKSPACE/logs/voltha-ofagent-logs.logs
+        kubectl logs -l app=bbsim > $WORKSPACE/logs/bbsim-logs.logs
+        kubectl logs -l app=onos > $WORKSPACE/logs/onos-logs.logs
+      '''
+      archiveArtifacts artifacts: 'kind-voltha/install-minimal.log,execution-time.txt,logs/*'
+    }
+  }
+}
diff --git a/jjb/voltha-scale.yaml b/jjb/voltha-scale.yaml
index 0c03a30..62b6c15 100644
--- a/jjb/voltha-scale.yaml
+++ b/jjb/voltha-scale.yaml
@@ -7,23 +7,7 @@
     project-name: '{name}'
 
     jobs:
-      - 'voltha-scale-measurements-periodic':
-          name: 'voltha-scale-measurements-periodic-8-16-200ms'
-          build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/4 * * *"
-          onuPerPon: 16
-          ponPorts: 8
-          expectedOnus: 128
-          BBSIMdelay: 200
-      - 'voltha-scale-measurements-periodic':
-          name: 'voltha-scale-measurements-periodic-8-32-200ms'
-          build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/4 * * *"
-          onuPerPon: 32
-          ponPorts: 8
-          expectedOnus: 256
-          BBSIMdelay: 200
-      - 'voltha-scale-measurements-periodic':
+      - 'voltha-scale-measurements-periodic-legacy':
           name: 'voltha-scale-measurements-periodic-10-20-200ms'
           build-node: 'onf-pod1-head-node'
           time-trigger: "H H/4 * * *"
@@ -31,71 +15,7 @@
           ponPorts: 10
           expectedOnus: 200
           BBSIMdelay: 200
-      - 'voltha-scale-measurements-periodic':
-          name: 'voltha-scale-measurements-periodic-4-32-200ms'
-          build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/4 * * *"
-          onuPerPon: 32
-          ponPorts: 4
-          expectedOnus: 128
-          BBSIMdelay: 200
-      - 'voltha-scale-measurements-periodic':
-          name: 'voltha-scale-measurements-periodic-16-32-200ms'
-          build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/4 * * *"
-          onuPerPon: 32
-          ponPorts: 16
-          expectedOnus: 512
-          BBSIMdelay: 200
-          # multi-adapter
-          extraHelmFlags: "--set replicas.adapter_open_onu=8"
-      - 'voltha-scale-measurements-periodic':
-          name: 'voltha-scale-measurements-periodic-16-32-20s'
-          build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/4 * * *"
-          onuPerPon: 32
-          ponPorts: 16
-          expectedOnus: 512
-          BBSIMdelay: 20000
-          # multi-adapter
-          extraHelmFlags: "--set replicas.adapter_open_onu=8"
-      - 'voltha-scale-measurements-periodic':
-          name: 'voltha-scale-measurements-periodic-16-64-200ms'
-          build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/4 * * *"
-          onuPerPon: 64
-          ponPorts: 16
-          expectedOnus: 1024
-          BBSIMdelay: 200
-          # multi-adapter
-          extraHelmFlags: "--set replicas.adapter_open_onu=8"
-      - 'voltha-scale-measurements-periodic':
-          name: 'voltha-scale-measurements-periodic-16-64-20s'
-          build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/4 * * *"
-          onuPerPon: 64
-          ponPorts: 16
-          expectedOnus: 1024
-          BBSIMdelay: 20000
-          # multi-adapter
-          extraHelmFlags: "--set replicas.adapter_open_onu=8"
-      - 'voltha-scale-measurements-periodic':
-          name: 'voltha-scale-measurements-periodic-4-64-200ms'
-          build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/4 * * *"
-          onuPerPon: 64
-          ponPorts: 4
-          expectedOnus: 256
-          BBSIMdelay: 200
-      - 'voltha-scale-measurements-periodic':
-          name: 'voltha-scale-measurements-periodic-1-128-200ms'
-          build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/4 * * *"
-          onuPerPon: 128
-          ponPorts: 1
-          expectedOnus: 128
-          BBSIMdelay: 200
-      - 'voltha-scale-measurements-periodic':
+      - 'voltha-scale-measurements-periodic-legacy':
           name: 'voltha-scale-measurements-periodic-1-64-200ms'
           build-node: 'onf-pod1-head-node'
           time-trigger: "H H/4 * * *"
@@ -103,28 +23,7 @@
           ponPorts: 1
           expectedOnus: 64
           BBSIMdelay: 200
-      - 'voltha-scale-measurements-periodic':
-          name: 'voltha-scale-measurements-periodic-1-1-200ms-complete'
-          build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/4 * * *"
-          onuPerPon: 1
-          ponPorts: 1
-          expectedOnus: 1
-          BBSIMdelay: 200
-          withOnosApps: true
-          flowStatInterval: 5
-          portsStatInterval: 5
-          expectedFlows: 2
-      - 'voltha-scale-measurements-periodic':
-          name: 'voltha-scale-measurements-periodic-2-OLTs-10-10-200ms'
-          build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/4 * * *"
-          onuPerPon: 10
-          ponPorts: 10
-          numOfBbsim: 2
-          expectedOnus: 200
-          BBSIMdelay: 200
-      - 'voltha-scale-measurements-periodic':
+      - 'voltha-scale-measurements-periodic-legacy':
           name: 'voltha-scale-measurements-periodic-10-20-200ms-with-flows'
           build-node: 'onf-pod1-head-node'
           time-trigger: "H H/4 * * *"
@@ -138,41 +37,163 @@
           expectedFlows: 201
           bbsimAuth: false
           bbsimDhcp: false
-      - 'voltha-scale-measurements-periodic':
-          name: 'voltha-scale-measurements-periodic-4-16-200ms-complete'
-          build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/4 * * *"
-          onuPerPon: 16
-          ponPorts: 4
-          expectedOnus: 64
-          BBSIMdelay: 200
-          withOnosApps: true
-          flowStatInterval: 5
-          portsStatInterval: 5
-          expectedFlows: 65
-      - 'voltha-scale-measurements-periodic':
-          name: 'voltha-scale-measurements-periodic-10-20-200ms-complete'
-          build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/4 * * *"
-          onuPerPon: 20
-          ponPorts: 10
-          expectedOnus: 200
-          BBSIMdelay: 200
-          withOnosApps: true
-          flowStatInterval: 5
-          portsStatInterval: 5
-          expectedFlows: 201
-          extraHelmFlags: "--set replicas.adapter_open_onu=2"
+
+      # new Jobs
+      # name format is <job-template>-<olts>-<pon>-<onus>-<setup>
+      # needed for comparison with the openonu-go adapter
       - 'voltha-scale-measurements':
+          name: 'voltha-scale-measurements-1-2-32-activation-no-mib'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          olts: 1
+          pons: 2
+          onus: 32
+          withFlows: false
+          provisionSubscribers: false
+          withEapol: false
+          withDhcp: false
+          withIgmp: false
+          withMibTemplate: false
+
+      # jobs for 200 ONUs with a single openonu-adapter
+      - 'voltha-scale-measurements':
+          name: 'voltha-scale-measurements-1-10-20-activation'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          olts: 1
+          pons: 10
+          onus: 20
+          withFlows: false
+          provisionSubscribers: false
+          withEapol: false
+          withDhcp: false
+          withIgmp: false
+      - 'voltha-scale-measurements':
+          name: 'voltha-scale-measurements-1-10-20-flows'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          olts: 1
+          pons: 10
+          onus: 20
+          withFlows: true
+          provisionSubscribers: false
+          withEapol: true
+          withDhcp: true
+          withIgmp: false
+      - 'voltha-scale-measurements':
+          name: 'voltha-scale-measurements-1-10-20-subscribers'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          olts: 1
+          pons: 10
+          onus: 20
+          withFlows: true
+          provisionSubscribers: true
+          withEapol: true
+          withDhcp: true
+          withIgmp: false
+
+      # jobs for 512 ONUs with a 8 openonu-adapters and clustered ONOS
+      - 'voltha-scale-measurements':
+          name: 'voltha-scale-measurements-1-16-32-activation'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          olts: 1
+          pons: 16
+          onus: 32
+          withFlows: false
+          provisionSubscribers: false
+          withEapol: false
+          withDhcp: false
+          withIgmp: false
+          openonuAdapterReplicas: 8
+          onosReplicas: 3
+          atomixReplicas: 3
+      - 'voltha-scale-measurements':
+          name: 'voltha-scale-measurements-1-16-32-flows'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          olts: 1
+          pons: 16
+          onus: 32
+          withFlows: true
+          provisionSubscribers: false
+          withEapol: true
+          withDhcp: true
+          withIgmp: false
+          openonuAdapterReplicas: 8
+          onosReplicas: 3
+          atomixReplicas: 3
+      - 'voltha-scale-measurements':
+          name: 'voltha-scale-measurements-1-16-32-subscribers'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          olts: 1
+          pons: 16
+          onus: 32
+          withFlows: true
+          provisionSubscribers: true
+          withEapol: true
+          withDhcp: true
+          withIgmp: false
+          openonuAdapterReplicas: 8
+          onosReplicas: 3
+          atomixReplicas: 3
+
+      # jobs for 1024 ONUs with a 8 openonu-adapters and clustered ONOS (2 OLTs)
+      - 'voltha-scale-measurements':
+          name: 'voltha-scale-measurements-2-16-32-activation'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          olts: 2
+          pons: 16
+          onus: 32
+          withFlows: false
+          provisionSubscribers: false
+          withEapol: false
+          withDhcp: false
+          withIgmp: false
+          openonuAdapterReplicas: 8
+          onosReplicas: 3
+          atomixReplicas: 3
+      - 'voltha-scale-measurements':
+          name: 'voltha-scale-measurements-2-16-32-flows'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          olts: 2
+          pons: 16
+          onus: 32
+          withFlows: true
+          provisionSubscribers: false
+          withEapol: true
+          withDhcp: true
+          withIgmp: false
+          openonuAdapterReplicas: 8
+          onosReplicas: 3
+          atomixReplicas: 3
+      - 'voltha-scale-measurements':
+          name: 'voltha-scale-measurements-2-16-32-subscribers'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          olts: 2
+          pons: 16
+          onus: 32
+          withFlows: true
+          provisionSubscribers: true
+          withEapol: true
+          withDhcp: true
+          withIgmp: false
+          openonuAdapterReplicas: 8
+          onosReplicas: 3
+          atomixReplicas: 3
+
+      # development pipeline
+      - 'voltha-scale-measurements-dev':
           name: 'voltha-scale-measurements-dev'
           build-node: 'voltha-scale'
-          onuPerPon: 16
-          ponPorts: 1
-          expectedOnus: 16
-          BBSIMdelay: 200
 
 - job-template:
-    id: 'voltha-scale-measurements-periodic'
+    id: 'voltha-scale-measurements-periodic-legacy'
     name: '{name}'
     pipeline-script: 'voltha-scale-measurements.groovy'
 
@@ -369,7 +390,7 @@
 - job-template:
     id: 'voltha-scale-measurements'
     name: '{name}'
-    pipeline-script: 'voltha-scale-measurements.groovy'
+    pipeline-script: 'voltha-scale-test.groovy'
 
     description: |
       <!-- Managed by Jenkins Job Builder -->
@@ -387,28 +408,34 @@
           build-timeout: '{build-timeout}'
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
-    # default parameters
-    bbsimImg: "voltha/bbsim:master"
-    bbsimChart: "onf/bbsim"
-    volthaImg: "voltha/voltha-rw-core:master"
-    ofAgentImg: "voltha/voltha-ofagent-go:master"
-    volthaChart: "onf/voltha"
-    openoltAdapterImg: "voltha/voltha-openolt-adapter:master"
-    openoltAdapterChart: "onf/voltha-adapter-openolt"
-    openonuAdapterImg: "voltha/voltha-openonu-adapter:master"
-    openonuAdapterChart: "onf/voltha-adapter-openonu"
-    onosImg: "voltha/voltha-onos:master"
-    extraHelmFlags: ''
+    # default values
+    bbsimImg: voltha/bbsim:master
+    rwCoreImg: voltha/voltha-rw-core:master
+    ofAgentImg: voltha/voltha-ofagent-go:master
+    openoltAdapterImg:  voltha/voltha-openolt-adapter:master
+    openonuAdapterImg: voltha/voltha-openonu-adapter:master
+    onosImg: voltha/voltha-onos:master
+
+    bbsimChart: onf/bbsim
+    volthaChart: onf/voltha
+    openoltAdapterChart: onf/voltha-adapter-openolt
+    openonuAdapterChart: onf/voltha-adapter-openonu
+
+    olts: 2
+    pons: 2
+    onus: 2
+    workflow: att
+    withFlows: false
+    provisionSubscribers: false
+    withEapol: true
+    withDhcp: true
+    withIgmp: false
+    withLLDP: false
     withMibTemplate: true
-    numOfBbsim: 1
-    numOfKafka: 3
-    withOnosApps: true
-    setLinkDiscovery: false
-    flowStatInterval: 600
-    portsStatInterval: 600
-    expectedFlows: 17 # one EAPOL per ONU + 1 LLDP on the NNI
-    bbsimAuth: true
-    bbsimDhcp: true
+    withMonitoring: true
+    openonuAdapterReplicas: 1
+    onosReplicas: 1
+    atomixReplicas: 0
 
     parameters:
       - string:
@@ -422,34 +449,54 @@
           description: 'Log level for all the components'
 
       - string:
-          name: onuPerPon
-          default: 1
+          name: onus
+          default: '{onus}'
           description: 'Number of ONUs to provision'
 
       - string:
-          name: ponPorts
-          default: 1
+          name: pons
+          default: '{pons}'
           description: 'Number of PONs to provision'
 
       - string:
-          name: expectedOnus
-          default: 1
-          description: 'Expected number of activated ONUs'
+          name: olts
+          default: '{olts}'
+          description: 'How many BBSim instances to run'
 
       - string:
-          name: expectedFlows
-          default: '{expectedFlows}'
-          description: 'Expected number of flows in ONOS'
-
-      - string:
-          name: pollInterval
-          default: 5
-          description: 'Sleep time between ONU activation checks'
+          name: workflow
+          default: '{workflow}'
+          description: 'Which workflow are we testing (att, dt, tt)'
 
       - bool:
-          name: withOnosApps
-          default: '{withOnosApps}'
-          description: 'Option to deactivate certain ONOS apps'
+          name: withFlows
+          default: '{withFlows}'
+          description: 'Wheter to push flows from ONOS'
+
+      - bool:
+          name: provisionSubscribers
+          default: '{provisionSubscribers}'
+          description: 'Wheter to provision subscribers durint the tests'
+
+      - bool:
+          name: withEapol
+          default: '{withEapol}'
+          description: 'Wheter EAPOL is enabled for the test'
+
+      - bool:
+          name: withDhcp
+          default: '{withDhcp}'
+          description: 'Wheter DHCP is enabled for the test'
+
+      - bool:
+          name: withIgmp
+          default: '{withIgmp}'
+          description: 'Wheter IGMP is enabled for the test'
+
+      - bool:
+          name: withLLDP
+          default: '{withLLDP}'
+          description: 'Wheter Link Discovery is enabled for the test'
 
       - bool:
           name: withMibTemplate
@@ -457,34 +504,24 @@
           description: 'Option to trigger MIB template command'
 
       - bool:
-          name: setLinkDiscovery
-          default: '{setLinkDiscovery}'
-          description: 'Option to toggle Link Discovery'
+          name: withMonitoring
+          default: '{withMonitoring}'
+          description: 'Option to install Prometheus'
 
       - string:
-          name: BBSIMdelay
-          default: 200
-          description: 'BBSIM Delay, milliseconds'
+          name: openonuAdapterReplicas
+          default: '{openonuAdapterReplicas}'
+          description: 'How many OpenONU adapter instances to run'
 
       - string:
-          name: flowStatInterval
-          default: '{flowStatInterval}'
-          description: 'Flow Stats Collection Interval, milliseconds'
+          name: onosReplicas
+          default: '{onosReplicas}'
+          description: 'How many ONOSes instances to run'
 
       - string:
-          name: portsStatInterval
-          default: {portsStatInterval}
-          description: 'Ports Stats Collection Interval, milliseconds'
-
-      - bool:
-          name: bbsimAuth
-          default: '{bbsimAuth}'
-          description: 'Option to toggle BBSIM EAPOL true/false'
-
-      - bool:
-          name: bbsimDhcp
-          default: '{bbsimDhcp}'
-          description: 'Option to toggle BBSIM DHCP true/false'
+          name: atomixReplicas
+          default: '{atomixReplicas}'
+          description: 'How many Atomix instances to run'
 
       - string:
           name: bbsimImg
@@ -497,8 +534,8 @@
           description: 'BBSim chart name (or location on file system)'
 
       - string:
-          name: volthaImg
-          default: '{volthaImg}'
+          name: rwCoreImg
+          default: '{rwCoreImg}'
           description: 'Custom image selection for VOLTHA (repo:tag)'
 
       - string:
@@ -537,19 +574,195 @@
           description: 'Custom image selection for Openonu Adapter (repo:tag)'
 
       - string:
-          name: extraHelmFlags
-          default: '{extraHelmFlags}'
-          description: 'Any extra helm parameters you want (passed to every helm install command)'
+          name: volthaSystemTestsChange
+          default: ''
+          description: 'Download a change for gerrit in the voltha-system-tests repo, example value: "refs/changes/79/18779/13"'
+
+    project-type: pipeline
+    concurrent: false
+
+    dsl: !include-raw-escape: pipeline/{pipeline-script}
+
+    triggers:
+      - timed: |
+                 TZ=America/Los_Angeles
+                 {time-trigger}
+
+- job-template:
+    id: 'voltha-scale-measurements-dev'
+    name: '{name}'
+    pipeline-script: 'voltha-scale-test.groovy'
+
+    description: |
+      <!-- Managed by Jenkins Job Builder -->
+      Created by {id} job-template from ci-management/jjb/voltha-scale.yaml  <br /><br />
+      Using pipeline {pipeline-script} <br/><br/>
+      Scale measurements for VOLTHA 2.x
+
+    properties:
+      - cord-infra-properties:
+          build-days-to-keep: '{build-days-to-keep}'
+          artifact-num-to-keep: '{artifact-num-to-keep}'
+
+    wrappers:
+      - lf-infra-wrappers:
+          build-timeout: '{build-timeout}'
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+    # default values
+    bbsimImg: voltha/bbsim:master
+    rwCoreImg: voltha/voltha-rw-core:master
+    ofAgentImg: voltha/voltha-ofagent-go:master
+    openoltAdapterImg:  voltha/voltha-openolt-adapter:master
+    openonuAdapterImg: voltha/voltha-openonu-adapter:master
+    onosImg: voltha/voltha-onos:master
+
+    bbsimChart: onf/bbsim
+    volthaChart: onf/voltha
+    openoltAdapterChart: onf/voltha-adapter-openolt
+    openonuAdapterChart: onf/voltha-adapter-openonu
+
+    parameters:
+      - string:
+          name: buildNode
+          default: '{build-node}'
+          description: 'Name of the Jenkins node to run the job on'
 
       - string:
-          name: numOfBbsim
-          default: '{numOfBbsim}'
+          name: logLevel
+          default: 'WARN'
+          description: 'Log level for all the components'
+
+      - string:
+          name: onus
+          default: 2
+          description: 'Number of ONUs to provision'
+
+      - string:
+          name: pons
+          default: 2
+          description: 'Number of PONs to provision'
+
+      - string:
+          name: olts
+          default: 2
           description: 'How many BBSim instances to run'
 
       - string:
-          name: numOfKafka
-          default: '{numOfKafka}'
-          description: 'How many Kafka instances to run'
+          name: workflow
+          default: att
+          description: 'Which workflow are we testing (att, dt, tt)'
+
+      - bool:
+          name: withFlows
+          default: false
+          description: 'Wheter to push flows from ONOS'
+
+      - bool:
+          name: provisionSubscribers
+          default: false
+          description: 'Wheter to provision subscribers durint the tests'
+
+      - bool:
+          name: withEapol
+          default: true
+          description: 'Wheter EAPOL is enabled for the test'
+
+      - bool:
+          name: withDhcp
+          default: true
+          description: 'Wheter DHCP is enabled for the test'
+
+      - bool:
+          name: withIgmp
+          default: false
+          description: 'Wheter IGMP is enabled for the test'
+
+      - bool:
+          name: withLLDP
+          default: false
+          description: 'Wheter Link Discovery is enabled for the test'
+
+      - bool:
+          name: withMibTemplate
+          default: true
+          description: 'Option to trigger MIB template command'
+
+      - bool:
+          name: withMonitoring
+          default: true
+          description: 'Option to install Prometheus'
+
+      - string:
+          name: openonuAdapterReplicas
+          default: 1
+          description: 'How many OpenONU adapter instances to run'
+
+      # the dev node is single node cluster, we can't install a clustered ONOS because of the contraints
+      - string:
+          name: onosReplicas
+          default: 1
+          description: 'How many ONOSes instances to run'
+
+      - string:
+          name: atomixReplicas
+          default: 0
+          description: 'How many Atomix instances to run'
+
+      - string:
+          name: bbsimImg
+          default: '{bbsimImg}'
+          description: 'Custom image selection for BBSIM (repo:tag)'
+
+      - string:
+          name: bbsimChart
+          default: '{bbsimChart}'
+          description: 'BBSim chart name (or location on file system)'
+
+      - string:
+          name: rwCoreImg
+          default: '{rwCoreImg}'
+          description: 'Custom image selection for VOLTHA (repo:tag)'
+
+      - string:
+          name: ofAgentImg
+          default: '{ofAgentImg}'
+          description: 'Custom image selection for OfAgent (repo:tag), only supports the go version'
+
+      - string:
+          name: volthaChart
+          default: '{volthaChart}'
+          description: 'VOLTHA chart name (or location on file system)'
+
+      - string:
+          name: openoltAdapterImg
+          default: '{openoltAdapterImg}'
+          description: 'Custom image selection for Openolt Adapter (repo:tag)'
+
+      - string:
+          name: openoltAdapterChart
+          default: '{openoltAdapterChart}'
+          description: 'OpenOLT chart name (or location on file system)'
+
+      - string:
+          name: openonuAdapterImg
+          default: '{openonuAdapterImg}'
+          description: 'Custom image selection for Openonu Adapter (repo:tag)'
+
+      - string:
+          name: openonuAdapterChart
+          default: '{openonuAdapterChart}'
+          description: 'OpenONU chart name (or location on file system)'
+
+      - string:
+          name: onosImg
+          default: '{onosImg}'
+          description: 'Custom image selection for Openonu Adapter (repo:tag)'
+
+      - string:
+          name: volthaSystemTestsChange
+          default: ''
+          description: 'Download a change for gerrit in the voltha-system-tests repo, example value: "refs/changes/79/18779/13"'
 
     project-type: pipeline
     concurrent: false