SEBA-686 Enable multiple Ponsim OLTs
Change-Id: Ia8cc47492010bcd98f0a8800f70386cd5ca5342b
diff --git a/xos-profiles/ponsim-pod/tosca/020-pod-olt.yaml b/xos-profiles/ponsim-pod/tosca/020-pod-olt.yaml
index 724d56c..6d40563 100644
--- a/xos-profiles/ponsim-pod/tosca/020-pod-olt.yaml
+++ b/xos-profiles/ponsim-pod/tosca/020-pod-olt.yaml
@@ -29,29 +29,36 @@
name: volt
must-exist: true
- olt_device:
+{{- range $i, $junk := until (.Values.numOlts|int) }}
+
+ olt{{ $i }}_device:
type: tosca.nodes.OLTDevice
properties:
- name: PONSIM OLT
+ name: PONSIM OLT {{ $i }}
device_type: ponsim_olt
- host: olt.voltha.svc
+ host: olt{{ $i }}.voltha.svc
port: 50060
switch_datapath_id: of:0000000000000001
- switch_port: "2"
+ switch_port: "{{ add 2 $i }}"
outer_tpid: "0x8100"
+{{- if $.Values.legacyPonsim }}
dp_id: of:0000aabbccddeeff
+{{- else }}
+ dp_id: {{ index $.Values.oltDpids $i }}
+{{- end }}
uplink: "2"
requirements:
- volt_service:
node: service#volt
relationship: tosca.relationships.BelongsToOne
- pon_port:
+ olt{{ $i }}_pon_port:
type: tosca.nodes.PONPort
properties:
- name: pon0
+ name: olt{{ $i }}pon0
port_no: 1
requirements:
- olt_device:
- node: olt_device
+ node: olt{{ $i }}_device
relationship: tosca.relationships.BelongsToOne
+{{- end }}
\ No newline at end of file
diff --git a/xos-profiles/ponsim-pod/tosca/030-fabric.yaml b/xos-profiles/ponsim-pod/tosca/030-fabric.yaml
index ce3dda8..950551e 100644
--- a/xos-profiles/ponsim-pod/tosca/030-fabric.yaml
+++ b/xos-profiles/ponsim-pod/tosca/030-fabric.yaml
@@ -38,16 +38,19 @@
ofId: of:0000000000000001
routerMac: 00:00:02:01:06:01
- # Setup the OLT switch port
- port#olt_port:
+ # Setup the OLT switch ports
+{{- range $i, $junk := until (.Values.numOlts|int) }}
+
+ port#olt{{ $i }}_port:
type: tosca.nodes.SwitchPort
properties:
- portId: 2
+ portId: {{ add 2 $i }}
host_learning: false
requirements:
- switch:
node: switch#leaf_1
relationship: tosca.relationships.BelongsToOne
+{{- end }}
# Port connected to the BNG
port#bng_port:
diff --git a/xos-profiles/ponsim-pod/tosca/040-subscriber.yaml b/xos-profiles/ponsim-pod/tosca/040-subscriber.yaml
index c806d2c..1263bd3 100644
--- a/xos-profiles/ponsim-pod/tosca/040-subscriber.yaml
+++ b/xos-profiles/ponsim-pod/tosca/040-subscriber.yaml
@@ -38,16 +38,22 @@
name: Bronze
{{- end }}
- # Pre-provision the subscriber the subscriber
- my_house:
+ # Pre-provision the subscribers
+{{- range $i, $junk := until (.Values.numOlts|int) }}
+
+ house_{{ $i }}:
type: tosca.nodes.RCORDSubscriber
properties:
- name: QQClient
+ name: QQClient{{ $i }}
status: pre-provisioned
c_tag: 111
- s_tag: 222
+ s_tag: {{ add 222 $i }}
+ {{- if $.Values.legacyPonsim }}
onu_device: PSMO12345678
-{{- if .Values.bandwidthProfiles }}
+ {{- else }}
+ onu_device: PSMO{{ printf "%04d" $i }}0000
+ {{- end }}
+ {{- if $.Values.bandwidthProfiles }}
requirements:
- upstream_bps:
node: bronze_bp
@@ -55,4 +61,5 @@
- downstream_bps:
node: bronze_bp
relationship: tosca.relationships.BelongsToOne
+ {{- end }}
{{- end }}
\ No newline at end of file
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 1af0eb2..419a51e 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
@@ -31,13 +31,21 @@
name: att-workflow-driver
must-exist: true
- whitelist:
+{{- range $i, $junk := until (.Values.numOlts|int) }}
+
+ whitelist{{ $i }}:
type: tosca.nodes.AttWorkflowDriverWhiteListEntry
properties:
+{{- if $.Values.legacyPonsim }}
serial_number: PSMO12345678
device_id: of:0000aabbccddeeff
+{{- else }}
+ serial_number: PSMO{{ printf "%04d" $i }}0000
+ device_id: {{ index $.Values.oltDpids $i }}
+{{- end }}
pon_port_id: 1
requirements:
- owner:
node: service#att
relationship: tosca.relationships.BelongsToOne
+{{- end }}
\ No newline at end of file