blob: 74262d405e4882177605021ce1beb28f17d47dec [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
Daniele Moro93c2c502019-11-05 16:01:36 -080044{{- if not $.Values.fabric.stratum.enabled }}
Andy Bavier7a080492018-08-30 14:26:09 -070045 switch_datapath_id: of:0000000000000001
Daniele Moro93c2c502019-11-05 16:01:36 -080046{{- else }}
47 switch_datapath_id: device:agg1
48{{- end }}
Andy Baviere21a5f52019-05-28 15:39:52 -070049 switch_port: "{{ add 2 $i }}"
Andy Bavier7a080492018-08-30 14:26:09 -070050 outer_tpid: "0x8100"
Matteo Scandoloa8b11f52019-06-20 17:05:42 -070051{{- if $.Values.bandwidthProfiles }}
52 technology: xgspon
53{{- end }}
Andy Baviere21a5f52019-05-28 15:39:52 -070054{{- if $.Values.legacyPonsim }}
Andy Bavier7a080492018-08-30 14:26:09 -070055 dp_id: of:0000aabbccddeeff
Andy Baviere21a5f52019-05-28 15:39:52 -070056{{- else }}
57 dp_id: {{ index $.Values.oltDpids $i }}
58{{- end }}
Andy Bavier7a080492018-08-30 14:26:09 -070059 uplink: "2"
60 requirements:
61 - volt_service:
62 node: service#volt
63 relationship: tosca.relationships.BelongsToOne
64
Andy Baviere21a5f52019-05-28 15:39:52 -070065 olt{{ $i }}_pon_port:
Andy Bavier7a080492018-08-30 14:26:09 -070066 type: tosca.nodes.PONPort
67 properties:
Andy Baviere21a5f52019-05-28 15:39:52 -070068 name: olt{{ $i }}pon0
Andy Bavier7a080492018-08-30 14:26:09 -070069 port_no: 1
70 requirements:
71 - olt_device:
Andy Baviere21a5f52019-05-28 15:39:52 -070072 node: olt{{ $i }}_device
Andy Bavier7a080492018-08-30 14:26:09 -070073 relationship: tosca.relationships.BelongsToOne
Matteo Scandoloa8b11f52019-06-20 17:05:42 -070074{{- end }}
75
76{{- if $.Values.bandwidthProfiles }}
77 technologyProfile:
78 type: tosca.nodes.TechnologyProfile
79 properties:
80 profile_id: 64
81 technology: xgspon
82 profile_value: >
Matteo Scandolo209ff8e2019-06-21 15:58:31 -070083 {
84 "name": "4QueueHybridProfileMap1",
85 "profile_type": "XPON",
86 "version": 1.0,
87 "num_gem_ports": 1,
88 "instance_control": {
89 "onu": "multi-instance",
90 "uni": "single-instance",
91 "max_gem_payload_size": "auto"
92 },
93 "us_scheduler": {
94 "additional_bw": "auto",
95 "direction": "UPSTREAM",
96 "priority": 0,
97 "weight": 0,
98 "q_sched_policy": "hybrid"
99 },
100 "ds_scheduler": {
101 "additional_bw": "auto",
102 "direction": "DOWNSTREAM",
103 "priority": 0,
104 "weight": 0,
105 "q_sched_policy": "hybrid"
106 },
107 "upstream_gem_port_attribute_list": [{
108 "pbit_map": "0b11000000",
109 "aes_encryption": "TRUE",
110 "scheduling_policy": "Strict-Priority",
111 "priority_q": 1,
112 "weight": 0,
113 "discard_policy": "Tail-Drop",
114 "max_q_size": "auto",
115 "discard_config": {
116 "min_threshold": 0,
117 "max_threshold": 0,
118 "max_probability": 0
119 }
120 }
121 ],
122 "downstream_gem_port_attribute_list": [{
123 "pbit_map": "0b11000000",
124 "aes_encryption": "TRUE",
125 "scheduling_policy": "Strict-Priority",
126 "priority_q": 1,
127 "weight": 0,
128 "discard_policy": "Tail-Drop",
129 "max_q_size": "auto",
130 "discard_config": {
131 "min_threshold": 0,
132 "max_threshold": 0,
133 "max_probability": 0
134 }
135 }
136 ]
137 }
Matteo Scandoloa8b11f52019-06-20 17:05:42 -0700138{{- end }}