[VOL-2778] Supporting required configuration for BBSim v1.0.0-dev

Change-Id: I26300dd3fb3a4b89bc09736760599c5bcff0d164
diff --git a/bbsim/Chart.yaml b/bbsim/Chart.yaml
index d6cc8da..d0c59a4 100644
--- a/bbsim/Chart.yaml
+++ b/bbsim/Chart.yaml
@@ -15,5 +15,5 @@
 name: bbsim
 description: Broadband Simulator
 icon: https://guide.opencord.org/logos/cord.svg
-version: 3.1.0
-appVersion: 0.2.6
+version: 4.0.0-dev
+appVersion: master
diff --git a/bbsim/templates/configmap-services.yaml b/bbsim/templates/configmap-services.yaml
new file mode 100644
index 0000000..49c5409
--- /dev/null
+++ b/bbsim/templates/configmap-services.yaml
@@ -0,0 +1,24 @@
+---
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This configmap mounts a yaml file in the container to describe the bbsim services
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: bbsim-services-{{ .Values.olt_id }}
+data:
+  bbsimServicesConfig: |
+{{ toYaml .Values.servicesConfig | indent 4 }}
diff --git a/bbsim/templates/deployment.yaml b/bbsim/templates/deployment.yaml
index a908207..6c02543 100644
--- a/bbsim/templates/deployment.yaml
+++ b/bbsim/templates/deployment.yaml
@@ -60,20 +60,8 @@
             "-pon", "{{ .Values.pon }}",
             "-onu", "{{ .Values.onu }}",
             "-logLevel", "{{ $log_level }}",
-            {{ if .Values.auth -}}
-            "-auth",
-            {{ end -}}
-            {{ if .Values.dhcp -}}
-            "-dhcp",
-            {{ end -}}
-            {{ if .Values.igmp -}}
-            "-igmp",
-            {{ end -}}
-            "-c_tag", "{{ .Values.c_tag }}",
-            "-c_tag_allocation", "{{ .Values.c_tag_allocation }}",
-            "-s_tag", "{{ .Values.s_tag }}",
-            "-s_tag_allocation", "{{ .Values.s_tag_allocation }}",
             "-delay", "{{ .Values.delay }}",
+            "-services", "configs/services.yaml",
             {{ if .Values.enableEvents -}}
             "-enableEvents",
             "-kafkaAddress", "{{ .Values.kafkaAddress }}",
@@ -81,7 +69,6 @@
             {{ if .Values.enablePerf -}}
             "-enableperf",
             {{ end -}}
-            "-sadisFormat", "{{ .Values.sadisFormat }}",
             "-kafkaEventTopic", "{{ .Values.kafkaEventTopic }}",
             {{ if .Values.authRetry -}}
             "-authRetry",
@@ -111,6 +98,17 @@
                   fieldPath: metadata.namespace
           resources:
 {{ toYaml .Values.resources | indent 12 }}
+          volumeMounts:
+            - name: bbsim-services-config
+              mountPath: /app/configs/services.yaml
+              subPath: services.yaml
+      volumes:
+        - name: bbsim-services-config
+          configMap:
+            name: bbsim-services-{{ .Values.olt_id }}
+            items:
+              - key: bbsimServicesConfig
+                path: services.yaml
     {{- with .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml . | indent 8 }}
diff --git a/bbsim/values.yaml b/bbsim/values.yaml
index 131b7db..6d1b951 100644
--- a/bbsim/values.yaml
+++ b/bbsim/values.yaml
@@ -27,15 +27,7 @@
 nni: 1
 pon: 1
 onu: 1
-auth: false
-igmp: false
-dhcp: false
 delay: 200
-c_tag: 900
-c_tag_allocation: unique
-s_tag: 900
-s_tag_allocation: shared
-sadisFormat: att
 log_level: '{{ .Values.defaults.log_level }}'
 kafkaEventTopic: ""
 authRetry: false
@@ -49,6 +41,18 @@
 enableEvents: false
 kafkaAddress: ":9092"
 
+servicesConfig:
+  workflow: att
+  services:
+    - name: hsia
+      c_tag: 900
+      c_tag_allocation: unique
+      s_tag: 900
+      s_tag_allocation: shared
+      needs_eapol: true
+      needs_dhcp: true
+      tp_id: 64
+
 images:
   bbsim:
     registry: '{{ .Values.defaults.image_registry }}'