blob: a0952b1c353cf83e33c7cb5007bf0f8ed2870560 [file] [log] [blame]
Andy Bavier7a080492018-08-30 14:26:09 -07001---
2# Copyright 2018-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16tosca_definitions_version: tosca_simple_yaml_1_0
17imports:
18 - custom_types/rcordsubscriber.yaml
Andy Bavieraf38f0d2019-04-19 16:03:34 -070019{{- if .Values.bandwidthProfiles }}
20 - custom_types/bandwidthprofile.yaml
21{{- end }}
Andy Bavier7a080492018-08-30 14:26:09 -070022
Sreeju7d7fc072019-06-13 12:03:00 -060023{{- $onucount := (.Values.numOnus|int) }}
Andy Bavier7a080492018-08-30 14:26:09 -070024description: Pre-provsion a subscriber
25
26topology_template:
27 node_templates:
28
Andy Bavieraf38f0d2019-04-19 16:03:34 -070029{{- if .Values.bandwidthProfiles }}
30 # Bronze bandwidthprofile for subscriber
31 bronze_bp:
32 type: tosca.nodes.BandwidthProfile
33 properties:
34 air: 99999
35 cbs: 99999
36 cir: 99999
37 ebs: 99999
38 eir: 99999
39 name: Bronze
40{{- end }}
41
Andy Baviere21a5f52019-05-28 15:39:52 -070042 # Pre-provision the subscribers
43{{- range $i, $junk := until (.Values.numOlts|int) }}
Sreeju7d7fc072019-06-13 12:03:00 -060044{{- range $j, $junk1 := until ($onucount) }}
45 house_{{ $i }}-{{ $j }}:
Andy Bavier7a080492018-08-30 14:26:09 -070046 type: tosca.nodes.RCORDSubscriber
47 properties:
Sreeju7d7fc072019-06-13 12:03:00 -060048 name: QQClient{{ $i }}-{{ $j }}
Andy Bavier7a080492018-08-30 14:26:09 -070049 status: pre-provisioned
Sreeju7d7fc072019-06-13 12:03:00 -060050 c_tag: {{ add 111 $j }}
Andy Baviere21a5f52019-05-28 15:39:52 -070051 s_tag: {{ add 222 $i }}
Matteo Scandoloa8b11f52019-06-20 17:05:42 -070052 {{- if $.Values.bandwidthProfiles }}
53 tech_profile_id: 64
54 {{- end }}
Andy Baviere21a5f52019-05-28 15:39:52 -070055 {{- if $.Values.legacyPonsim }}
Andy Bavieraf38f0d2019-04-19 16:03:34 -070056 onu_device: PSMO12345678
Andy Baviere21a5f52019-05-28 15:39:52 -070057 {{- else }}
Sreeju7d7fc072019-06-13 12:03:00 -060058 onu_device: PSMO{{ printf "%04d%04d" $i $j }}
Andy Baviere21a5f52019-05-28 15:39:52 -070059 {{- end }}
60 {{- if $.Values.bandwidthProfiles }}
Andy Bavieraf38f0d2019-04-19 16:03:34 -070061 requirements:
62 - upstream_bps:
63 node: bronze_bp
64 relationship: tosca.relationships.BelongsToOne
65 - downstream_bps:
66 node: bronze_bp
67 relationship: tosca.relationships.BelongsToOne
Andy Baviere21a5f52019-05-28 15:39:52 -070068 {{- end }}
Sreeju7d7fc072019-06-13 12:03:00 -060069{{- end }}
70{{- end }}