Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 1 | --- |
| 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 | |
| 16 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 17 | imports: |
| 18 | - custom_types/rcordsubscriber.yaml |
Andy Bavier | af38f0d | 2019-04-19 16:03:34 -0700 | [diff] [blame] | 19 | {{- if .Values.bandwidthProfiles }} |
| 20 | - custom_types/bandwidthprofile.yaml |
| 21 | {{- end }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 22 | |
Sreeju | 7d7fc07 | 2019-06-13 12:03:00 -0600 | [diff] [blame] | 23 | {{- $onucount := (.Values.numOnus|int) }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 24 | description: Pre-provsion a subscriber |
| 25 | |
| 26 | topology_template: |
| 27 | node_templates: |
| 28 | |
Andy Bavier | af38f0d | 2019-04-19 16:03:34 -0700 | [diff] [blame] | 29 | {{- 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 Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 42 | # Pre-provision the subscribers |
| 43 | {{- range $i, $junk := until (.Values.numOlts|int) }} |
Sreeju | 7d7fc07 | 2019-06-13 12:03:00 -0600 | [diff] [blame] | 44 | {{- range $j, $junk1 := until ($onucount) }} |
| 45 | house_{{ $i }}-{{ $j }}: |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 46 | type: tosca.nodes.RCORDSubscriber |
| 47 | properties: |
Sreeju | 7d7fc07 | 2019-06-13 12:03:00 -0600 | [diff] [blame] | 48 | name: QQClient{{ $i }}-{{ $j }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 49 | status: pre-provisioned |
Sreeju | 7d7fc07 | 2019-06-13 12:03:00 -0600 | [diff] [blame] | 50 | c_tag: {{ add 111 $j }} |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 51 | s_tag: {{ add 222 $i }} |
Matteo Scandolo | a8b11f5 | 2019-06-20 17:05:42 -0700 | [diff] [blame] | 52 | {{- if $.Values.bandwidthProfiles }} |
| 53 | tech_profile_id: 64 |
| 54 | {{- end }} |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 55 | {{- if $.Values.legacyPonsim }} |
Andy Bavier | af38f0d | 2019-04-19 16:03:34 -0700 | [diff] [blame] | 56 | onu_device: PSMO12345678 |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 57 | {{- else }} |
Sreeju | 7d7fc07 | 2019-06-13 12:03:00 -0600 | [diff] [blame] | 58 | onu_device: PSMO{{ printf "%04d%04d" $i $j }} |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 59 | {{- end }} |
| 60 | {{- if $.Values.bandwidthProfiles }} |
Andy Bavier | af38f0d | 2019-04-19 16:03:34 -0700 | [diff] [blame] | 61 | 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 Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 68 | {{- end }} |
Sreeju | 7d7fc07 | 2019-06-13 12:03:00 -0600 | [diff] [blame] | 69 | {{- end }} |
| 70 | {{- end }} |