Multiple ponsimONU support - template updates

Change-Id: I1b4c79f61e0d0f9b566c09517c939bee890b41a3
diff --git a/xos-profiles/ponsim-pod/Chart.yaml b/xos-profiles/ponsim-pod/Chart.yaml
index 6a714bb..3bce47f 100644
--- a/xos-profiles/ponsim-pod/Chart.yaml
+++ b/xos-profiles/ponsim-pod/Chart.yaml
@@ -17,7 +17,7 @@
 description: A Helm chart for loading the Ponsim pod's TOSCA files into XOS
 icon: https://guide.opencord.org/logos/xos.svg
 
-version: 1.3.0
+version: 1.3.1
 
 # xosproject/tosca-loader version
 appVersion: 1.3.1
diff --git a/xos-profiles/ponsim-pod/tosca/040-subscriber.yaml b/xos-profiles/ponsim-pod/tosca/040-subscriber.yaml
index 1263bd3..9b13427 100644
--- a/xos-profiles/ponsim-pod/tosca/040-subscriber.yaml
+++ b/xos-profiles/ponsim-pod/tosca/040-subscriber.yaml
@@ -20,6 +20,7 @@
   - custom_types/bandwidthprofile.yaml
 {{- end }}
 
+{{- $onucount := (.Values.numOnus|int) }}
 description: Pre-provsion a subscriber
 
 topology_template:
@@ -40,18 +41,18 @@
 
     # Pre-provision the subscribers
 {{- range $i, $junk := until (.Values.numOlts|int) }}
-
-    house_{{ $i }}:
+{{- range $j, $junk1 := until ($onucount) }}
+    house_{{ $i }}-{{ $j }}:
       type: tosca.nodes.RCORDSubscriber
       properties:
-        name: QQClient{{ $i }}
+        name: QQClient{{ $i }}-{{ $j }}
         status: pre-provisioned
-        c_tag: 111
+        c_tag: {{ add 111 $j }}
         s_tag: {{ add 222 $i }}
   {{- if $.Values.legacyPonsim }}
         onu_device: PSMO12345678
   {{- else }}
-        onu_device: PSMO{{ printf "%04d" $i }}0000
+        onu_device: PSMO{{ printf "%04d%04d" $i $j }}
   {{- end }}
   {{- if $.Values.bandwidthProfiles }}
       requirements:
@@ -62,4 +63,5 @@
             node: bronze_bp
             relationship: tosca.relationships.BelongsToOne
   {{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
+{{- end }}
diff --git a/xos-profiles/ponsim-pod/tosca/att-workflow/010-att-workflow.yaml b/xos-profiles/ponsim-pod/tosca/att-workflow/010-att-workflow.yaml
index 419a51e..6dd34a2 100644
--- a/xos-profiles/ponsim-pod/tosca/att-workflow/010-att-workflow.yaml
+++ b/xos-profiles/ponsim-pod/tosca/att-workflow/010-att-workflow.yaml
@@ -22,6 +22,7 @@
   - custom_types/attworkflowdriverwhitelistentry.yaml
   - custom_types/attworkflowdriverservice.yaml
 description: Create an instance of the OSS Service and connect it to the vOLT Service
+
 topology_template:
   node_templates:
 
@@ -31,16 +32,17 @@
         name: att-workflow-driver
         must-exist: true
 
+{{- $onucount := (.Values.numOnus|int) }}
 {{- range $i, $junk := until (.Values.numOlts|int) }}
-
-    whitelist{{ $i }}:
+{{- range $j, $junk1 := until ($onucount) }}
+    whitelist{{ $i }}-{{ $j }}:
       type: tosca.nodes.AttWorkflowDriverWhiteListEntry
       properties:
 {{- if $.Values.legacyPonsim }}
         serial_number: PSMO12345678
         device_id: of:0000aabbccddeeff
 {{- else }}
-        serial_number: PSMO{{ printf "%04d" $i }}0000
+        serial_number: PSMO{{ printf "%04d%04d" $i $j }}
         device_id: {{ index $.Values.oltDpids $i }}
 {{- end }}
         pon_port_id: 1
@@ -48,4 +50,5 @@
         - owner:
             node: service#att
             relationship: tosca.relationships.BelongsToOne
-{{- end }}
\ No newline at end of file
+{{- end }}
+{{- end }}
diff --git a/xos-profiles/ponsim-pod/values.yaml b/xos-profiles/ponsim-pod/values.yaml
index bea12fb..2e0940e 100644
--- a/xos-profiles/ponsim-pod/values.yaml
+++ b/xos-profiles/ponsim-pod/values.yaml
@@ -41,7 +41,7 @@
 
 # numOlts > 1 only works with voltha-1.7 or greater
 numOlts: 1
-
+numOnus: 1
 # legacyPonsim == true means that we are using voltha-1.6
 legacyPonsim: true