blob: 1e4ca3cc39ee146e51297979a888dacbb2bf57f8 [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*/}}
Matteo Scandolo34dd2362018-12-12 15:16:25 -080017{{- define "seba-services.onosTosca" -}}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070018tosca_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 }}
Matt Jeanneretf3fbac22019-01-15 21:16:39 -050064 version: {{ .oltAppVersion }}
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 }}
Matt Jeanneretf3fbac22019-01-15 21:16:39 -050077 version: {{ .sadisAppVersion }}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070078 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 }}
Matt Jeanneretf3fbac22019-01-15 21:16:39 -050089 version: {{ .dhcpl2relayAppVersion }}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070090 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 }}
Matt Jeanneretf3fbac22019-01-15 21:16:39 -0500102 version: {{ .aaaAppVersion }}
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700103 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 }}
Matt Jeanneretf3fbac22019-01-15 21:16:39 -0500115 version: {{ .kafkaAppVersion }}
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700116 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 Scandolo34dd2362018-12-12 15:16:25 -0800221{{- define "seba-services.basicFixturesTosca" -}}
Scott Bakerafff3082018-07-16 17:23:26 -0700222tosca_definitions_version: tosca_simple_yaml_1_0
223description: Some basic fixtures
224imports:
Scott Bakerafff3082018-07-16 17:23:26 -0700225 - custom_types/networkparametertype.yaml
226 - custom_types/networktemplate.yaml
Scott Bakerafff3082018-07-16 17:23:26 -0700227topology_template:
228 node_templates:
229
230# -----------------------------------------------------------------------------
231# Network Parameter Types
232# -----------------------------------------------------------------------------
233 s_tag:
234 type: tosca.nodes.NetworkParameterType
235 properties:
236 name: s_tag
237 c_tag:
238 type: tosca.nodes.NetworkParameterType
239 properties:
240 name: c_tag
241 next_hop:
242 type: tosca.nodes.NetworkParameterType
243 properties:
244 name: next_hop
245 device:
246 type: tosca.nodes.NetworkParameterType
247 properties:
248 name: device
249 bridge:
250 type: tosca.nodes.NetworkParameterType
251 properties:
252 name: bridge
253 neutron_port_name:
254 type: tosca.nodes.NetworkParameterType
255 properties:
256 name: neutron_port_name
257
Scott Bakerafff3082018-07-16 17:23:26 -0700258# -----------------------------------------------------------------------------
259# Network Templates
260# -----------------------------------------------------------------------------
261 Private:
262 type: tosca.nodes.NetworkTemplate
263 properties:
264 name: Private
265 visibility: private
266 translation: none
267
268 Public shared IPv4:
269 type: tosca.nodes.NetworkTemplate
270 properties:
271 name: Public shared IPv4
272 visibility: private
273 translation: NAT
274 shared_network_name: nat-net
275
276 Public dedicated IPv4:
277 type: tosca.nodes.NetworkTemplate
278 properties:
279 name: Public dedicated IPv4
280 visibility: public
281 translation: none
282 shared_network_name: ext-net
283
Scott Bakerafff3082018-07-16 17:23:26 -0700284{{- end -}}
285
286
Matteo Scandolo34dd2362018-12-12 15:16:25 -0800287{{- define "seba-services.serviceGraphTosca" -}}
Scott Bakerafff3082018-07-16 17:23:26 -0700288tosca_definitions_version: tosca_simple_yaml_1_0
289imports:
290 - custom_types/fabricservice.yaml
291 - custom_types/onosservice.yaml
292 - custom_types/rcordservice.yaml
293 - custom_types/voltservice.yaml
294 - custom_types/fabriccrossconnectservice.yaml
295 - custom_types/servicedependency.yaml
296 - custom_types/servicegraphconstraint.yaml
Matteo Scandolo34dd2362018-12-12 15:16:25 -0800297description: seba service graph
Scott Bakerafff3082018-07-16 17:23:26 -0700298topology_template:
299 node_templates:
300
301# These services must be defined before loading the graph
302
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700303 service#onos:
Scott Bakerafff3082018-07-16 17:23:26 -0700304 type: tosca.nodes.ONOSService
305 properties:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700306 name: onos
Scott Bakerafff3082018-07-16 17:23:26 -0700307 must-exist: true
308
309 service#fabric:
310 type: tosca.nodes.FabricService
311 properties:
312 name: fabric
313 must-exist: true
314
315 service#rcord:
316 type: tosca.nodes.RCORDService
317 properties:
318 name: rcord
319 must-exist: true
320
321 service#volt:
322 type: tosca.nodes.VOLTService
323 properties:
324 name: volt
325 must-exist: true
326
327 service#fabric-crossconnect:
328 type: tosca.nodes.FabricCrossconnectService
329 properties:
330 name: fabric-crossconnect
331 must-exist: true
332
Scott Bakerafff3082018-07-16 17:23:26 -0700333 service_dependency#onos-fabric_fabric:
334 type: tosca.nodes.ServiceDependency
335 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700336 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700337 requirements:
338 - subscriber_service:
Scott Bakere9ae0482018-08-16 15:42:05 -0700339 node: service#fabric
Scott Bakerafff3082018-07-16 17:23:26 -0700340 relationship: tosca.relationships.BelongsToOne
341 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700342 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700343 relationship: tosca.relationships.BelongsToOne
344
345 service_dependency#rcord_volt:
346 type: tosca.nodes.ServiceDependency
347 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700348 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700349 requirements:
350 - subscriber_service:
351 node: service#rcord
352 relationship: tosca.relationships.BelongsToOne
353 - provider_service:
354 node: service#volt
355 relationship: tosca.relationships.BelongsToOne
356
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700357 service_dependency#onos_volt:
Scott Bakerafff3082018-07-16 17:23:26 -0700358 type: tosca.nodes.ServiceDependency
359 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700360 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700361 requirements:
362 - subscriber_service:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700363 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700364 relationship: tosca.relationships.BelongsToOne
365 - provider_service:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700366 node: service#volt
Scott Bakerafff3082018-07-16 17:23:26 -0700367 relationship: tosca.relationships.BelongsToOne
368
369 service_dependency#volt_fabric-crossconnect:
370 type: tosca.nodes.ServiceDependency
371 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700372 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700373 requirements:
374 - subscriber_service:
375 node: service#volt
376 relationship: tosca.relationships.BelongsToOne
377 - provider_service:
378 node: service#fabric-crossconnect
379 relationship: tosca.relationships.BelongsToOne
380
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700381 service_dependency#onos_fabric-crossconnect:
Scott Bakerafff3082018-07-16 17:23:26 -0700382 type: tosca.nodes.ServiceDependency
383 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700384 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700385 requirements:
386 - subscriber_service:
387 node: service#fabric-crossconnect
388 relationship: tosca.relationships.BelongsToOne
389 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700390 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700391 relationship: tosca.relationships.BelongsToOne
392
393 constraints:
394 type: tosca.nodes.ServiceGraphConstraint
395 properties:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700396 constraints: '[[null, "rcord", null], [null, "volt", null], ["onos", "fabric-crossconnect", "att-workflow-driver"], ["fabric", null, null]]'
Scott Bakerafff3082018-07-16 17:23:26 -0700397{{- end -}}