voltha-scale-measurements upgrades
- do install useless components of nem-monitoring
- use correct version of of-agent image
- use kubectl "logs" instead of "log"

Change-Id: Icb26579110340251c06e83a0fa36d6e76c38166b
diff --git a/jjb/pipeline/voltha-scale-measurements.groovy b/jjb/pipeline/voltha-scale-measurements.groovy
index c063fd9..038c5b2 100644
--- a/jjb/pipeline/voltha-scale-measurements.groovy
+++ b/jjb/pipeline/voltha-scale-measurements.groovy
@@ -47,7 +47,7 @@
       steps {
         sh '''
           helm repo update
-          helm install -n nem-monitoring cord/nem-monitoring
+          helm install -n nem-monitoring cord/nem-monitoring --set kpi_exporter.enabled=false,dashboards.xos=false,dashboards.onos=false,dashboards.aaa=false,dashboards.voltha=false
 
           IFS=: read -r onosRepo onosTag <<< ${onosImg}
           helm install -n onos onf/onos --set images.onos.repository=${onosRepo} --set images.onos.tag=${onosTag} ${extraHelmFlags}
@@ -198,24 +198,33 @@
         echo $(voltctl device list | grep -v OLT | grep ACTIVE | wc -l) > onus.txt
         echo "#-of-ONUs" > voltha-devices-count.txt
         cat onus.txt >> voltha-devices-count.txt
-
+      '''
+      sh '''
         echo $(sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@localhost ports -e | grep BBSM | wc -l) > ports.txt
         echo "#-of-ports" > onos-ports-count.txt
         cat ports.txt >> onos-ports-count.txt
-
+      '''
+      sh '''
         kubectl get pods -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\t'}{.imageID}{'\\n'}" | sort | uniq -c
+      '''
+      sh '''
         voltctl device list -o json > device-list.json
         python -m json.tool device-list.json > voltha-devices-list.json
+      '''
+      sh '''
         sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@localhost ports > onos-ports-list.txt
         curl -s -X GET -G http://127.0.0.1:31301/api/v1/query --data-urlencode 'query=avg(rate(container_cpu_usage_seconds_total[10m])*100) by (pod_name)' | jq . > cpu-usage.json
-        kubectl log deployment/adapter-open-olt > open-olt-logs.txt
-        kubectl log deployment/adapter-open-onu > open-onu-logs.txt
-        kubectl log deployment/voltha-rw-core > voltha-rw-core-logs.txt
-        kubectl log deployment/voltha-ofagent > voltha-ofagent-logs.txt
-        kubectl log deployment/bbsim > bbsim-logs.txt
-
+      '''
+      sh '''
+        kubectl logs deployment/adapter-open-olt > open-olt-logs.txt
+        kubectl logs deployment/adapter-open-onu > open-onu-logs.txt
+        kubectl logs deployment/voltha-rw-core > voltha-rw-core-logs.txt
+        kubectl logs deployment/voltha-ofagent > voltha-ofagent-logs.txt
+        kubectl logs deployment/bbsim > bbsim-logs.txt
+      '''
+      sh '''
         rm -rf BBSM-12345123451234512345-00000000000001-v1.json device-list.json onus.txt ports.txt temp.txt
-        '''
+      '''
       plot([
         csvFileName: 'plot-numbers.csv',
         csvSeries: [[displayTableFlag: false, exclusionValues: '', file: 'voltha-devices-count.txt', inclusionFlag: 'OFF', url: ''], [displayTableFlag: false, exclusionValues: '', file: 'onos-ports-count.txt', inclusionFlag: 'OFF', url: '']],
diff --git a/jjb/voltha-scale.yaml b/jjb/voltha-scale.yaml
index 798487c..6b43359 100644
--- a/jjb/voltha-scale.yaml
+++ b/jjb/voltha-scale.yaml
@@ -97,7 +97,7 @@
           BBSIMdelay: 200
           # multi-adapter-tmp-changes
           volthaImg: "matteoscandolo/voltha-rw-core:partition"
-          ofAgentImg: "voltha/ofagent-go:master"
+          ofAgentImg: "voltha/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"
@@ -216,7 +216,7 @@
     bbsimImg: voltha/bbsim:master
     bbsimChart: onf/bbsim
     volthaImg: voltha/voltha-rw-core:master
-    ofAgentImg: voltha/voltha-ofagent:master
+    ofAgentImg: voltha/voltha-ofagent-go:master
     volthaChart: onf/voltha
     openoltAdapterImg:  voltha/voltha-openolt-adapter:master
     openoltAdapterChart: onf/voltha-adapter-openolt