Merge "Change REUSE license scan to only check file changes"
diff --git a/jjb/pipeline/voltha-go-multi-tests.groovy b/jjb/pipeline/voltha-go-multi-tests.groovy
index d95f23b..4d0fde1 100644
--- a/jjb/pipeline/voltha-go-multi-tests.groovy
+++ b/jjb/pipeline/voltha-go-multi-tests.groovy
@@ -66,6 +66,7 @@
         sh """
            cd $HOME
            [ -d kind-voltha ] || git clone https://github.com/ciena/kind-voltha.git
+           rm -rf $HOME/kind-voltha/scripts/logger
            cd $HOME/kind-voltha
            git pull
            """
diff --git a/jjb/pipeline/voltha-go-tests.groovy b/jjb/pipeline/voltha-go-tests.groovy
index c70f0ab..38efb38 100644
--- a/jjb/pipeline/voltha-go-tests.groovy
+++ b/jjb/pipeline/voltha-go-tests.groovy
@@ -66,6 +66,7 @@
         sh """
            cd $HOME
            [ -d kind-voltha ] || git clone https://github.com/ciena/kind-voltha.git
+           rm -rf $HOME/kind-voltha/scripts/logger
            cd $HOME/kind-voltha
            git pull
            """
diff --git a/jjb/pipeline/voltha-scale-measurements.groovy b/jjb/pipeline/voltha-scale-measurements.groovy
index 4fcb401..9994549 100644
--- a/jjb/pipeline/voltha-scale-measurements.groovy
+++ b/jjb/pipeline/voltha-scale-measurements.groovy
@@ -7,16 +7,6 @@
   environment {
     KUBECONFIG="$HOME/.kube/kind-config-voltha-minimal"
     VOLTCONFIG="$HOME/.volt/config-minimal"
-    PATH="$WORKSPACE/kind-voltha/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-    TYPE="minimal"
-    FANCY=0
-    SECONDS=0
-    WITH_SIM_ADAPTERS="n"
-    WITH_RADIUS="y"
-    WITH_BBSIM="y"
-    VOLTHA_LOG_LEVEL="WARN"
-    CONFIG_SADIS="n"
-    ROBOT_MISC_ARGS="-d $WORKSPACE/RobotLogs -v teardown_device:False"
     SSHPASS="karaf"
     DEPLOY_K8S="n"
   }
@@ -64,13 +54,13 @@
 
           IFS=: read -r volthaRepo volthaTag <<< ${volthaImg}
           IFS=: read -r ofAgentRepo ofAgentTag <<< ${ofAgentImg}
-          helm install -n voltha ${volthaChart} -f /home/cord/voltha-scale/voltha-values.yaml --set images.voltha.repository=${volthaRepo},images.voltha.tag=${volthaTag},images.ofagent.repository=${ofAgentRepo},images.ofagent.tag=${ofAgentTag} ${extraHelmFlags}
+          helm install -n voltha ${volthaChart} -f /home/cord/voltha-scale/voltha-values.yaml --set defaults.log_level=${logLevel},images.voltha.repository=${volthaRepo},images.voltha.tag=${volthaTag},images.ofagent.repository=${ofAgentRepo},images.ofagent.tag=${ofAgentTag} ${extraHelmFlags}
 
           IFS=: read -r openoltAdapterRepo openoltAdapterTag <<< ${openoltAdapterImg}
-          helm install -n openolt ${openoltAdapterChart} -f /home/cord/voltha-scale/voltha-values.yaml --set images.adapter_open_olt.repository=${openoltAdapterRepo},images.adapter_open_olt.tag=${openoltAdapterTag} ${extraHelmFlags}
+          helm install -n openolt ${openoltAdapterChart} -f /home/cord/voltha-scale/voltha-values.yaml --set defaults.log_level=${logLevel},images.adapter_open_olt.repository=${openoltAdapterRepo},images.adapter_open_olt.tag=${openoltAdapterTag} ${extraHelmFlags}
 
           IFS=: read -r openonuAdapterRepo openonuAdapterTag <<< ${openonuAdapterImg}
