blob: c4af37a21aa419722e0bbc1d7ddb34aa32db40c5 [file] [log] [blame]
Scott Bakerafff3082018-07-16 17:23:26 -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*/}}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070017{{- define "att-workflow.onosTosca" -}}
18tosca_definitions_version: tosca_simple_yaml_1_0
19
20imports:
21 - custom_types/onosapp.yaml
22 - custom_types/onosservice.yaml
23 - custom_types/serviceinstanceattribute.yaml
24
25description: Configures the VOLTHA ONOS service
26
27topology_template:
28 node_templates:
29
30 service#onos:
31 type: tosca.nodes.ONOSService
32 properties:
33 name: onos
34 kind: data
35 rest_hostname: {{ .onosRestService | quote }}
36 rest_port: 8181
37
38 onos_app#openflow-base:
39 type: tosca.nodes.ONOSApp
40 properties:
41 name: openflow-base
42 app_id: org.onosproject.openflow-base
43 requirements:
44 - owner:
45 node: service#onos
46 relationship: tosca.relationships.BelongsToOne
47
48 onos_app#hostprovider:
49 type: tosca.nodes.ONOSApp
50 properties:
51 name: hostprovider
52 app_id: org.onosproject.hostprovider
53 requirements:
54 - owner:
55 node: service#onos
56 relationship: tosca.relationships.BelongsToOne
57
58 onos_app#olt:
59 type: tosca.nodes.ONOSApp
60 properties:
61 name: olt
62 app_id: org.opencord.olt
63 url: {{ .oltAppUrl }}
64 version: 2.0.0.SNAPSHOT
65 dependencies: org.opencord.sadis
66 requirements:
67 - owner:
68 node: service#onos
69 relationship: tosca.relationships.BelongsToOne
70
71 onos_app#sadis:
72 type: tosca.nodes.ONOSApp
73 properties:
74 name: sadis
75 app_id: org.opencord.sadis
76 url: {{ .sadisAppUrl }}
77 version: 2.2.0.SNAPSHOT
78 requirements:
79 - owner:
80 node: service#onos
81 relationship: tosca.relationships.BelongsToOne
82
83 onos_app#dhcpl2relay:
84 type: tosca.nodes.ONOSApp
85 properties:
86 name: dhcpl2relay
87 app_id: org.opencord.dhcpl2relay
88 url: {{ .dhcpl2relayAppUrl }}
89 version: 1.5.0.SNAPSHOT
90 dependencies: org.opencord.sadis
91 requirements:
92 - owner:
93 node: service#onos
94 relationship: tosca.relationships.BelongsToOne
95
96 onos_app#aaa:
97 type: tosca.nodes.ONOSApp
98 properties:
99 name: aaa
100 app_id: org.opencord.aaa
101 url: {{ .aaaAppUrl }}
102 version: 1.8.0.SNAPSHOT
103 dependencies: org.opencord.sadis
104 requirements:
105 - owner:
106 node: service#onos
107 relationship: tosca.relationships.BelongsToOne
108
109 onos_app#kafka:
110 type: tosca.nodes.ONOSApp
111 properties:
112 name: kafka
113 app_id: org.opencord.kafka
114 url: {{ .kafkaAppUrl }}
115 version: 1.0.0.SNAPSHOT
116 dependencies: org.opencord.olt,org.opencord.aaa,org.opencord.dhcpl2relay
117 requirements:
118 - owner:
119 node: service#onos
120 relationship: tosca.relationships.BelongsToOne
121
122 # CORD-Configuration
123 kafka-config-attr:
124 type: tosca.nodes.ServiceInstanceAttribute
125 properties:
126 name: /onos/v1/network/configuration/apps/org.opencord.kafka
127 value: >
128 {
129 "kafka" : {
130 "bootstrapServers" : {{ .kafkaService | quote }}
131 }
132 }
133 requirements:
134 - service_instance:
Andy Bavier1a24ced2018-09-15 11:49:14 -0700135 node: onos_app#kafka
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700136 relationship: tosca.relationships.BelongsToOne
137
138 olt-config-attr:
139 type: tosca.nodes.ServiceInstanceAttribute
140 properties:
141 name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true
142 value: >
143 {
144 "enableDhcpOnProvisioning" : true
145 }
146 requirements:
147 - service_instance:
148 node: onos_app#olt
149 relationship: tosca.relationships.BelongsToOne
150
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700151 aaa-config-attr:
152 type: tosca.nodes.ServiceInstanceAttribute
153 properties:
154 name: /onos/v1/network/configuration/apps/org.opencord.aaa
155 value: >
156 {
157 "AAA" : {
158 "radiusConnectionType" : "socket",
159 "radiusHost" : "freeradius.voltha.svc.cluster.local",
160 "radiusServerPort" : "1812",
161 "radiusSecret" : "SECRET"
162 }
163 }
164 requirements:
165 - service_instance:
166 node: onos_app#aaa
167 relationship: tosca.relationships.BelongsToOne
168
169 sadis-config-attr:
170 type: tosca.nodes.ServiceInstanceAttribute
171 properties:
172 name: /onos/v1/network/configuration/apps/org.opencord.sadis
173 value: >
174 {
175 "sadis" : {
176 "integration" : {
177 "cache" : {
178 "maxsize" : 1000
179 },
180 "url" : "http://sadis-service:8000/subscriber/%s"
181 }
182 }
183 }
184 requirements:
185 - service_instance:
186 node: onos_app#sadis
187 relationship: tosca.relationships.BelongsToOne
188
189 onos_app#segmentrouting:
190 type: tosca.nodes.ONOSApp
191 properties:
192 name: org.onosproject.segmentrouting
193 app_id: org.onosproject.segmentrouting
194 requirements:
195 - owner:
196 node: service#onos
197 relationship: tosca.relationships.BelongsToOne
198
199 onos_app#netcfghostprovider:
200 type: tosca.nodes.ONOSApp
201 properties:
202 name: org.onosproject.netcfghostprovider
203 app_id: org.onosproject.netcfghostprovider
204 requirements:
205 - owner:
206 node: service#onos
207 relationship: tosca.relationships.BelongsToOne
208
209 onos_app#openflow:
210 type: tosca.nodes.ONOSApp
211 properties:
212 name: org.onosproject.openflow
213 app_id: org.onosproject.openflow
214 requirements:
215 - owner:
216 node: service#onos
217 relationship: tosca.relationships.BelongsToOne
218{{- end -}}
219
Matteo Scandolo7607b522018-08-09 17:03:58 -0700220{{- define "att-workflow.basicFixturesTosca" -}}
Scott Bakerafff3082018-07-16 17:23:26 -0700221tosca_definitions_version: tosca_simple_yaml_1_0
222description: Some basic fixtures
223imports:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700224 - custom_types/deployment.yaml
Scott Bakerafff3082018-07-16 17:23:26 -0700225 - custom_types/networkparametertype.yaml
226 - custom_types/networktemplate.yaml
Matteo Scandolo7607b522018-08-09 17:03:58 -0700227 - custom_types/siterole.yaml
Scott Bakerafff3082018-07-16 17:23:26 -0700228topology_template:
229 node_templates:
230
231# -----------------------------------------------------------------------------
232# Network Parameter Types
233# -----------------------------------------------------------------------------
234 s_tag:
235 type: tosca.nodes.NetworkParameterType
236 properties:
237 name: s_tag
238 c_tag:
239 type: tosca.nodes.NetworkParameterType
240 properties:
241 name: c_tag
242 next_hop:
243 type: tosca.nodes.NetworkParameterType
244 properties:
245 name: next_hop
246 device:
247 type: tosca.nodes.NetworkParameterType
248 properties:
249 name: device
250 bridge:
251 type: tosca.nodes.NetworkParameterType
252 properties:
253 name: bridge
254 neutron_port_name:
255 type: tosca.nodes.NetworkParameterType
256 properties:
257 name: neutron_port_name
258
259# ----------------------------------------------------------------------------
260# Roles
261# ----------------------------------------------------------------------------
262 siterole#admin:
263 type: tosca.nodes.SiteRole
264 properties:
265 role: admin
266 siterole#pi:
267 type: tosca.nodes.SiteRole
268 properties:
269 role: pi
270 siterole#tech:
271 type: tosca.nodes.SiteRole
272 properties:
273 role: tech
Scott Bakerafff3082018-07-16 17:23:26 -0700274
275# -----------------------------------------------------------------------------
276# Network Templates
277# -----------------------------------------------------------------------------
278 Private:
279 type: tosca.nodes.NetworkTemplate
280 properties:
281 name: Private
282 visibility: private
283 translation: none
284
285 Public shared IPv4:
286 type: tosca.nodes.NetworkTemplate
287 properties:
288 name: Public shared IPv4
289 visibility: private
290 translation: NAT
291 shared_network_name: nat-net
292
293 Public dedicated IPv4:
294 type: tosca.nodes.NetworkTemplate
295 properties:
296 name: Public dedicated IPv4
297 visibility: public
298 translation: none
299 shared_network_name: ext-net
300
301# -----------------------------------------------------------------------------
302# Deployment
303# -----------------------------------------------------------------------------
304 MyDeployment:
305 type: tosca.nodes.Deployment
306 properties:
307 name: MyDeployment
308{{- end -}}
309
310
Matteo Scandolo7607b522018-08-09 17:03:58 -0700311{{- define "att-workflow.serviceGraphTosca" -}}
Scott Bakerafff3082018-07-16 17:23:26 -0700312tosca_definitions_version: tosca_simple_yaml_1_0
313imports:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700314 - custom_types/attworkflowdriverservice.yaml
Scott Bakerafff3082018-07-16 17:23:26 -0700315 - custom_types/fabricservice.yaml
316 - custom_types/onosservice.yaml
317 - custom_types/rcordservice.yaml
318 - custom_types/voltservice.yaml
319 - custom_types/fabriccrossconnectservice.yaml
320 - custom_types/servicedependency.yaml
321 - custom_types/servicegraphconstraint.yaml
Matteo Scandolo7607b522018-08-09 17:03:58 -0700322description: att-workflow service graph
Scott Bakerafff3082018-07-16 17:23:26 -0700323topology_template:
324 node_templates:
325
326# These services must be defined before loading the graph
327
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700328 service#onos:
Scott Bakerafff3082018-07-16 17:23:26 -0700329 type: tosca.nodes.ONOSService
330 properties:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700331 name: onos
Scott Bakerafff3082018-07-16 17:23:26 -0700332 must-exist: true
333
334 service#fabric:
335 type: tosca.nodes.FabricService
336 properties:
337 name: fabric
338 must-exist: true
339
340 service#rcord:
341 type: tosca.nodes.RCORDService
342 properties:
343 name: rcord
344 must-exist: true
345
346 service#volt:
347 type: tosca.nodes.VOLTService
348 properties:
349 name: volt
350 must-exist: true
351
352 service#fabric-crossconnect:
353 type: tosca.nodes.FabricCrossconnectService
354 properties:
355 name: fabric-crossconnect
356 must-exist: true
357
Matteo Scandolo7607b522018-08-09 17:03:58 -0700358 service#att-workflow-driver:
359 type: tosca.nodes.AttWorkflowDriverService
360 properties:
361 name: att-workflow-driver
362 must-exist: true
363
364# The att-workflow service graph
Scott Bakerafff3082018-07-16 17:23:26 -0700365
366 service_dependency#onos-fabric_fabric:
367 type: tosca.nodes.ServiceDependency
368 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700369 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700370 requirements:
371 - subscriber_service:
Scott Bakere9ae0482018-08-16 15:42:05 -0700372 node: service#fabric
Scott Bakerafff3082018-07-16 17:23:26 -0700373 relationship: tosca.relationships.BelongsToOne
374 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700375 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700376 relationship: tosca.relationships.BelongsToOne
377
378 service_dependency#rcord_volt:
379 type: tosca.nodes.ServiceDependency
380 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700381 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700382 requirements:
383 - subscriber_service:
384 node: service#rcord
385 relationship: tosca.relationships.BelongsToOne
386 - provider_service:
387 node: service#volt
388 relationship: tosca.relationships.BelongsToOne
389
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700390 service_dependency#onos_volt:
Scott Bakerafff3082018-07-16 17:23:26 -0700391 type: tosca.nodes.ServiceDependency
392 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700393 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700394 requirements:
395 - subscriber_service:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700396 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700397 relationship: tosca.relationships.BelongsToOne
398 - provider_service:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700399 node: service#volt
Scott Bakerafff3082018-07-16 17:23:26 -0700400 relationship: tosca.relationships.BelongsToOne
401
402 service_dependency#volt_fabric-crossconnect:
403 type: tosca.nodes.ServiceDependency
404 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700405 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700406 requirements:
407 - subscriber_service:
408 node: service#volt
409 relationship: tosca.relationships.BelongsToOne
410 - provider_service:
411 node: service#fabric-crossconnect
412 relationship: tosca.relationships.BelongsToOne
413
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700414 service_dependency#onos_fabric-crossconnect:
Scott Bakerafff3082018-07-16 17:23:26 -0700415 type: tosca.nodes.ServiceDependency
416 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700417 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700418 requirements:
419 - subscriber_service:
420 node: service#fabric-crossconnect
421 relationship: tosca.relationships.BelongsToOne
422 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700423 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700424 relationship: tosca.relationships.BelongsToOne
425
Matteo Scandolo7607b522018-08-09 17:03:58 -0700426 service_dependency#workflow_volt:
427 type: tosca.nodes.ServiceDependency
428 properties:
429 connect_method: none
430 requirements:
431 - subscriber_service:
432 node: service#att-workflow-driver
433 relationship: tosca.relationships.BelongsToOne
434 - provider_service:
435 node: service#volt
436 relationship: tosca.relationships.BelongsToOne
437
Scott Bakerafff3082018-07-16 17:23:26 -0700438 constraints:
439 type: tosca.nodes.ServiceGraphConstraint
440 properties:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700441 constraints: '[[null, "rcord", null], [null, "volt", null], ["onos", "fabric-crossconnect", "att-workflow-driver"], ["fabric", null, null]]'
Scott Bakerafff3082018-07-16 17:23:26 -0700442{{- end -}}