blob: 47df05a4cbf7420413b8913d963bfdd6ba7a559a [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/oltdevice.yaml
19 - custom_types/onudevice.yaml
20 - custom_types/ponport.yaml
21 - custom_types/voltservice.yaml
Matteo Scandoloa8b11f52019-06-20 17:05:42 -070022 {{- if $.Values.bandwidthProfiles }}
23 - custom_types/technologyprofile.yaml
24 {{- end }}
Andy Bavier7a080492018-08-30 14:26:09 -070025description: Create a simulated OLT Device in VOLTHA
26topology_template:
27 node_templates:
28
29 service#volt:
30 type: tosca.nodes.VOLTService
31 properties:
32 name: volt
33 must-exist: true
34
Andy Baviere21a5f52019-05-28 15:39:52 -070035{{- range $i, $junk := until (.Values.numOlts|int) }}
36
37 olt{{ $i }}_device:
Andy Bavier7a080492018-08-30 14:26:09 -070038 type: tosca.nodes.OLTDevice
39 properties:
Andy Baviere21a5f52019-05-28 15:39:52 -070040 name: PONSIM OLT {{ $i }}
Andy Bavier7a080492018-08-30 14:26:09 -070041 device_type: ponsim_olt
Andy Baviere21a5f52019-05-28 15:39:52 -070042 host: olt{{ $i }}.voltha.svc
Andy Bavier7a080492018-08-30 14:26:09 -070043 port: 50060
44 switch_datapath_id: of:0000000000000001
Andy Baviere21a5f52019-05-28 15:39:52 -070045 switch_port: "{{ add 2 $i }}"
Andy Bavier7a080492018-08-30 14:26:09 -070046 outer_tpid: "0x8100"
Matteo Scandoloa8b11f52019-06-20 17:05:42 -070047{{- if $.Values.bandwidthProfiles }}
48 technology: xgspon
49{{- end }}
Andy Baviere21a5f52019-05-28 15:39:52 -070050{{- if $.Values.legacyPonsim }}
Andy Bavier7a080492018-08-30 14:26:09 -070051 dp_id: of:0000aabbccddeeff
Andy Baviere21a5f52019-05-28 15:39:52 -070052{{- else }}
53 dp_id: {{ index $.Values.oltDpids $i }}
54{{- end }}
Andy Bavier7a080492018-08-30 14:26:09 -070055 uplink: "2"
56 requirements:
57 - volt_service:
58 node: service#volt
59 relationship: tosca.relationships.BelongsToOne
60
Andy Baviere21a5f52019-05-28 15:39:52 -070061 olt{{ $i }}_pon_port:
Andy Bavier7a080492018-08-30 14:26:09 -070062 type: tosca.nodes.PONPort
63 properties:
Andy Baviere21a5f52019-05-28 15:39:52 -070064 name: olt{{ $i }}pon0
Andy Bavier7a080492018-08-30 14:26:09 -070065 port_no: 1
66 requirements:
67 - olt_device:
Andy Baviere21a5f52019-05-28 15:39:52 -070068 node: olt{{ $i }}_device
Andy Bavier7a080492018-08-30 14:26:09 -070069 relationship: tosca.relationships.BelongsToOne
Matteo Scandoloa8b11f52019-06-20 17:05:42 -070070{{- 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 }}