-          helm install -n openonu ${openonuAdapterChart} -f /home/cord/voltha-scale/voltha-values.yaml --set images.adapter_open_onu.repository=${openonuAdapterRepo},images.adapter_open_onu.tag=${openonuAdapterTag} ${extraHelmFlags}
+          helm install -n openonu ${openonuAdapterChart} -f /home/cord/voltha-scale/voltha-values.yaml --set defaults.log_level=${logLevel},images.adapter_open_onu.repository=${openonuAdapterRepo},images.adapter_open_onu.tag=${openonuAdapterTag} ${extraHelmFlags}
 
           IFS=: read -r bbsimRepo bbsimTag <<< ${bbsimImg}
           helm install -n bbsim ${bbsimChart} --set enablePerf=true,pon=${ponPorts},onu=${onuPerPon},auth=${bbsimAuth},dhcp=${bbsimDhcp},delay=${BBSIMdelay},images.bbsim.repository=${bbsimRepo},images.bbsim.tag=${bbsimTag} ${extraHelmFlags}
@@ -128,8 +118,8 @@
     stage('configuration') {
       steps {
         sh '''
-          #Setting LOG level to WARN
-          sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@localhost log:set WARN
+          #Setting LOG level to ${logLevel}
+          sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@localhost log:set ${logLevel}
           kubectl exec $(kubectl get pods | grep bbsim | awk 'NR==1{print $1}') bbsimctl log warn false
           #Setting link discovery
           sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@localhost cfg set org.onosproject.provider.lldp.impl.LldpLinkProvider enabled ${setLinkDiscovery}
@@ -213,7 +203,7 @@
         echo "#-of-ports" > onos-ports-count.txt
         cat ports.txt >> onos-ports-count.txt
 
-        kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\t'}{.imageID}{'\\n'}" | sort | uniq -c
+        kubectl get pods -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\t'}{.imageID}{'\\n'}" | sort | uniq -c
         voltctl device list -o json > device-list.json
         python -m json.tool device-list.json > voltha-devices-list.json
         sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@localhost ports > onos-ports-list.txt
diff --git a/jjb/shell/ansiblelint.sh b/jjb/shell/ansiblelint.sh
index ebb5328..f9eca6f 100755
--- a/jjb/shell/ansiblelint.sh
+++ b/jjb/shell/ansiblelint.sh
@@ -16,7 +16,7 @@
 
 # ansiblelint.sh - check all yaml files that they pass the ansible-lint tool
 
-set +e -u -o pipefail
+set +e -o pipefail
 
 fail_ansible=0
 
@@ -30,16 +30,16 @@
 
 # allow directories to be skipped
 # space separated directory list expected in SKIP_DIRS
-
-SKIP_DIRS=""
 SKIP_REGEX=""
 
-if [[ -n $SKIP_DIRS ]]; then
+if [ -n "$SKIP_DIRS" ]; then
   echo "=> Skipping files matching these directories: $SKIP_DIRS"
   # prefix with ./ as find generates, swap spaces for pipes
-  SKIP_REGEX=$(echo $SKIP_DIRS | sed 's/[^ ]*/.\/&\//g' | sed 's/ /|/g')
+  SKIP_REGEX=$(echo "$SKIP_DIRS" | sed 's/[^ ]*/.\/&\//g' | sed 's/ /|/g')
 fi
 
+set -u
+
 while IFS= read -r -d '' yf
 do
   if [[ $yf =~ $SKIP_REGEX ]]; then
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index e1539db..7e14daa 100644
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -132,7 +132,7 @@
 
       - string:
           name: extraHelmFlags
-          default: '--set defaults.image_tag={default-image-tag},onu={onus},pon={pons},use_ofagent_go=True,images.ofagent.repository=voltha/ofagent-go,images.ofagent.tag=master'
+          default: '--set defaults.image_tag={default-image-tag},onu={onus},pon={pons}'
           description: 'Helm flags to pass to ./voltha up'
 
       - string:
@@ -189,7 +189,7 @@
 - job-template:
     id: 'voltha-patch-test'
     name: 'verify_{project}_sanity-test{name-extension}'
-    extra-helm-flags: '--set defaults.image_tag=master,use_ofagent_go=True,images.ofagent.repository=voltha/ofagent-go,images.ofagent.tag=master'
+    extra-helm-flags: ''
     skip-vote: false
 
     description: |
diff --git a/jjb/voltha-scale.yaml b/jjb/voltha-scale.yaml
index 71e20b6..879094c 100644
--- a/jjb/voltha-scale.yaml
+++ b/jjb/voltha-scale.yaml
@@ -8,6 +8,22 @@
 
     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-16-1000ms'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          onuPerPon: 16
+          ponPorts: 8
+          expectedOnus: 128
+          BBSIMdelay: 1000
+      - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-8-32-200ms'
           build-node: 'onf-pod1-head-node'
           time-trigger: "H H/4 * * *"
@@ -55,6 +71,7 @@
           ponPorts: 4
           expectedOnus: 128
           BBSIMdelay: 1000
+
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-16-32-200ms'
           build-node: 'onf-pod1-head-node'
@@ -63,14 +80,29 @@
           ponPorts: 16
           expectedOnus: 512
           BBSIMdelay: 200
+          # multi-adapter-tmp-changes
+          volthaImg: matteoscandolo/voltha-rw-core:partition
+          ofAgentImg: voltha/ofagent-go:master
+          openoltAdapterImg:  matteoscandolo/voltha-openolt-adapter:partition
+          openonuAdapterImg: matteoscandolo/voltha-openonu-adapter:partition
+          openonuAdapterChart: /home/cord/voltha-helm-charts/voltha-adapter-openonu
+          extraHelmFlags: --set use_ofagent_go=true -f /home/cord/partition-values.yaml
       - 'voltha-scale-measurements-periodic':
-          name: 'voltha-scale-measurements-periodic-16-32-1000ms'
+          name: 'voltha-scale-measurements-periodic-16-64-200ms'
           build-node: 'onf-pod1-head-node'
           time-trigger: "H H/4 * * *"
-          onuPerPon: 32
+          onuPerPon: 64
           ponPorts: 16
-          expectedOnus: 512
-          BBSIMdelay: 1000
+          expectedOnus: 1024
+          BBSIMdelay: 200
+          # multi-adapter-tmp-changes
+          volthaImg: matteoscandolo/voltha-rw-core:partition
+          ofAgentImg: voltha/ofagent-go:master
+          openoltAdapterImg:  matteoscandolo/voltha-openolt-adapter:partition
+          openonuAdapterImg: matteoscandolo/voltha-openonu-adapter:partition
+          openonuAdapterChart: /home/cord/voltha-helm-charts/voltha-adapter-openonu
+          extraHelmFlags: --set use_ofagent_go=true -f /home/cord/partition-values.yaml
+
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-4-64-200ms'
           build-node: 'onf-pod1-head-node'
@@ -180,6 +212,19 @@
           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: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:4.0.1
+    extraHelmFlags: ''
+
     parameters:
       - string:
           name: buildNode
@@ -187,6 +232,11 @@
           description: 'Name of the Jenkins node to run the job on'
 
       - string:
+          name: logLevel
+          default: 'WARN'
+          description: 'Log level for all the components'
+
+      - string:
           name: onuPerPon
           default: '{onuPerPon}'
           description: 'Number of ONUs to provision'
@@ -248,57 +298,57 @@
 
       - string:
           name: bbsimImg
-          default: 'voltha/bbsim:master'
+          default: '{bbsimImg}'
           description: 'Custom image selection for BBSIM (repo:tag)'
 
       - string:
           name: bbsimChart
-          default: onf/bbsim
+          default: '{bbsimChart}'
           description: 'BBSim chart name (or location on file system)'
 
       - string:
           name: volthaImg
-          default: 'voltha/voltha-rw-core:master'
+          default: '{volthaImg}'
           description: 'Custom image selection for VOLTHA (repo:tag)'
 
       - string:
           name: ofAgentImg
-          default: 'voltha/voltha-ofagent:master'
+          default: '{ofAgentImg}'
           description: 'Custom image selection for OfAgent (repo:tag)'
 
       - string:
           name: volthaChart
-          default: onf/voltha
+          default: '{volthaChart}'
           description: 'VOLTHA chart name (or location on file system)'
 
       - string:
           name: openoltAdapterImg
-          default: voltha/voltha-openolt-adapter:master
+          default: '{openoltAdapterImg}'
           description: 'Custom image selection for Openolt Adapter (repo:tag)'
 
       - string:
           name: openoltAdapterChart
-          default: onf/voltha-adapter-openolt
+          default: '{openoltAdapterChart}'
           description: 'OpenOLT chart name (or location on file system)'
 
       - string:
           name: openonuAdapterImg
-          default: voltha/voltha-openonu-adapter:master
+          default: '{openonuAdapterImg}'
           description: 'Custom image selection for Openonu Adapter (repo:tag)'
 
       - string:
           name: openonuAdapterChart
-          default: onf/voltha-adapter-openonu
+          default: '{openonuAdapterChart}'
           description: 'OpenONU chart name (or location on file system)'
 
       - string:
           name: onosImg
-          default: voltha/voltha-onos:4.0.1
+          default: '{onosImg}'
           description: 'Custom image selection for Openonu Adapter (repo:tag)'
 
       - string:
           name: extraHelmFlags
-          default: ''
+          default: '{extraHelmFlags}'
           description: 'Any extra helm parameters you want (passed to every helm install command)'
 
     project-type: pipeline
@@ -332,6 +382,19 @@
           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: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:4.0.1
+    extraHelmFlags: ''
+
     parameters:
       - string:
           name: buildNode
@@ -339,6 +402,11 @@
           description: 'Name of the Jenkins node to run the job on'
 
       - string:
+          name: logLevel
+          default: 'WARN'
+          description: 'Log level for all the components'
+
+      - string:
           name: onuPerPon
           default: 1
           description: 'Number of ONUs to provision'
@@ -400,57 +468,57 @@
 
       - string:
           name: bbsimImg
-          default: voltha/bbsim:master
+          default: '{bbsimImg}'
           description: 'Custom image selection for BBSIM (repo:tag)'
 
       - string:
           name: bbsimChart
-          default: onf/bbsim
+          default: '{bbsimChart}'
           description: 'BBSim chart name (or location on file system)'
 
       - string:
           name: volthaImg
-          default: voltha/voltha-rw-core:master
+          default: '{volthaImg}'
           description: 'Custom image selection for VOLTHA (repo:tag)'
 
       - string:
           name: ofAgentImg
-          default: 'voltha/voltha-ofagent:master'
+          default: '{ofAgentImg}'
           description: 'Custom image selection for OfAgent (repo:tag)'
 
       - string:
           name: volthaChart
-          default: onf/voltha
+          default: '{volthaChart}'
           description: 'VOLTHA chart name (or location on file system)'
 
       - string:
           name: openoltAdapterImg
-          default: voltha/voltha-openolt-adapter:master
+          default: '{openoltAdapterImg}'
           description: 'Custom image selection for Openolt Adapter (repo:tag)'
 
       - string:
           name: openoltAdapterChart
-          default: onf/voltha-adapter-openolt
+          default: '{openoltAdapterChart}'
           description: 'OpenOLT chart name (or location on file system)'
 
       - string:
           name: openonuAdapterImg
-          default: voltha/voltha-openonu-adapter:master
+          default: '{openonuAdapterImg}'
           description: 'Custom image selection for Openonu Adapter (repo:tag)'
 
       - string:
           name: openonuAdapterChart
-          default: onf/voltha-adapter-openonu
+          default: '{openonuAdapterChart}'
           description: 'OpenONU chart name (or location on file system)'
 
       - string:
           name: onosImg
-          default: voltha/voltha-onos:4.0.1
+          default: '{onosImg}'
           description: 'Custom image selection for Openonu Adapter (repo:tag)'
 
       - string:
           name: extraHelmFlags
-          default: ''
+          default: '{extraHelmFlags}'
           description: 'Any extra helm parameters you want (passed to every helm install command)'
 
     project-type: pipeline