blob: 922fbc6a974765f3e121144f819db201716a839c [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*/}}
Carmelo Cascone452a9ec2020-01-10 17:50:00 -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
Jonathan Hart9f638ff2018-08-22 18:19:15 -070083 onos_app#kafka:
84 type: tosca.nodes.ONOSApp
85 properties:
86 name: kafka
87 app_id: org.opencord.kafka
88 url: {{ .kafkaAppUrl }}
Matt Jeanneretf3fbac22019-01-15 21:16:39 -050089 version: {{ .kafkaAppVersion }}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070090 requirements:
91 - owner:
92 node: service#onos
93 relationship: tosca.relationships.BelongsToOne
94
95 # CORD-Configuration
96 kafka-config-attr:
97 type: tosca.nodes.ServiceInstanceAttribute
98 properties:
99 name: /onos/v1/network/configuration/apps/org.opencord.kafka
100 value: >
101 {
102 "kafka" : {
103 "bootstrapServers" : {{ .kafkaService | quote }}
104 }
105 }
106 requirements:
107 - service_instance:
Andy Bavier1a24ced2018-09-15 11:49:14 -0700108 node: onos_app#kafka
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700109 relationship: tosca.relationships.BelongsToOne
110
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700111 sadis-config-attr:
112 type: tosca.nodes.ServiceInstanceAttribute
113 properties:
114 name: /onos/v1/network/configuration/apps/org.opencord.sadis
115 value: >
116 {
117 "sadis" : {
118 "integration" : {
119 "cache" : {
Matteo Scandolo4c481d12018-11-19 13:28:17 -0800120 "maxsize" : 1000,
121 "ttl": "PT300S"
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700122 },
123 "url" : "http://sadis-service:8000/subscriber/%s"
124 }
Zack Williamse68bbde2019-04-15 22:03:13 -0700125 },
126 "bandwidthprofile":{
127 "integration":{
128 "url": "http://sadis-service:8000/bandwidthprofiles/%s",
129 "cache":{
130 "enabled":true,
131 "maxsize":40,
132 "ttl":"PT1m"
133 }
134 }
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700135 }
136 }
137 requirements:
138 - service_instance:
139 node: onos_app#sadis
140 relationship: tosca.relationships.BelongsToOne
141
142 onos_app#segmentrouting:
143 type: tosca.nodes.ONOSApp
144 properties:
145 name: org.onosproject.segmentrouting
146 app_id: org.onosproject.segmentrouting
147 requirements:
148 - owner:
149 node: service#onos
150 relationship: tosca.relationships.BelongsToOne
151
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800152{{- if .fabric.stratum.enabled }}
Daniele Moro93c2c502019-11-05 16:01:36 -0800153 onos_app#stratum-driver:
154 type: tosca.nodes.ONOSApp
155 properties:
156 name: {{ .fabric.stratum.driverAppId }}
157 app_id: {{ .fabric.stratum.driverAppId }}
158 requirements:
159 - owner:
160 node: service#onos
161 relationship: tosca.relationships.BelongsToOne
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800162 onos_app#fabric-pipeconf:
163 type: tosca.nodes.ONOSApp
164 properties:
165 name: {{ .fabric.stratum.pipeconfAppId }}
166 app_id: {{ .fabric.stratum.pipeconfAppId }}
167{{- if .fabric.stratum.pipeconfAppExternal }}
168 url: {{ .fabric.stratum.pipeconfAppUrl }}
169 version: {{ .fabric.stratum.pipeconfAppVersion }}
170{{- end }}
171 requirements:
172 - owner:
173 node: service#onos
174 relationship: tosca.relationships.BelongsToOne
175{{- end }}
176
177{{- if .bng.embedded.enabled }}
178 onos_app#bng:
179 type: tosca.nodes.ONOSApp
180 properties:
Daniele Morod4218c12020-01-22 10:09:13 -0800181 name: org.opencord.bng
182 app_id: org.opencord.bng
183 url: {{ .bngAppUrl }}
184 version: {{ .bngAppVersion }}
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800185 dependencies: {{ .fabric.stratum.pipeconfAppId }}, org.opencord.kafka, org.opencord.sadis
186 requirements:
187 - owner:
188 node: service#onos
189 relationship: tosca.relationships.BelongsToOne
190{{- end }}
191
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700192 onos_app#netcfghostprovider:
193 type: tosca.nodes.ONOSApp
194 properties:
195 name: org.onosproject.netcfghostprovider
196 app_id: org.onosproject.netcfghostprovider
197 requirements:
198 - owner:
199 node: service#onos
200 relationship: tosca.relationships.BelongsToOne
201
202 onos_app#openflow:
203 type: tosca.nodes.ONOSApp
204 properties:
205 name: org.onosproject.openflow
206 app_id: org.onosproject.openflow
207 requirements:
208 - owner:
209 node: service#onos
210 relationship: tosca.relationships.BelongsToOne
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800211{{- end }}
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700212
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800213{{- define "seba-services.basicFixturesTosca" }}
Scott Bakerafff3082018-07-16 17:23:26 -0700214tosca_definitions_version: tosca_simple_yaml_1_0
215description: Some basic fixtures
216imports:
Scott Bakerafff3082018-07-16 17:23:26 -0700217 - custom_types/networkparametertype.yaml
218 - custom_types/networktemplate.yaml
Scott Bakerafff3082018-07-16 17:23:26 -0700219topology_template:
220 node_templates:
221
222# -----------------------------------------------------------------------------
223# Network Parameter Types
224# -----------------------------------------------------------------------------
225 s_tag:
226 type: tosca.nodes.NetworkParameterType
227 properties:
228 name: s_tag
229 c_tag:
230 type: tosca.nodes.NetworkParameterType
231 properties:
232 name: c_tag
233 next_hop:
234 type: tosca.nodes.NetworkParameterType
235 properties:
236 name: next_hop
237 device:
238 type: tosca.nodes.NetworkParameterType
239 properties:
240 name: device
241 bridge:
242 type: tosca.nodes.NetworkParameterType
243 properties:
244 name: bridge
245 neutron_port_name:
246 type: tosca.nodes.NetworkParameterType
247 properties:
248 name: neutron_port_name
249
Scott Bakerafff3082018-07-16 17:23:26 -0700250# -----------------------------------------------------------------------------
251# Network Templates
252# -----------------------------------------------------------------------------
253 Private:
254 type: tosca.nodes.NetworkTemplate
255 properties:
256 name: Private
257 visibility: private
258 translation: none
259
260 Public shared IPv4:
261 type: tosca.nodes.NetworkTemplate
262 properties:
263 name: Public shared IPv4
264 visibility: private
265 translation: NAT
266 shared_network_name: nat-net
267
268 Public dedicated IPv4:
269 type: tosca.nodes.NetworkTemplate
270 properties:
271 name: Public dedicated IPv4
272 visibility: public
273 translation: none
274 shared_network_name: ext-net
275
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800276{{- end }}
Scott Bakerafff3082018-07-16 17:23:26 -0700277
278
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800279{{- define "seba-services.serviceGraphTosca" }}
Scott Bakerafff3082018-07-16 17:23:26 -0700280tosca_definitions_version: tosca_simple_yaml_1_0
281imports:
282 - custom_types/fabricservice.yaml
283 - custom_types/onosservice.yaml
284 - custom_types/rcordservice.yaml
285 - custom_types/voltservice.yaml
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800286{{- if .bng.external.enabled }}
Scott Bakerafff3082018-07-16 17:23:26 -0700287 - custom_types/fabriccrossconnectservice.yaml
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800288{{- end }}
289{{- if .bng.embedded.enabled }}
290 - custom_types/vrouterservice.yaml
291{{- end }}
Scott Bakerafff3082018-07-16 17:23:26 -0700292 - custom_types/servicedependency.yaml
293 - custom_types/servicegraphconstraint.yaml
Matteo Scandolo34dd2362018-12-12 15:16:25 -0800294description: seba service graph
Scott Bakerafff3082018-07-16 17:23:26 -0700295topology_template:
296 node_templates:
297
298# These services must be defined before loading the graph
299
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700300 service#onos:
Scott Bakerafff3082018-07-16 17:23:26 -0700301 type: tosca.nodes.ONOSService
302 properties:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700303 name: onos
Scott Bakerafff3082018-07-16 17:23:26 -0700304 must-exist: true
305
306 service#fabric:
307 type: tosca.nodes.FabricService
308 properties:
309 name: fabric
310 must-exist: true
311
312 service#rcord:
313 type: tosca.nodes.RCORDService
314 properties:
315 name: rcord
316 must-exist: true
317
318 service#volt:
319 type: tosca.nodes.VOLTService
320 properties:
321 name: volt
322 must-exist: true
323
Scott Bakerafff3082018-07-16 17:23:26 -0700324 service_dependency#onos-fabric_fabric:
325 type: tosca.nodes.ServiceDependency
326 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700327 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700328 requirements:
329 - subscriber_service:
Scott Bakere9ae0482018-08-16 15:42:05 -0700330 node: service#fabric
Scott Bakerafff3082018-07-16 17:23:26 -0700331 relationship: tosca.relationships.BelongsToOne
332 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700333 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700334 relationship: tosca.relationships.BelongsToOne
335
336 service_dependency#rcord_volt:
337 type: tosca.nodes.ServiceDependency
338 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700339 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700340 requirements:
341 - subscriber_service:
342 node: service#rcord
343 relationship: tosca.relationships.BelongsToOne
344 - provider_service:
345 node: service#volt
346 relationship: tosca.relationships.BelongsToOne
347
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700348 service_dependency#onos_volt:
Scott Bakerafff3082018-07-16 17:23:26 -0700349 type: tosca.nodes.ServiceDependency
350 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700351 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700352 requirements:
353 - subscriber_service:
Matteo Scandolo4f3d9842019-06-10 14:46:26 -0700354 node: service#volt
Scott Bakerafff3082018-07-16 17:23:26 -0700355 relationship: tosca.relationships.BelongsToOne
356 - provider_service:
Matteo Scandolo4f3d9842019-06-10 14:46:26 -0700357 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700358 relationship: tosca.relationships.BelongsToOne
359
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800360 service_dependency#onos_rcord:
361 type: tosca.nodes.ServiceDependency
362 properties:
363 connect_method: none
364 requirements:
365 - subscriber_service:
366 node: service#rcord
367 relationship: tosca.relationships.BelongsToOne
368 - provider_service:
369 node: service#onos
370 relationship: tosca.relationships.BelongsToOne
371
372{{- if .bng.external.enabled }}
373 service#fabric-crossconnect:
374 type: tosca.nodes.FabricCrossconnectService
375 properties:
376 name: fabric-crossconnect
377 must-exist: true
378
Scott Bakerafff3082018-07-16 17:23:26 -0700379 service_dependency#volt_fabric-crossconnect:
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#volt
386 relationship: tosca.relationships.BelongsToOne
387 - provider_service:
388 node: service#fabric-crossconnect
389 relationship: tosca.relationships.BelongsToOne
390
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700391 service_dependency#onos_fabric-crossconnect:
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:
397 node: service#fabric-crossconnect
398 relationship: tosca.relationships.BelongsToOne
399 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700400 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700401 relationship: tosca.relationships.BelongsToOne
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800402{{- end }}
Kartikey Dubey357048c2019-12-04 09:55:13 +0000403
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800404{{- if .bng.embedded.enabled }}
405 service#vrouter:
406 type: tosca.nodes.VRouterService
407 properties:
408 name: vrouter
409 must-exist: true
410
411 service_dependency#fabric_vrouter:
Kartikey Dubey357048c2019-12-04 09:55:13 +0000412 type: tosca.nodes.ServiceDependency
413 properties:
414 connect_method: none
415 requirements:
416 - subscriber_service:
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800417 node: service#vrouter
Kartikey Dubey357048c2019-12-04 09:55:13 +0000418 relationship: tosca.relationships.BelongsToOne
419 - provider_service:
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800420 node: service#fabric
Kartikey Dubey357048c2019-12-04 09:55:13 +0000421 relationship: tosca.relationships.BelongsToOne
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800422{{- end }}
423
424{{- end }}