blob: ed378490be68cc4267dc28d0352b907ad071b8bb [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
Daniele Moro50fa4072019-11-07 23:42:16 -080016{{- if $.Values.bng.external.enabled }}
Andy Bavier7a080492018-08-30 14:26:09 -070017tosca_definitions_version: tosca_simple_yaml_1_0
18imports:
19 - custom_types/switch.yaml
Andy Bavier2d4364b2018-10-15 10:00:56 -070020 - custom_types/onosapp.yaml
Andy Bavier7a080492018-08-30 14:26:09 -070021 - custom_types/switchport.yaml
22 - custom_types/portinterface.yaml
23 - custom_types/bngportmapping.yaml
Matteo Scandolob029c7a2018-10-12 13:19:30 -070024 - custom_types/serviceinstanceattribute.yaml
Andy Bavier7a080492018-08-30 14:26:09 -070025
Andy Bavier923d8ff2019-03-15 14:49:13 -070026description: Configures the Ponsim SEBA POD fabric
Andy Bavier7a080492018-08-30 14:26:09 -070027
28topology_template:
29 node_templates:
30 # Fabric configuration
31 switch#leaf_1:
32 type: tosca.nodes.Switch
33 properties:
Daniele Moro93c2c502019-11-05 16:01:36 -080034{{- if not $.Values.fabric.stratum.enabled }}
35 driver: "ofdpa-ovs"
36 ofId: of:0000000000000001
37{{- else }}
38 driver: "stratum-bmv2"
39 pipeconf: 'org.onosproject.pipelines.fabric'
40 managementAddress: "grpc://mininet-stratum:50001?device_id=1"
41 ofId: device:agg1
42{{- end }}
Andy Bavier7a080492018-08-30 14:26:09 -070043 ipv4Loopback: 192.168.0.201
44 ipv4NodeSid: 17
45 isEdgeRouter: True
46 name: leaf_1
Andy Bavier7a080492018-08-30 14:26:09 -070047 routerMac: 00:00:02:01:06:01
48
Andy Baviere21a5f52019-05-28 15:39:52 -070049 # Setup the OLT switch ports
50{{- range $i, $junk := until (.Values.numOlts|int) }}
51
52 port#olt{{ $i }}_port:
Andy Bavier7a080492018-08-30 14:26:09 -070053 type: tosca.nodes.SwitchPort
54 properties:
Andy Baviere21a5f52019-05-28 15:39:52 -070055 portId: {{ add 2 $i }}
Andy Bavier7a080492018-08-30 14:26:09 -070056 host_learning: false
57 requirements:
58 - switch:
59 node: switch#leaf_1
60 relationship: tosca.relationships.BelongsToOne
Andy Baviere21a5f52019-05-28 15:39:52 -070061{{- end }}
Andy Bavier7a080492018-08-30 14:26:09 -070062
63 # Port connected to the BNG
64 port#bng_port:
65 type: tosca.nodes.SwitchPort
66 properties:
67 portId: 1
Andy Bavier7a080492018-08-30 14:26:09 -070068 requirements:
69 - switch:
70 node: switch#leaf_1
71 relationship: tosca.relationships.BelongsToOne
72
73 # Setup the fabric switch port where the external
74 # router is connected to
75 bngmapping:
76 type: tosca.nodes.BNGPortMapping
77 properties:
78 s_tag: "any"
79 switch_port: 1
Matteo Scandolob029c7a2018-10-12 13:19:30 -070080
Andy Bavier2d4364b2018-10-15 10:00:56 -070081 onos_app#dhcpl2relay:
82 type: tosca.nodes.ONOSApp
83 properties:
84 name: dhcpl2relay
85 must-exist: true
86
Matteo Scandolob029c7a2018-10-12 13:19:30 -070087 # DHCP L2 Relay config
88 dhcpl2relay-config-attr:
89 type: tosca.nodes.ServiceInstanceAttribute
90 properties:
91 name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay
92 value: >
93 {
94 "dhcpl2relay" : {
95 "useOltUplinkForServerPktInOut" : false,
Daniele Moro93c2c502019-11-05 16:01:36 -080096{{- if not $.Values.fabric.stratum.enabled }}
Matteo Scandolob029c7a2018-10-12 13:19:30 -070097 "dhcpServerConnectPoints" : [ "of:0000000000000001/1" ]
Daniele Moro93c2c502019-11-05 16:01:36 -080098{{- else }}
99 "dhcpServerConnectPoints" : [ "device:agg1/1" ]
100{{- end }}
Matteo Scandolob029c7a2018-10-12 13:19:30 -0700101 }
102 }
103 requirements:
104 - service_instance:
105 node: onos_app#dhcpl2relay
Andy Bavier2d4364b2018-10-15 10:00:56 -0700106 relationship: tosca.relationships.BelongsToOne
Daniele Moro50fa4072019-11-07 23:42:16 -0800107{{- end }}
108
109{{- if $.Values.bng.embedded.enabled }}
110tosca_definitions_version: tosca_simple_yaml_1_0
111imports:
112 - custom_types/switch.yaml
113 - custom_types/onosapp.yaml
114 - custom_types/switchport.yaml
115 - custom_types/portinterface.yaml
116 - custom_types/vrouterserviceinstance.yaml
117 - custom_types/vrouterstaticroute.yaml
118 - custom_types/fabricipaddress.yaml
119 - custom_types/serviceinstanceattribute.yaml
120
121description: Configures the Ponsim SEBA POD fabric
122
123topology_template:
124 node_templates:
125 # Fabric configuration
126 switch#agg_sw:
127 type: tosca.nodes.Switch
128 properties:
129 driver: "stratum-bmv2"
130 pipeconf: 'org.onosproject.pipelines.fabric-bng'
131 managementAddress: "grpc://mininet-stratum:50001?device_id=1"
132 ipv4Loopback: 192.168.0.201
133 ipv4NodeSid: 17
134 isEdgeRouter: True
135 ofId: device:agg1
136 name: AGG SWITCH
137 routerMac: 00:00:02:01:06:01
138
139# Setup the OLT switch ports
140{{- range $i, $junk := until (.Values.numOlts|int) }}
141
142 port#olt{{ $i }}_port:
143 type: tosca.nodes.SwitchPort
144 properties:
145 portId: {{ add 3 $i }}
146 host_learning: false
147 requirements:
148 - switch:
149 node: switch#agg_sw
150 relationship: tosca.relationships.BelongsToOne
151
152 interface#access_interface_{{ $i }}:
153 type: tosca.nodes.PortInterface
154 properties:
155 name: access
156 requirements:
157 - port:
158 node: port#olt{{ $i }}_port
159 relationship: tosca.relationships.BelongsToOne
160
161 ip#access_ip_{{ $i }}:
162 type: tosca.nodes.FabricIpAddress
163 properties:
164 ip: "10.255.255.{{ $i }}/24"
165 description: access_ip_{{ $i }}
166 requirements:
167 - interface:
168 node: interface#access_interface_{{ $i }}
169 relationship: tosca.relationships.BelongsToOne
170{{- end }}
171
172 # Port connected to the PPPoE Server
173 port#pppoe_server_port:
174 type: tosca.nodes.SwitchPort
175 properties:
176 portId: 1
177 requirements:
178 - switch:
179 node: switch#agg_sw
180 relationship: tosca.relationships.BelongsToOne
181
182 interface#ppoe_server_interface_1:
183 type: tosca.nodes.PortInterface
184 properties:
185 vlanUntagged: 100
186 name: pppoe_server
187 requirements:
188 - port:
189 node: port#pppoe_server_port
190 relationship: tosca.relationships.BelongsToOne
191
192 # Port connected to the Upstream router
193 port#upstream_port:
194 type: tosca.nodes.SwitchPort
195 properties:
196 portId: 2
197 requirements:
198 - switch:
199 node: switch#agg_sw
200 relationship: tosca.relationships.BelongsToOne
201
202 interface#upstream_interface_1:
203 type: tosca.nodes.PortInterface
204 properties:
205 vlanUntagged: 200
206 name: upstream
207 requirements:
208 - port:
209 node: port#upstream_port
210 relationship: tosca.relationships.BelongsToOne
211
212 ip#upstream_ip_1:
213 type: tosca.nodes.FabricIpAddress
214 properties:
215 ip: "10.10.10.254/24"
216 description: upstream_ip_1
217 requirements:
218 - interface:
219 node: interface#upstream_interface_1
220 relationship: tosca.relationships.BelongsToOne
221
222 # Upstream host configuration
223 upstream-host-config:
224 type: tosca.nodes.ServiceInstanceAttribute
225 properties:
226 name: /onos/v1/network/configuration
227 value: >
228 {
229 "hosts": {
230 "00:66:77:88:99:AA/None": {
231 "basic": {
232 "name": "Upstream",
233 "ips": [
234 "10.10.10.1"
235 ],
236 "locations": [
237 "device:agg1/2"
238 ]
239 }
240 }
241 }
242 }
243 requirements:
244 - service_instance:
245 node: ip#upstream_ip_1
246 relationship: tosca.relationships.BelongsToOne
247
248 onos_app#segmentrouting:
249 type: tosca.nodes.ONOSApp
250 properties:
251 name: org.onosproject.segmentrouting
252 must-exist: true
253
254 segmentrouting-config-attr:
255 type: tosca.nodes.ServiceInstanceAttribute
256 properties:
257 name: /onos/v1/configuration/org.onosproject.segmentrouting.SegmentRoutingManager?preset=true
258 value: >
259 {
260 "routeSimplification": "false",
261 "routeDoubleTaggedHosts": "true",
262 "respondToUnknownHosts": "true",
263 "defaultInternalVlan": "4094",
264 "pwTransportVlan": "4090",
265 "activeProbing": "true",
266 "singleHomedDown": "false",
267 "symmetricProbing": "false"
268 }
269 requirements:
270 - service_instance:
271 node: onos_app#segmentrouting
272 relationship: tosca.relationships.BelongsToOne
273
274 # VRouter and default route.
275 vrouter#my_vrouter:
276 type: tosca.nodes.VRouterServiceInstance
277 properties:
278 name: my_vrouter
279
280 route#default_route:
281 type: tosca.nodes.VRouterStaticRoute
282 properties:
283 prefix: "0.0.0.0/0"
284 next_hop: "10.10.10.1"
285 requirements:
286 - vrouter:
287 node: vrouter#my_vrouter
288 relationship: tosca.relationships.BelongsToOne
289
290 # BNG App and its configuration for the PPPoE server relay.
291 onos_app#bng:
292 type: tosca.nodes.ONOSApp
293 properties:
294 name: org.opencord.bng
295 must-exist: true
296
297 bng-config-attr:
298 type: tosca.nodes.ServiceInstanceAttribute
299 properties:
300 name: /onos/v1/network/configuration/apps/org.opencord.bng
301 value: >
302 {
303 "pppoerelay": {
304 "oltConnectPoint": "device:agg1/3",
305 "pppoeServerConnectPoint": "device:agg1/1"
306 },
307 "bng": {
308 "bnguDeviceId": "device:agg1"
309 }
310 }
311 requirements:
312 - service_instance:
313 node: onos_app#bng
314 relationship: tosca.relationships.BelongsToOne
315{{- end }}