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/oltdevice.yaml |
| 19 | - custom_types/onudevice.yaml |
| 20 | - custom_types/ponport.yaml |
| 21 | - custom_types/voltservice.yaml |
Matteo Scandolo | a8b11f5 | 2019-06-20 17:05:42 -0700 | [diff] [blame^] | 22 | {{- if $.Values.bandwidthProfiles }} |
| 23 | - custom_types/technologyprofile.yaml |
| 24 | {{- end }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 25 | description: Create a simulated OLT Device in VOLTHA |
| 26 | topology_template: |
| 27 | node_templates: |
| 28 | |
| 29 | service#volt: |
| 30 | type: tosca.nodes.VOLTService |
| 31 | properties: |
| 32 | name: volt |
| 33 | must-exist: true |
| 34 | |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 35 | {{- range $i, $junk := until (.Values.numOlts|int) }} |
| 36 | |
| 37 | olt{{ $i }}_device: |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 38 | type: tosca.nodes.OLTDevice |
| 39 | properties: |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 40 | name: PONSIM OLT {{ $i }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 41 | device_type: ponsim_olt |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 42 | host: olt{{ $i }}.voltha.svc |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 43 | port: 50060 |
| 44 | switch_datapath_id: of:0000000000000001 |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 45 | switch_port: "{{ add 2 $i }}" |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 46 | outer_tpid: "0x8100" |
Matteo Scandolo | a8b11f5 | 2019-06-20 17:05:42 -0700 | [diff] [blame^] | 47 | {{- if $.Values.bandwidthProfiles }} |
| 48 | technology: xgspon |
| 49 | {{- end }} |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 50 | {{- if $.Values.legacyPonsim }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 51 | dp_id: of:0000aabbccddeeff |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 52 | {{- else }} |
| 53 | dp_id: {{ index $.Values.oltDpids $i }} |
| 54 | {{- end }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 55 | uplink: "2" |
| 56 | requirements: |
| 57 | - volt_service: |
| 58 | node: service#volt |
| 59 | relationship: tosca.relationships.BelongsToOne |
| 60 | |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 61 | olt{{ $i }}_pon_port: |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 62 | type: tosca.nodes.PONPort |
| 63 | properties: |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 64 | name: olt{{ $i }}pon0 |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 65 | port_no: 1 |
| 66 | requirements: |
| 67 | - olt_device: |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 68 | node: olt{{ $i }}_device |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 69 | relationship: tosca.relationships.BelongsToOne |
Matteo Scandolo | a8b11f5 | 2019-06-20 17:05:42 -0700 | [diff] [blame^] | 70 | {{- end }} |
| 71 | |
| 72 | {{- if $.Values.bandwidthProfiles }} |
| 73 | technologyProfile: |
| 74 | type: tosca.nodes.TechnologyProfile |
| 75 | properties: |
| 76 | profile_id: 64 |
| 77 | technology: xgspon |
| 78 | profile_value: > |
| 79 | {} |
| 80 | {{- end }} |