blob: 07de05a0d3063d0dee4b070f71b7a8d96d968e7a [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 }}
153 onos_app#fabric-pipeconf:
154 type: tosca.nodes.ONOSApp
155 properties:
156 name: {{ .fabric.stratum.pipeconfAppId }}
157 app_id: {{ .fabric.stratum.pipeconfAppId }}
158{{- if .fabric.stratum.pipeconfAppExternal }}
159 url: {{ .fabric.stratum.pipeconfAppUrl }}
160 version: {{ .fabric.stratum.pipeconfAppVersion }}
161{{- end }}
162 requirements:
163 - owner:
164 node: service#onos
165 relationship: tosca.relationships.BelongsToOne
166{{- end }}
167
168{{- if .bng.embedded.enabled }}
169 onos_app#bng:
170 type: tosca.nodes.ONOSApp
171 properties:
172 name: {{ .bng.embedded.bngAppId }}
173 app_id: {{ .bng.embedded.bngAppId }}
174 url: {{ .bng.embedded.bngAppUrl }}
175 version: {{ .bng.embedded.bngAppVersion }}
176 dependencies: {{ .fabric.stratum.pipeconfAppId }}, org.opencord.kafka, org.opencord.sadis
177 requirements:
178 - owner:
179 node: service#onos
180 relationship: tosca.relationships.BelongsToOne
181{{- end }}
182
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700183 onos_app#netcfghostprovider:
184 type: tosca.nodes.ONOSApp
185 properties:
186 name: org.onosproject.netcfghostprovider
187 app_id: org.onosproject.netcfghostprovider
188 requirements:
189 - owner:
190 node: service#onos
191 relationship: tosca.relationships.BelongsToOne
192
193 onos_app#openflow:
194 type: tosca.nodes.ONOSApp
195 properties:
196 name: org.onosproject.openflow
197 app_id: org.onosproject.openflow
198 requirements:
199 - owner:
200 node: service#onos
201 relationship: tosca.relationships.BelongsToOne
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800202{{- end }}
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700203
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800204{{- define "seba-services.basicFixturesTosca" }}
Scott Bakerafff3082018-07-16 17:23:26 -0700205tosca_definitions_version: tosca_simple_yaml_1_0
206description: Some basic fixtures
207imports:
Scott Bakerafff3082018-07-16 17:23:26 -0700208 - custom_types/networkparametertype.yaml
209 - custom_types/networktemplate.yaml
Scott Bakerafff3082018-07-16 17:23:26 -0700210topology_template:
211 node_templates:
212
213# -----------------------------------------------------------------------------
214# Network Parameter Types
215# -----------------------------------------------------------------------------
216 s_tag:
217 type: tosca.nodes.NetworkParameterType
218 properties:
219 name: s_tag
220 c_tag:
221 type: tosca.nodes.NetworkParameterType
222 properties:
223 name: c_tag
224 next_hop:
225 type: tosca.nodes.NetworkParameterType
226 properties:
227 name: next_hop
228 device:
229 type: tosca.nodes.NetworkParameterType
230 properties:
231 name: device
232 bridge:
233 type: tosca.nodes.NetworkParameterType
234 properties:
235 name: bridge
236 neutron_port_name:
237 type: tosca.nodes.NetworkParameterType
238 properties:
239 name: neutron_port_name
240
Scott Bakerafff3082018-07-16 17:23:26 -0700241# -----------------------------------------------------------------------------
242# Network Templates
243# -----------------------------------------------------------------------------
244 Private:
245 type: tosca.nodes.NetworkTemplate
246 properties:
247 name: Private
248 visibility: private
249 translation: none
250
251 Public shared IPv4:
252 type: tosca.nodes.NetworkTemplate
253 properties:
254 name: Public shared IPv4
255 visibility: private
256 translation: NAT
257 shared_network_name: nat-net
258
259 Public dedicated IPv4:
260 type: tosca.nodes.NetworkTemplate
261 properties:
262 name: Public dedicated IPv4
263 visibility: public
264 translation: none
265 shared_network_name: ext-net
266
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800267{{- end }}
Scott Bakerafff3082018-07-16 17:23:26 -0700268
269
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800270{{- define "seba-services.serviceGraphTosca" }}
Scott Bakerafff3082018-07-16 17:23:26 -0700271tosca_definitions_version: tosca_simple_yaml_1_0
272imports:
273 - custom_types/fabricservice.yaml
274 - custom_types/onosservice.yaml
275 - custom_types/rcordservice.yaml
276 - custom_types/voltservice.yaml
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800277{{- if .bng.external.enabled }}
Scott Bakerafff3082018-07-16 17:23:26 -0700278 - custom_types/fabriccrossconnectservice.yaml
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800279{{- end }}
280{{- if .bng.embedded.enabled }}
281 - custom_types/vrouterservice.yaml
282{{- end }}
Scott Bakerafff3082018-07-16 17:23:26 -0700283 - custom_types/servicedependency.yaml
284 - custom_types/servicegraphconstraint.yaml
Matteo Scandolo34dd2362018-12-12 15:16:25 -0800285description: seba service graph
Scott Bakerafff3082018-07-16 17:23:26 -0700286topology_template:
287 node_templates:
288
289# These services must be defined before loading the graph
290
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700291 service#onos:
Scott Bakerafff3082018-07-16 17:23:26 -0700292 type: tosca.nodes.ONOSService
293 properties:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700294 name: onos
Scott Bakerafff3082018-07-16 17:23:26 -0700295 must-exist: true
296
297 service#fabric:
298 type: tosca.nodes.FabricService
299 properties:
300 name: fabric
301 must-exist: true
302
303 service#rcord:
304 type: tosca.nodes.RCORDService
305 properties:
306 name: rcord
307 must-exist: true
308
309 service#volt:
310 type: tosca.nodes.VOLTService
311 properties:
312 name: volt
313 must-exist: true
314
Scott Bakerafff3082018-07-16 17:23:26 -0700315 service_dependency#onos-fabric_fabric:
316 type: tosca.nodes.ServiceDependency
317 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700318 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700319 requirements:
320 - subscriber_service:
Scott Bakere9ae0482018-08-16 15:42:05 -0700321 node: service#fabric
Scott Bakerafff3082018-07-16 17:23:26 -0700322 relationship: tosca.relationships.BelongsToOne
323 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700324 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700325 relationship: tosca.relationships.BelongsToOne
326
327 service_dependency#rcord_volt:
328 type: tosca.nodes.ServiceDependency
329 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700330 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700331 requirements:
332 - subscriber_service:
333 node: service#rcord
334 relationship: tosca.relationships.BelongsToOne
335 - provider_service:
336 node: service#volt
337 relationship: tosca.relationships.BelongsToOne
338
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700339 service_dependency#onos_volt:
Scott Bakerafff3082018-07-16 17:23:26 -0700340 type: tosca.nodes.ServiceDependency
341 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700342 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700343 requirements:
344 - subscriber_service:
Matteo Scandolo4f3d9842019-06-10 14:46:26 -0700345 node: service#volt
Scott Bakerafff3082018-07-16 17:23:26 -0700346 relationship: tosca.relationships.BelongsToOne
347 - provider_service:
Matteo Scandolo4f3d9842019-06-10 14:46:26 -0700348 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700349 relationship: tosca.relationships.BelongsToOne
350
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800351 service_dependency#onos_rcord:
352 type: tosca.nodes.ServiceDependency
353 properties:
354 connect_method: none
355 requirements:
356 - subscriber_service:
357 node: service#rcord
358 relationship: tosca.relationships.BelongsToOne
359 - provider_service:
360 node: service#onos
361 relationship: tosca.relationships.BelongsToOne
362
363{{- if .bng.external.enabled }}
364 service#fabric-crossconnect:
365 type: tosca.nodes.FabricCrossconnectService
366 properties:
367 name: fabric-crossconnect
368 must-exist: true
369
Scott Bakerafff3082018-07-16 17:23:26 -0700370 service_dependency#volt_fabric-crossconnect:
371 type: tosca.nodes.ServiceDependency
372 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700373 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700374 requirements:
375 - subscriber_service:
376 node: service#volt
377 relationship: tosca.relationships.BelongsToOne
378 - provider_service:
379 node: service#fabric-crossconnect
380 relationship: tosca.relationships.BelongsToOne
381
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700382 service_dependency#onos_fabric-crossconnect:
Scott Bakerafff3082018-07-16 17:23:26 -0700383 type: tosca.nodes.ServiceDependency
384 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700385 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700386 requirements:
387 - subscriber_service:
388 node: service#fabric-crossconnect
389 relationship: tosca.relationships.BelongsToOne
390 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700391 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700392 relationship: tosca.relationships.BelongsToOne
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800393{{- end }}
Kartikey Dubey357048c2019-12-04 09:55:13 +0000394
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800395{{- if .bng.embedded.enabled }}
396 service#vrouter:
397 type: tosca.nodes.VRouterService
398 properties:
399 name: vrouter
400 must-exist: true
401
402 service_dependency#fabric_vrouter:
Kartikey Dubey357048c2019-12-04 09:55:13 +0000403 type: tosca.nodes.ServiceDependency
404 properties:
405 connect_method: none
406 requirements:
407 - subscriber_service:
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800408 node: service#vrouter
Kartikey Dubey357048c2019-12-04 09:55:13 +0000409 relationship: tosca.relationships.BelongsToOne
410 - provider_service:
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800411 node: service#fabric
Kartikey Dubey357048c2019-12-04 09:55:13 +0000412 relationship: tosca.relationships.BelongsToOne
Carmelo Cascone452a9ec2020-01-10 17:50:00 -0800413{{- end }}
414
415{{- end }}