blob: 6d4056355e375cb4ceff5b1f56fafdea1e170bc3 [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
22description: Create a simulated OLT Device in VOLTHA
23topology_template:
24 node_templates:
25
26 service#volt:
27 type: tosca.nodes.VOLTService
28 properties:
29 name: volt
30 must-exist: true
31
Andy Baviere21a5f52019-05-28 15:39:52 -070032{{- range $i, $junk := until (.Values.numOlts|int) }}
33
34 olt{{ $i }}_device:
Andy Bavier7a080492018-08-30 14:26:09 -070035 type: tosca.nodes.OLTDevice
36 properties:
Andy Baviere21a5f52019-05-28 15:39:52 -070037 name: PONSIM OLT {{ $i }}
Andy Bavier7a080492018-08-30 14:26:09 -070038 device_type: ponsim_olt
Andy Baviere21a5f52019-05-28 15:39:52 -070039 host: olt{{ $i }}.voltha.svc
Andy Bavier7a080492018-08-30 14:26:09 -070040 port: 50060
41 switch_datapath_id: of:0000000000000001
Andy Baviere21a5f52019-05-28 15:39:52 -070042 switch_port: "{{ add 2 $i }}"
Andy Bavier7a080492018-08-30 14:26:09 -070043 outer_tpid: "0x8100"
Andy Baviere21a5f52019-05-28 15:39:52 -070044{{- if $.Values.legacyPonsim }}
Andy Bavier7a080492018-08-30 14:26:09 -070045 dp_id: of:0000aabbccddeeff
Andy Baviere21a5f52019-05-28 15:39:52 -070046{{- else }}
47 dp_id: {{ index $.Values.oltDpids $i }}
48{{- end }}
Andy Bavier7a080492018-08-30 14:26:09 -070049 uplink: "2"
50 requirements:
51 - volt_service:
52 node: service#volt
53 relationship: tosca.relationships.BelongsToOne
54
Andy Baviere21a5f52019-05-28 15:39:52 -070055 olt{{ $i }}_pon_port:
Andy Bavier7a080492018-08-30 14:26:09 -070056 type: tosca.nodes.PONPort
57 properties:
Andy Baviere21a5f52019-05-28 15:39:52 -070058 name: olt{{ $i }}pon0
Andy Bavier7a080492018-08-30 14:26:09 -070059 port_no: 1
60 requirements:
61 - olt_device:
Andy Baviere21a5f52019-05-28 15:39:52 -070062 node: olt{{ $i }}_device
Andy Bavier7a080492018-08-30 14:26:09 -070063 relationship: tosca.relationships.BelongsToOne
Andy Baviere21a5f52019-05-28 15:39:52 -070064{{- end }}