blob: 9398a658047267b37b30028e2e2572da511910b7 [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: >
Matteo Scandolo209ff8e2019-06-21 15:58:31 -070079 {
80 "name": "4QueueHybridProfileMap1",
81 "profile_type": "XPON",
82 "version": 1.0,
83 "num_gem_ports": 1,
84 "instance_control": {
85 "onu": "multi-instance",
86 "uni": "single-instance",
87 "max_gem_payload_size": "auto"
88 },
89 "us_scheduler": {
90 "additional_bw": "auto",
91 "direction": "UPSTREAM",
92 "priority": 0,
93 "weight": 0,
94 "q_sched_policy": "hybrid"
95 },
96 "ds_scheduler": {
97 "additional_bw": "auto",
98 "direction": "DOWNSTREAM",
99 "priority": 0,
100 "weight": 0,
101 "q_sched_policy": "hybrid"
102 },
103 "upstream_gem_port_attribute_list": [{
104 "pbit_map": "0b11000000",
105 "aes_encryption": "TRUE",
106 "scheduling_policy": "Strict-Priority",
107 "priority_q": 1,
108 "weight": 0,
109 "discard_policy": "Tail-Drop",
110 "max_q_size": "auto",
111 "discard_config": {
112 "min_threshold": 0,
113 "max_threshold": 0,
114 "max_probability": 0
115 }
116 }
117 ],
118 "downstream_gem_port_attribute_list": [{
119 "pbit_map": "0b11000000",
120 "aes_encryption": "TRUE",
121 "scheduling_policy": "Strict-Priority",
122 "priority_q": 1,
123 "weight": 0,
124 "discard_policy": "Tail-Drop",
125 "max_q_size": "auto",
126 "discard_config": {
127 "min_threshold": 0,
128 "max_threshold": 0,
129 "max_probability": 0
130 }
131 }
132 ]
133 }
Matteo Scandoloa8b11f52019-06-20 17:05:42 -0700134{{- end }}