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 |
Matteo Scandolo | a8b11f5 | 2019-06-20 17:05:42 -0700 | [diff] [blame] | 22 | {{- if $.Values.bandwidthProfiles }} |
| 23 | - custom_types/technologyprofile.yaml |
| 24 | {{- end }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 25 | description: Create a simulated OLT Device in VOLTHA |
| 26 | topology_template: |
| 27 | node_templates: |
| 28 | |
| 29 | service#volt: |
| 30 | type: tosca.nodes.VOLTService |
| 31 | properties: |
| 32 | name: volt |
| 33 | must-exist: true |
| 34 | |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 35 | {{- range $i, $junk := until (.Values.numOlts|int) }} |
| 36 | |
| 37 | olt{{ $i }}_device: |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 38 | type: tosca.nodes.OLTDevice |
| 39 | properties: |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 40 | name: PONSIM OLT {{ $i }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 41 | device_type: ponsim_olt |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 42 | host: olt{{ $i }}.voltha.svc |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 43 | port: 50060 |
Daniele Moro | 93c2c50 | 2019-11-05 16:01:36 -0800 | [diff] [blame] | 44 | {{- if not $.Values.fabric.stratum.enabled }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 45 | switch_datapath_id: of:0000000000000001 |
Daniele Moro | 93c2c50 | 2019-11-05 16:01:36 -0800 | [diff] [blame] | 46 | {{- else }} |
| 47 | switch_datapath_id: device:agg1 |
| 48 | {{- end }} |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 49 | switch_port: "{{ add 2 $i }}" |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 50 | outer_tpid: "0x8100" |
Matteo Scandolo | a8b11f5 | 2019-06-20 17:05:42 -0700 | [diff] [blame] | 51 | {{- if $.Values.bandwidthProfiles }} |
| 52 | technology: xgspon |
| 53 | {{- end }} |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 54 | {{- if $.Values.legacyPonsim }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 55 | dp_id: of:0000aabbccddeeff |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 56 | {{- else }} |
| 57 | dp_id: {{ index $.Values.oltDpids $i }} |
| 58 | {{- end }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 59 | uplink: "2" |
| 60 | requirements: |
| 61 | - volt_service: |
| 62 | node: service#volt |
| 63 | relationship: tosca.relationships.BelongsToOne |
| 64 | |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 65 | olt{{ $i }}_pon_port: |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 66 | type: tosca.nodes.PONPort |
| 67 | properties: |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 68 | name: olt{{ $i }}pon0 |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 69 | port_no: 1 |
| 70 | requirements: |
| 71 | - olt_device: |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 72 | node: olt{{ $i }}_device |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 73 | relationship: tosca.relationships.BelongsToOne |
Matteo Scandolo | a8b11f5 | 2019-06-20 17:05:42 -0700 | [diff] [blame] | 74 | {{- 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 Scandolo | 209ff8e | 2019-06-21 15:58:31 -0700 | [diff] [blame] | 83 | { |
| 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 Scandolo | a8b11f5 | 2019-06-20 17:05:42 -0700 | [diff] [blame] | 138 | {{- end }} |