[VOL-4100] Replaces installBBSim with bbsimReplicas in voltha/master physical-build pipeline

Change-Id: Ie5a85c572f9a4a09e274afce5027b2c339394694
diff --git a/jjb/pipeline/voltha/master/physical-build.groovy b/jjb/pipeline/voltha/master/physical-build.groovy
index 6f6f9f9..47c9907 100644
--- a/jjb/pipeline/voltha/master/physical-build.groovy
+++ b/jjb/pipeline/voltha/master/physical-build.groovy
@@ -108,10 +108,7 @@
             "--set onos-classic.onosOfPort=31653 " +
             "--set onos-classic.individualOpenFlowNodePorts=true "
 
-
-            def bbsimReplica = 0
-            if (installBBSim.toBoolean()) {
-              bbsimReplica = 1
+            if (bbsimReplicas.toInteger() != 0) {
               localHelmFlags = localHelmFlags + " --set onu=${onuNumber},pon=${ponNumber} "
             }
 
@@ -127,7 +124,7 @@
               atomixReplica: params.NumOfAtomix,
               kafkaReplica: params.NumOfKafka,
               etcdReplica: params.NumOfEtcd,
-              bbsimReplica: bbsimReplica.toInteger(),
+              bbsimReplica: bbsimReplicas.toInteger(),
               ])
           }
           sh """
diff --git a/jjb/voltha-test/voltha-nightly-jobs.yaml b/jjb/voltha-test/voltha-nightly-jobs.yaml
index 0f41795..f819d1f 100644
--- a/jjb/voltha-test/voltha-nightly-jobs.yaml
+++ b/jjb/voltha-test/voltha-nightly-jobs.yaml
@@ -93,12 +93,18 @@
           default: '{num-of-onos}'
           description: 'Installs the specified Number of ONOS instances'
 
+      # installBBSim is not used in the master branch pipeline, remove after 2.8
       - bool:
           name: installBBSim
           default: '{installBBSim}'
           description: "Install the BBSim container"
 
       - string:
+          name: bbsimReplicas
+          default: '{bbsimReplicas}'
+          description: 'Installs the specified Number of BBSim Instances'
+
+      - string:
           name: onuNumber
           default: '{num-of-onus}'
           description: "Onus per PonPort"
@@ -218,7 +224,9 @@
     volthaHelmChartsChange: ''
     profile: 'Default'
     logLevel: 'DEBUG'
+    # installBBSim is not used in the master branch pipeline, remove after 2.8
     installBBSim: false
+    bbsimReplicas: 0
     num-of-onus: 0
     num-of-ponports: 0
     extraHelmFlags: ''
@@ -257,7 +265,9 @@
     volthaHelmChartsChange: ''
     profile: 'Default'
     logLevel: 'DEBUG'
+    # installBBSim is not used in the master branch pipeline, remove after 2.8
     installBBSim: false
+    bbsimReplicas: 0
     num-of-onus: 0
     num-of-ponports: 0
     extraHelmFlags: ''
@@ -292,6 +302,8 @@
     volthaHelmChartsChange: '' # this is not supported in the VOLTHA-2.7 build, but the parameters are shared, ideally we should split them
     logLevel: 'DEBUG'
     installBBSim: false
+    # bbsimReplicas is not applicable for 2.7 Jobs
+    bbsimReplicas: 0
     num-of-onus: 0
     num-of-ponports: 0
     num-of-kafka: 1
diff --git a/jjb/voltha-test/voltha.yaml b/jjb/voltha-test/voltha.yaml
index 25f2300..aa28701 100644
--- a/jjb/voltha-test/voltha.yaml
+++ b/jjb/voltha-test/voltha.yaml
@@ -301,7 +301,7 @@
       - 'build_voltha_pod_manual':
           build-node: 'menlo-soak-pod'
           config-pod: 'onf-soak-pod'
-          installBBSim: true
+          bbsimReplicas: 1
           profile: '1T8GEM'
           name-extension: '_DT'
           work-flow: 'DT'