Merge "Enabling persistency on single stack VOLTHA jobs"
diff --git a/jjb/pipeline/voltha/master/voltha-tt-physical-functional-tests.groovy b/jjb/pipeline/voltha/master/voltha-tt-physical-functional-tests.groovy
index 7ed2c37..d738ba3 100644
--- a/jjb/pipeline/voltha/master/voltha-tt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/master/voltha-tt-physical-functional-tests.groovy
@@ -143,11 +143,15 @@
       }
       steps {
         sh """
+        device_teardown=True
+        if [ ${params.enableMultiUni} = true ]; then
+           device_teardown=False
+        fi
         mkdir -p $ROBOT_LOGS_DIR
         if ( ${powerSwitch} ); then
-             export ROBOT_MISC_ARGS="--removekeywords wuks -i functionalTT -i PowerSwitch -i sanityTT -i sanityTT-MCAST -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
+             export ROBOT_MISC_ARGS="--removekeywords wuks -i functionalTT -i PowerSwitch -i sanityTT -i sanityTT-MCAST -e bbsim -e notready -d $ROBOT_LOGS_DIR -v teardown_device:\${device_teardown} -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
         else
-             export ROBOT_MISC_ARGS="--removekeywords wuks -i functionalTT -e PowerSwitch -i sanityTT -i sanityTT-MCAST -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
+             export ROBOT_MISC_ARGS="--removekeywords wuks -i functionalTT -e PowerSwitch -i sanityTT -i sanityTT-MCAST -e bbsim -e notready -d $ROBOT_LOGS_DIR -v teardown_device:\${device_teardown} -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
         fi
         make -C $WORKSPACE/voltha-system-tests voltha-tt-test || true
         """
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index b91b0b6..4fd578f 100755
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -254,6 +254,18 @@
               workflow: tt
               flags: ""
               teardown: true
+            - target: voltha-onu-flows-check-single-kind-att
+              workflow: att
+              flags: ""
+              teardown: true
+            - target: voltha-onu-flows-check-single-kind-dt
+              workflow: dt
+              flags: ""
+              teardown: true
+            - target: voltha-onu-flows-check-single-kind-tt
+              workflow: tt
+              flags: ""
+              teardown: true
 
       - 'voltha-periodic-test':
           name: 'periodic-voltha-openonu-go-test-bbsim-2.8'
@@ -368,6 +380,18 @@
               workflow: tt
               flags: ""
               teardown: true
+            - target: voltha-onu-flows-check-single-kind-att
+              workflow: att
+              flags: ""
+              teardown: true
+            - target: voltha-onu-flows-check-single-kind-dt
+              workflow: dt
+              flags: ""
+              teardown: true
+            - target: voltha-onu-flows-check-single-kind-tt
+              workflow: tt
+              flags: ""
+              teardown: true
 
       - 'voltha-periodic-test':
           name: 'periodic-voltha-multiple-olts-openonu-go-test-bbsim'
@@ -412,6 +436,18 @@
               workflow: tt
               flags: ""
               teardown: true
+            - target: voltha-onu-flows-check-multiolt-kind-att
+              workflow: att
+              flags: ""
+              teardown: true
+            - target: voltha-onu-flows-check-multiolt-kind-dt
+              workflow: dt
+              flags: ""
+              teardown: true
+            - target: voltha-onu-flows-check-multiolt-kind-tt
+              workflow: tt
+              flags: ""
+              teardown: true
           time-trigger: "H H/12 * * *"
 
       - 'voltha-periodic-test':
@@ -505,6 +541,18 @@
               workflow: tt
               flags: ""
               teardown: true
+             - target: voltha-onu-flows-check-multiolt-kind-att
+              workflow: att
+              flags: ""
+              teardown: true
+            - target: voltha-onu-flows-check-multiolt-kind-dt
+              workflow: dt
+              flags: ""
+              teardown: true
+            - target: voltha-onu-flows-check-multiolt-kind-tt
+              workflow: tt
+              flags: ""
+              teardown: true
           olts: 2
 
       - 'voltha-periodic-test':
diff --git a/jjb/voltha-test/voltha.yaml b/jjb/voltha-test/voltha.yaml
index 3aae296..7c728e2 100644
--- a/jjb/voltha-test/voltha.yaml
+++ b/jjb/voltha-test/voltha.yaml
@@ -564,30 +564,29 @@
           power-switch: True
           pipeline-script: 'voltha/voltha-2.8/voltha-dt-physical-functional-tests.groovy'
 
-     # Berlin pod with gpon olt/onu - master 1T8GEM tech profile and openonu go and timer based job
+      # Berlin pod with olt/onu - master versions timer based job , two OLTs
       - 'build_voltha_pod_release_timer':
           build-node: 'dt-berlin-community-pod'
-          config-pod: 'dt-berlin-pod-openonugo'
-          'disable-job': true
-          name-extension: '_DT_openonugo'
+          config-pod: 'dt-berlin-pod-multi-olt'
+          name-extension: '_DT'
           work-flow: 'DT'
-          configurePod: true
+          release: '2.8'
+          branch: 'voltha-2.8'
           profile: '1T8GEM'
           num-of-onos: '3'
           num-of-atomix: '3'
-          # Update this value accordingly once the job is enabled
-          time: ''
+          pipeline-script: 'voltha/voltha-2.8/physical-build.groovy'
+          time: '6'
 
-      # Berlin POD test job - master versions, uses 1T8GEM tech profile and openonu go on voltha branch
+      # Berlin POD test job - master versions: uses tech profile on voltha branch
       - 'build_voltha_pod_test':
           build-node: 'dt-berlin-community-pod'
-          config-pod: 'dt-berlin-pod-openonugo'
-          'disable-job': true
-          name-extension: '_DT_openonugo'
+          config-pod: 'dt-berlin-pod-multi-olt'
+          release: '2.8'
+          branch: 'voltha-2.8'
+          name-extension: '_DT'
           work-flow: 'DT'
-          release: 'master'
-          branch: 'master'
           test-repo: 'voltha-system-tests'
           profile: '1T8GEM'
           power-switch: True
-          pipeline-script: 'voltha/master/voltha-dt-physical-functional-tests.groovy'
+          pipeline-script: 'voltha/voltha-2.8/voltha-dt-physical-functional-tests.groovy'
diff --git a/vars/volthaStackDeploy.groovy b/vars/volthaStackDeploy.groovy
index 9e65d90..ae8533c 100644
--- a/vars/volthaStackDeploy.groovy
+++ b/vars/volthaStackDeploy.groovy
@@ -55,10 +55,7 @@
           def bbsimCfg = readYaml file: "$WORKSPACE/voltha-helm-charts/examples/${cfg.workflow}-values.yaml"
           // NOTE we assume that the only service that needs a different s_tag is the first one in the list
           bbsimCfg["servicesConfig"]["services"][0]["s_tag"] = startingStag + i
-          // remove the ONOS config that is defined in the values file
-          // it's not relevant for BBSim (it won't break anything, but it will clustter the console output)
-          bbsimCfg.remove('onos')
-          println "Using BBSim Service config ${bbsimCfg}"
+          println "Using BBSim Service config ${bbsimCfg['servicesConfig']}"
           writeYaml file: "$WORKSPACE/bbsimCfg${cfg.stackId}${i}.yaml", data: bbsimCfg
         } else {
           // NOTE if it's DT just copy the file over