blob: 9b13427a9021426257e25582668c061c26a89c02 [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 }}
52 {{- if $.Values.legacyPonsim }}
Andy Bavieraf38f0d2019-04-19 16:03:34 -070053 onu_device: PSMO12345678
Andy Baviere21a5f52019-05-28 15:39:52 -070054 {{- else }}
Sreeju7d7fc072019-06-13 12:03:00 -060055 onu_device: PSMO{{ printf "%04d%04d" $i $j }}
Andy Baviere21a5f52019-05-28 15:39:52 -070056 {{- end }}
57 {{- if $.Values.bandwidthProfiles }}
Andy Bavieraf38f0d2019-04-19 16:03:34 -070058 requirements:
59 - upstream_bps:
60 node: bronze_bp
61 relationship: tosca.relationships.BelongsToOne
62 - downstream_bps:
63 node: bronze_bp
64 relationship: tosca.relationships.BelongsToOne
Andy Baviere21a5f52019-05-28 15:39:52 -070065 {{- end }}
Sreeju7d7fc072019-06-13 12:03:00 -060066{{- end }}
67{{- end }}