blob: aca682d70944c663ddcd6375136f62fa29fad960 [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 }}
Matteo Scandolocaddcee2018-10-12 14:00:14 -070064 version: 2.1.0.SNAPSHOT
Jonathan Hart9f638ff2018-08-22 18:19:15 -070065 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" : {
Matteo Scandolo4c481d12018-11-19 13:28:17 -0800178 "maxsize" : 1000,
179 "ttl": "PT300S"
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700180 },
181 "url" : "http://sadis-service:8000/subscriber/%s"
182 }
183 }
184 }
185 requirements:
186 - service_instance:
187 node: onos_app#sadis
188 relationship: tosca.relationships.BelongsToOne
189
190 onos_app#segmentrouting:
191 type: tosca.nodes.ONOSApp
192 properties:
193 name: org.onosproject.segmentrouting
194 app_id: org.onosproject.segmentrouting
195 requirements:
196 - owner:
197 node: service#onos
198 relationship: tosca.relationships.BelongsToOne
199
200 onos_app#netcfghostprovider:
201 type: tosca.nodes.ONOSApp
202 properties:
203 name: org.onosproject.netcfghostprovider
204 app_id: org.onosproject.netcfghostprovider
205 requirements:
206 - owner:
207 node: service#onos
208 relationship: tosca.relationships.BelongsToOne
209
210 onos_app#openflow:
211 type: tosca.nodes.ONOSApp
212 properties:
213 name: org.onosproject.openflow
214 app_id: org.onosproject.openflow
215 requirements:
216 - owner:
217 node: service#onos
218 relationship: tosca.relationships.BelongsToOne
219{{- end -}}
220
Matteo Scandolo7607b522018-08-09 17:03:58 -0700221{{- define "att-workflow.basicFixturesTosca" -}}
Scott Bakerafff3082018-07-16 17:23:26 -0700222tosca_definitions_version: tosca_simple_yaml_1_0
223description: Some basic fixtures
224imports:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700225 - custom_types/deployment.yaml
Scott Bakerafff3082018-07-16 17:23:26 -0700226 - custom_types/networkparametertype.yaml
227 - custom_types/networktemplate.yaml
Matteo Scandolo7607b522018-08-09 17:03:58 -0700228 - custom_types/siterole.yaml
Scott Bakerafff3082018-07-16 17:23:26 -0700229topology_template:
230 node_templates:
231
232# -----------------------------------------------------------------------------
233# Network Parameter Types
234# -----------------------------------------------------------------------------
235 s_tag:
236 type: tosca.nodes.NetworkParameterType
237 properties:
238 name: s_tag
239 c_tag:
240 type: tosca.nodes.NetworkParameterType
241 properties:
242 name: c_tag
243 next_hop:
244 type: tosca.nodes.NetworkParameterType
245 properties:
246 name: next_hop
247 device:
248 type: tosca.nodes.NetworkParameterType
249 properties:
250 name: device
251 bridge:
252 type: tosca.nodes.NetworkParameterType
253 properties:
254 name: bridge
255 neutron_port_name:
256 type: tosca.nodes.NetworkParameterType
257 properties:
258 name: neutron_port_name
259
260# ----------------------------------------------------------------------------
261# Roles
262# ----------------------------------------------------------------------------
263 siterole#admin:
264 type: tosca.nodes.SiteRole
265 properties:
266 role: admin
267 siterole#pi:
268 type: tosca.nodes.SiteRole
269 properties:
270 role: pi
271 siterole#tech:
272 type: tosca.nodes.SiteRole
273 properties:
274 role: tech
Scott Bakerafff3082018-07-16 17:23:26 -0700275
276# -----------------------------------------------------------------------------
277# Network Templates
278# -----------------------------------------------------------------------------
279 Private:
280 type: tosca.nodes.NetworkTemplate
281 properties:
282 name: Private
283 visibility: private
284 translation: none
285
286 Public shared IPv4:
287 type: tosca.nodes.NetworkTemplate
288 properties:
289 name: Public shared IPv4
290 visibility: private
291 translation: NAT
292 shared_network_name: nat-net
293
294 Public dedicated IPv4:
295 type: tosca.nodes.NetworkTemplate
296 properties:
297 name: Public dedicated IPv4
298 visibility: public
299 translation: none
300 shared_network_name: ext-net
301
302# -----------------------------------------------------------------------------
303# Deployment
304# -----------------------------------------------------------------------------
305 MyDeployment:
306 type: tosca.nodes.Deployment
307 properties:
308 name: MyDeployment
309{{- end -}}
310
311
Matteo Scandolo7607b522018-08-09 17:03:58 -0700312{{- define "att-workflow.serviceGraphTosca" -}}
Scott Bakerafff3082018-07-16 17:23:26 -0700313tosca_definitions_version: tosca_simple_yaml_1_0
314imports:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700315 - custom_types/attworkflowdriverservice.yaml
Scott Bakerafff3082018-07-16 17:23:26 -0700316 - custom_types/fabricservice.yaml
317 - custom_types/onosservice.yaml
318 - custom_types/rcordservice.yaml
319 - custom_types/voltservice.yaml
320 - custom_types/fabriccrossconnectservice.yaml
321 - custom_types/servicedependency.yaml
322 - custom_types/servicegraphconstraint.yaml
Matteo Scandolo7607b522018-08-09 17:03:58 -0700323description: att-workflow service graph
Scott Bakerafff3082018-07-16 17:23:26 -0700324topology_template:
325 node_templates:
326
327# These services must be defined before loading the graph
328
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700329 service#onos:
Scott Bakerafff3082018-07-16 17:23:26 -0700330 type: tosca.nodes.ONOSService
331 properties:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700332 name: onos
Scott Bakerafff3082018-07-16 17:23:26 -0700333 must-exist: true
334
335 service#fabric:
336 type: tosca.nodes.FabricService
337 properties:
338 name: fabric
339 must-exist: true
340
341 service#rcord:
342 type: tosca.nodes.RCORDService
343 properties:
344 name: rcord
345 must-exist: true
346
347 service#volt:
348 type: tosca.nodes.VOLTService
349 properties:
350 name: volt
351 must-exist: true
352
353 service#fabric-crossconnect:
354 type: tosca.nodes.FabricCrossconnectService
355 properties:
356 name: fabric-crossconnect
357 must-exist: true
358
Matteo Scandolo7607b522018-08-09 17:03:58 -0700359 service#att-workflow-driver:
360 type: tosca.nodes.AttWorkflowDriverService
361 properties:
362 name: att-workflow-driver
363 must-exist: true
364
365# The att-workflow service graph
Scott Bakerafff3082018-07-16 17:23:26 -0700366
367 service_dependency#onos-fabric_fabric:
368 type: tosca.nodes.ServiceDependency
369 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700370 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700371 requirements:
372 - subscriber_service:
Scott Bakere9ae0482018-08-16 15:42:05 -0700373 node: service#fabric
Scott Bakerafff3082018-07-16 17:23:26 -0700374 relationship: tosca.relationships.BelongsToOne
375 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700376 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700377 relationship: tosca.relationships.BelongsToOne
378
379 service_dependency#rcord_volt:
380 type: tosca.nodes.ServiceDependency
381 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700382 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700383 requirements:
384 - subscriber_service:
385 node: service#rcord
386 relationship: tosca.relationships.BelongsToOne
387 - provider_service:
388 node: service#volt
389 relationship: tosca.relationships.BelongsToOne
390
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700391 service_dependency#onos_volt:
Scott Bakerafff3082018-07-16 17:23:26 -0700392 type: tosca.nodes.ServiceDependency
393 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700394 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700395 requirements:
396 - subscriber_service:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700397 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700398 relationship: tosca.relationships.BelongsToOne
399 - provider_service:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700400 node: service#volt
Scott Bakerafff3082018-07-16 17:23:26 -0700401 relationship: tosca.relationships.BelongsToOne
402
403 service_dependency#volt_fabric-crossconnect:
404 type: tosca.nodes.ServiceDependency
405 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700406 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700407 requirements:
408 - subscriber_service:
409 node: service#volt
410 relationship: tosca.relationships.BelongsToOne
411 - provider_service:
412 node: service#fabric-crossconnect
413 relationship: tosca.relationships.BelongsToOne
414
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700415 service_dependency#onos_fabric-crossconnect:
Scott Bakerafff3082018-07-16 17:23:26 -0700416 type: tosca.nodes.ServiceDependency
417 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700418 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700419 requirements:
420 - subscriber_service:
421 node: service#fabric-crossconnect
422 relationship: tosca.relationships.BelongsToOne
423 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700424 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700425 relationship: tosca.relationships.BelongsToOne
426
Matteo Scandolo7607b522018-08-09 17:03:58 -0700427 service_dependency#workflow_volt:
428 type: tosca.nodes.ServiceDependency
429 properties:
430 connect_method: none
431 requirements:
432 - subscriber_service:
433 node: service#att-workflow-driver
434 relationship: tosca.relationships.BelongsToOne
435 - provider_service:
436 node: service#volt
437 relationship: tosca.relationships.BelongsToOne
438
Scott Bakerafff3082018-07-16 17:23:26 -0700439 constraints:
440 type: tosca.nodes.ServiceGraphConstraint
441 properties:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700442 constraints: '[[null, "rcord", null], [null, "volt", null], ["onos", "fabric-crossconnect", "att-workflow-driver"], ["fabric", null, null]]'
Scott Bakerafff3082018-07-16 17:23:26 -0700443{{- end -}}