[VOL-3690] Using openonu-adapter-go as default

Change-Id: I40304b662384734ca30568071c1ab5a442df6453
diff --git a/releases/voltha-2.2 b/releases/voltha-2.2
index 046ea36..b6589b5 100644
--- a/releases/voltha-2.2
+++ b/releases/voltha-2.2
@@ -7,3 +7,5 @@
 export VOLTHA_ADAPTER_OPEN_OLT_CHART_VERSION=2.2.0
 export VOLTHA_ADAPTER_OPEN_ONU_CHART_VERSION=2.2.0
 export ONOS_CHART_VERSION=1.1.4
+
+export EXTRA_HELM_FLAGS="--set use_openonu_adapter_go=false "
\ No newline at end of file
diff --git a/releases/voltha-2.3 b/releases/voltha-2.3
index f0b174f..8926dbf 100644
--- a/releases/voltha-2.3
+++ b/releases/voltha-2.3
@@ -17,7 +17,7 @@
 # kind-voltha's default which is 'master'.
 # Also we need to specify the tag for voltha/voltha-onos image since this is
 # not in the ONOS chart.
-export EXTRA_HELM_FLAGS="--set defaults.image_tag=null,images.onos.tag=4.0.2 "
+export EXTRA_HELM_FLAGS="--set defaults.image_tag=null,images.onos.tag=4.0.2,use_openonu_adapter_go=false "
 
 # In voltha-2.3 multiple BBSim beployment were namend bbsim, bbsim1, bbsim2..
 # In master we made the names consistent bbsim0, bbsim1, ...
diff --git a/releases/voltha-2.3.0-rc1 b/releases/voltha-2.3.0-rc1
index a6f08c4..d892ab6 100644
--- a/releases/voltha-2.3.0-rc1
+++ b/releases/voltha-2.3.0-rc1
@@ -7,3 +7,5 @@
 export VOLTHA_ADAPTER_OPEN_OLT_CHART_VERSION=2.2.2
 export VOLTHA_ADAPTER_OPEN_ONU_CHART_VERSION=2.2.2
 export ONOS_CHART_VERSION=1.1.4
+
+export EXTRA_HELM_FLAGS="--set use_openonu_adapter_go=false "
diff --git a/releases/voltha-2.4 b/releases/voltha-2.4
index 2f294f6..ceab091 100644
--- a/releases/voltha-2.4
+++ b/releases/voltha-2.4
@@ -18,4 +18,4 @@
 # kind-voltha's default which is 'master'.
 # Also we need to specify the tag for voltha/voltha-onos image since this is
 # not in the ONOS chart.
-export EXTRA_HELM_FLAGS="--set defaults.image_tag=null,images.onos.tag=4.1.4 "
+export EXTRA_HELM_FLAGS="--set defaults.image_tag=null,images.onos.tag=4.1.4,use_openonu_adapter_go=false "
diff --git a/releases/voltha-2.5 b/releases/voltha-2.5
index a5c5d3e..9469910 100644
--- a/releases/voltha-2.5
+++ b/releases/voltha-2.5
@@ -22,4 +22,4 @@
 # kind-voltha's default which is 'master'.
 # Also we need to specify the tag for voltha/voltha-onos image since this is
 # not in the ONOS chart.
-export EXTRA_HELM_FLAGS="--set defaults.image_tag=null,images.onos.tag=4.1.8 "
+export EXTRA_HELM_FLAGS="--set defaults.image_tag=null,images.onos.tag=4.1.8,use_openonu_adapter_go=false "
diff --git a/values.yaml b/values.yaml
index 33bb251..d864f2a 100644
--- a/values.yaml
+++ b/values.yaml
@@ -32,12 +32,12 @@
 # ------------------------------
 # There are currently two implementations of OPENONU-ADAPTER: the original
 # written in Python and the reimplementation written in Go. The variable
-# `use_openonu_adapter_go` can be used to optionally use the new Go
+# `use_openonu_adapter_go` can be set to false to optionally use the old Py
 # implementation. This is done by setting that value to `true`.
 #
 # Along with this change you will also may need to set the Docker image
 # information below (search for START_OPENONU_ADAPTER_GO).
-use_openonu_adapter_go: false
+use_openonu_adapter_go: true
 
 images:
   onos:
diff --git a/voltha b/voltha
index 6413d39..2a2af90 100755
--- a/voltha
+++ b/voltha
@@ -2531,8 +2531,11 @@
 # therecanbeonlyone set hardcoded to true for backward compatibility
 INTERNAL_EXTRA_HELM_INSTALL_ARGS="--set therecanbeonlyone=true"
 
-# customize the topics in case of multiple stacks sharing the same kafka
-INTERNAL_EXTRA_HELM_INSTALL_ARGS+=" --set defaults.topics.core_topic=$NAME-rwcore,defaults.kv_store_data_prefix=service/$NAME"
+if [[ $(semver_greater "$VOLTHA_CHART_VERSION" "2.6.7") == "true" ]]; then
+  # this is past voltha-2.5, we support multiple stacks
+  # customize the topics in case of multiple stacks sharing the same kafka
+  INTERNAL_EXTRA_HELM_INSTALL_ARGS+=" --set defaults.topics.core_topic=$NAME-rwcore,defaults.kv_store_data_prefix=service/$NAME"
+fi
 
 case $WITH_ETCD in
     no)
@@ -2622,7 +2625,10 @@
 if [ "$WITH_ADAPTERS" == "yes" ]; then
     STIME="$(date +%s)"
     EXPECT=0
-    INTERNAL_EXTRA_HELM_INSTALL_ARGS+=" --set defaults.topics.core_topic=$NAME-rwcore,defaults.topics.adapter_open_olt_topic=$NAME-openolt,defaults.topics.adapter_open_onu_topic=$NAME-brcm_openomci_onu,defaults.kv_store_data_prefix=service/$NAME"
+    if [[ $(semver_greater "$VOLTHA_ADAPTER_OPEN_ONU_CHART_VERSION" "2.5.0") == "true" ]]; then
+      # this is past voltha-2.5, we support multiple stacks
+      INTERNAL_EXTRA_HELM_INSTALL_ARGS+=" --set defaults.topics.core_topic=$NAME-rwcore,defaults.topics.adapter_open_olt_topic=$NAME-openolt,defaults.topics.adapter_open_onu_topic=$NAME-brcm_openomci_onu,defaults.kv_store_data_prefix=service/$NAME"
+    fi
     if is_in "$WITH_ETCD" "yes,external"; then
         _HOST=etcd.$INFRA_NS.svc
         _PORT=2379