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 |
| 22 | description: Create a simulated OLT Device in VOLTHA |
| 23 | topology_template: |
| 24 | node_templates: |
| 25 | |
| 26 | service#volt: |
| 27 | type: tosca.nodes.VOLTService |
| 28 | properties: |
| 29 | name: volt |
| 30 | must-exist: true |
| 31 | |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 32 | {{- range $i, $junk := until (.Values.numOlts|int) }} |
| 33 | |
| 34 | olt{{ $i }}_device: |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 35 | type: tosca.nodes.OLTDevice |
| 36 | properties: |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 37 | name: PONSIM OLT {{ $i }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 38 | device_type: ponsim_olt |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 39 | host: olt{{ $i }}.voltha.svc |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 40 | port: 50060 |
| 41 | switch_datapath_id: of:0000000000000001 |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 42 | switch_port: "{{ add 2 $i }}" |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 43 | outer_tpid: "0x8100" |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 44 | {{- if $.Values.legacyPonsim }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 45 | dp_id: of:0000aabbccddeeff |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 46 | {{- else }} |
| 47 | dp_id: {{ index $.Values.oltDpids $i }} |
| 48 | {{- end }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 49 | uplink: "2" |
| 50 | requirements: |
| 51 | - volt_service: |
| 52 | node: service#volt |
| 53 | relationship: tosca.relationships.BelongsToOne |
| 54 | |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 55 | olt{{ $i }}_pon_port: |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 56 | type: tosca.nodes.PONPort |
| 57 | properties: |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 58 | name: olt{{ $i }}pon0 |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 59 | port_no: 1 |
| 60 | requirements: |
| 61 | - olt_device: |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 62 | node: olt{{ $i }}_device |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 63 | relationship: tosca.relationships.BelongsToOne |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 64 | {{- end }} |