blob: 797ab127e351e3d7e4c435a1fece53ce58162126 [file] [log] [blame]
Matteo Scandolo2eadad72018-07-25 13:40:56 -07001{{/* vim: set filetype=mustache: */}}
2{{/*
3Copyright 2018-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16*/}}
17{{- define "nem-att.basicFixturesTosca" -}}
18tosca_definitions_version: tosca_simple_yaml_1_0
19description: Some basic fixtures
20imports:
21 - custom_types/siterole.yaml
22 - custom_types/slicerole.yaml
23 - custom_types/networkparametertype.yaml
24 - custom_types/networktemplate.yaml
25 - custom_types/deployment.yaml
26topology_template:
27 node_templates:
28
29# -----------------------------------------------------------------------------
30# Network Parameter Types
31# -----------------------------------------------------------------------------
32 s_tag:
33 type: tosca.nodes.NetworkParameterType
34 properties:
35 name: s_tag
36 c_tag:
37 type: tosca.nodes.NetworkParameterType
38 properties:
39 name: c_tag
40 next_hop:
41 type: tosca.nodes.NetworkParameterType
42 properties:
43 name: next_hop
44 device:
45 type: tosca.nodes.NetworkParameterType
46 properties:
47 name: device
48 bridge:
49 type: tosca.nodes.NetworkParameterType
50 properties:
51 name: bridge
52 neutron_port_name:
53 type: tosca.nodes.NetworkParameterType
54 properties:
55 name: neutron_port_name
56
57# ----------------------------------------------------------------------------
58# Roles
59# ----------------------------------------------------------------------------
60 siterole#admin:
61 type: tosca.nodes.SiteRole
62 properties:
63 role: admin
64 siterole#pi:
65 type: tosca.nodes.SiteRole
66 properties:
67 role: pi
68 siterole#tech:
69 type: tosca.nodes.SiteRole
70 properties:
71 role: tech
72 slicerole#admin:
73 type: tosca.nodes.SliceRole
74 properties:
75 role: admin
76 slicerole#access:
77 type: tosca.nodes.SliceRole
78 properties:
79 role: access
80
81# -----------------------------------------------------------------------------
82# Network Templates
83# -----------------------------------------------------------------------------
84 Private:
85 type: tosca.nodes.NetworkTemplate
86 properties:
87 name: Private
88 visibility: private
89 translation: none
90
91 Public shared IPv4:
92 type: tosca.nodes.NetworkTemplate
93 properties:
94 name: Public shared IPv4
95 visibility: private
96 translation: NAT
97 shared_network_name: nat-net
98
99 Public dedicated IPv4:
100 type: tosca.nodes.NetworkTemplate
101 properties:
102 name: Public dedicated IPv4
103 visibility: public
104 translation: none
105 shared_network_name: ext-net
106
107# -----------------------------------------------------------------------------
108# Deployment
109# -----------------------------------------------------------------------------
110 MyDeployment:
111 type: tosca.nodes.Deployment
112 properties:
113 name: MyDeployment
114{{- end -}}
115
116
117{{- define "nem-att.serviceGraphTosca" -}}
118tosca_definitions_version: tosca_simple_yaml_1_0
119imports:
120 - custom_types/fabricservice.yaml
121 - custom_types/fabriccrossconnectservice.yaml
122 - custom_types/hippieossservice.yaml
123 - custom_types/onosservice.yaml
124 - custom_types/rcordservice.yaml
125 - custom_types/servicedependency.yaml
126 - custom_types/servicegraphconstraint.yaml
127 - custom_types/voltservice.yaml
128description: rcord-fc service graph
129topology_template:
130 node_templates:
131
132# These services must be defined before loading the graph
133
134 service#ONOS_Fabric:
135 type: tosca.nodes.ONOSService
136 properties:
137 name: ONOS_Fabric
138 must-exist: true
139
140 service#ONOS_VOLTHA:
141 type: tosca.nodes.ONOSService
142 properties:
143 name: ONOS_VOLTHA
144 must-exist: true
145
146 service#fabric:
147 type: tosca.nodes.FabricService
148 properties:
149 name: fabric
150 must-exist: true
151
152 service#rcord:
153 type: tosca.nodes.RCORDService
154 properties:
155 name: rcord
156 must-exist: true
157
158 service#volt:
159 type: tosca.nodes.VOLTService
160 properties:
161 name: volt
162 must-exist: true
163
164 service#fabric-crossconnect:
165 type: tosca.nodes.FabricCrossconnectService
166 properties:
167 name: fabric-crossconnect
168 must-exist: true
169
170 # The nem-att service graph
171 service_dependency#onos-fabric_fabric:
172 type: tosca.nodes.ServiceDependency
173 properties:
174 connect_method: None
175 requirements:
176 - subscriber_service:
177 node: service#ONOS_Fabric
178 relationship: tosca.relationships.BelongsToOne
179 - provider_service:
180 node: service#fabric
181 relationship: tosca.relationships.BelongsToOne
182
183 service_dependency#rcord_volt:
184 type: tosca.nodes.ServiceDependency
185 properties:
186 connect_method: None
187 requirements:
188 - subscriber_service:
189 node: service#rcord
190 relationship: tosca.relationships.BelongsToOne
191 - provider_service:
192 node: service#volt
193 relationship: tosca.relationships.BelongsToOne
194
195 service_dependency#onos_voltha_volt:
196 type: tosca.nodes.ServiceDependency
197 properties:
198 connect_method: None
199 requirements:
200 - subscriber_service:
201 node: service#volt
202 relationship: tosca.relationships.BelongsToOne
203 - provider_service:
204 node: service#ONOS_VOLTHA
205 relationship: tosca.relationships.BelongsToOne
206
207 service_dependency#volt_fabric-crossconnect:
208 type: tosca.nodes.ServiceDependency
209 properties:
210 connect_method: None
211 requirements:
212 - subscriber_service:
213 node: service#volt
214 relationship: tosca.relationships.BelongsToOne
215 - provider_service:
216 node: service#fabric-crossconnect
217 relationship: tosca.relationships.BelongsToOne
218
219 service_dependency#onos_fabric_fabric-crossconnect:
220 type: tosca.nodes.ServiceDependency
221 properties:
222 connect_method: None
223 requirements:
224 - subscriber_service:
225 node: service#fabric-crossconnect
226 relationship: tosca.relationships.BelongsToOne
227 - provider_service:
228 node: service#ONOS_Fabric
229 relationship: tosca.relationships.BelongsToOne
230
231 constraints:
232 type: tosca.nodes.ServiceGraphConstraint
233 properties:
234 constraints: '[[null, "rcord"], ["ONOS_VOLTHA", "volt"], ["ONOS_Fabric", "fabric-crossconnect"], ["fabric", null]]'
235
236 # hippie-oss
237 service#oss:
238 type: tosca.nodes.HippieOSSService
239 properties:
240 name: hippie-oss
241 kind: oss
242 create_on_discovery: false
243
244 service_dependency#oss_volt:
245 type: tosca.nodes.ServiceDependency
246 properties:
247 connect_method: None
248 requirements:
249 - subscriber_service:
250 node: service#oss
251 relationship: tosca.relationships.BelongsToOne
252 - provider_service:
253 node: service#volt
254 relationship: tosca.relationships.BelongsToOne
255{{- end -}}
256
257{{- define "nem-att.fabricAppTosca" -}}
258tosca_definitions_version: tosca_simple_yaml_1_0
259imports:
260 - custom_types/onosapp.yaml
261 - custom_types/onosservice.yaml
262description: ONOS service and app for fabric
263topology_template:
264 node_templates:
265 service#ONOS_Fabric:
266 type: tosca.nodes.ONOSService
267 properties:
268 name: ONOS_Fabric
269 kind: platform
270 rest_hostname: {{ .Values.onosFabricRestService | quote }}
271 rest_port: 8181
272
273 onos_app#segmentrouting:
274 type: tosca.nodes.ONOSApp
275 properties:
276 name: org.onosproject.segmentrouting
277 app_id: org.onosproject.segmentrouting
278 requirements:
279 - owner:
280 node: service#ONOS_Fabric
281 relationship: tosca.relationships.BelongsToOne
282
283 onos_app#netcfghostprovider:
284 type: tosca.nodes.ONOSApp
285 properties:
286 name: org.onosproject.netcfghostprovider
287 app_id: org.onosproject.netcfghostprovider
288 requirements:
289 - owner:
290 node: service#ONOS_Fabric
291 relationship: tosca.relationships.BelongsToOne
292
293 onos_app#openflow:
294 type: tosca.nodes.ONOSApp
295 properties:
296 name: org.onosproject.openflow
297 app_id: org.onosproject.openflow
298 requirements:
299 - owner:
300 node: service#ONOS_Fabric
301 relationship: tosca.relationships.BelongsToOne
302{{- end -}}
303
304{{- define "nem-att.volthaOnosTosca" -}}
305tosca_definitions_version: tosca_simple_yaml_1_0
306
307imports:
308 - custom_types/onosapp.yaml
309 - custom_types/onosservice.yaml
310 - custom_types/serviceinstanceattribute.yaml
311
312description: Configures the VOLTHA ONOS service
313
314topology_template:
315 node_templates:
316
317 service#ONOS_VOLTHA:
318 type: tosca.nodes.ONOSService
319 properties:
320 name: ONOS_VOLTHA
321 kind: platform
322 rest_hostname: {{ .Values.onosVolthaRestService | quote }}
323 rest_port: 8181
324
Jonathan Hartce73b8f2018-08-07 13:26:49 -0700325 onos_app#cord-config:
326 type: tosca.nodes.ONOSApp
327 properties:
328 name: cord-config
329 app_id: org.opencord.config
330 url: {{ .Values.cordConfigAppUrl }}
331 version: 1.4.0
332 requirements:
333 - owner:
334 node: service#ONOS_VOLTHA
335 relationship: tosca.relationships.BelongsToOne
336
Matteo Scandolo2eadad72018-07-25 13:40:56 -0700337 onos_app#olt:
338 type: tosca.nodes.ONOSApp
339 properties:
Jonathan Hartce73b8f2018-08-07 13:26:49 -0700340 name: olt
Matteo Scandolo2eadad72018-07-25 13:40:56 -0700341 app_id: org.opencord.olt
Jonathan Hartce73b8f2018-08-07 13:26:49 -0700342 url: {{ .Values.oltAppUrl }}
343 version: 2.0.0.SNAPSHOT
344 requirements:
345 - owner:
346 node: service#ONOS_VOLTHA
347 relationship: tosca.relationships.BelongsToOne
348
349 onos_app#sadis:
350 type: tosca.nodes.ONOSApp
351 properties:
352 name: sadis
353 app_id: org.opencord.sadis
354 url: {{ .Values.sadisAppUrl }}
355 version: 2.1.0
Matteo Scandolo2eadad72018-07-25 13:40:56 -0700356 requirements:
357 - owner:
358 node: service#ONOS_VOLTHA
359 relationship: tosca.relationships.BelongsToOne
360
361 onos_app#dhcpl2relay:
362 type: tosca.nodes.ONOSApp
363 properties:
Jonathan Hartce73b8f2018-08-07 13:26:49 -0700364 name: dhcpl2relay
Matteo Scandolo2eadad72018-07-25 13:40:56 -0700365 app_id: org.opencord.dhcpl2relay
Jonathan Hartce73b8f2018-08-07 13:26:49 -0700366 url: {{ .Values.dhcpl2relayAppUrl }}
367 version: 1.5.0.SNAPSHOT
Matteo Scandolo2eadad72018-07-25 13:40:56 -0700368 requirements:
369 - owner:
370 node: service#ONOS_VOLTHA
371 relationship: tosca.relationships.BelongsToOne
372
373 onos_app#aaa:
374 type: tosca.nodes.ONOSApp
375 properties:
Jonathan Hartce73b8f2018-08-07 13:26:49 -0700376 name: aaa
Matteo Scandolo2eadad72018-07-25 13:40:56 -0700377 app_id: org.opencord.aaa
Jonathan Hartce73b8f2018-08-07 13:26:49 -0700378 url: {{ .Values.aaaAppUrl }}
379 version: 1.8.0.SNAPSHOT
380 requirements:
381 - owner:
382 node: service#ONOS_VOLTHA
383 relationship: tosca.relationships.BelongsToOne
384
385 onos_app#kafka:
386 type: tosca.nodes.ONOSApp
387 properties:
388 name: kafka
389 app_id: org.opencord.kafka
390 url: {{ .Values.kafkaAppUrl }}
391 version: 1.0.0.SNAPSHOT
Matteo Scandolo2eadad72018-07-25 13:40:56 -0700392 requirements:
393 - owner:
394 node: service#ONOS_VOLTHA
395 relationship: tosca.relationships.BelongsToOne
396
397 # CORD-Configuration
398 cord-config-attr:
399 type: tosca.nodes.ServiceInstanceAttribute
400 properties:
401 name: /onos/v1/network/configuration/apps/org.opencord.kafka
402 value: >
403 {
404 "kafka" : {
405 "bootstrapServers" : {{ .Values.kafkaService | quote }}
406 }
407 }
408 requirements:
409 - service_instance:
410 node: onos_app#olt
411 relationship: tosca.relationships.BelongsToOne
412
413 olt-config-attr:
414 type: tosca.nodes.ServiceInstanceAttribute
415 properties:
416 name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true
417 value: >
418 {
419 "enableDhcpOnProvisioning" : true
420 }
421 requirements:
422 - service_instance:
423 node: onos_app#olt
424 relationship: tosca.relationships.BelongsToOne
425
426 dhcpl2relay-config-attr:
427 type: tosca.nodes.ServiceInstanceAttribute
428 properties:
429 name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay
430 value: >
431 {
432 "dhcpl2relay" : {
433 "useOltUplinkForServerPktInOut" : true
434 }
435 }
436 requirements:
437 - service_instance:
438 node: onos_app#dhcpl2relay
439 relationship: tosca.relationships.BelongsToOne
440
441 aaa-config-attr:
442 type: tosca.nodes.ServiceInstanceAttribute
443 properties:
444 name: /onos/v1/network/configuration/apps/org.opencord.aaa
445 value: >
446 {
447 "AAA" : {
448 "radiusConnectionType" : "socket",
Jonathan Hart1d264b32018-08-07 14:39:05 -0700449 "radiusHost" : "freeradius.voltha.svc.cluster.local",
Matteo Scandolo2eadad72018-07-25 13:40:56 -0700450 "radiusServerPort" : "1812",
451 "radiusSecret" : "SECRET"
452 }
453 }
454 requirements:
455 - service_instance:
456 node: onos_app#aaa
457 relationship: tosca.relationships.BelongsToOne
458{{- end -}}