blob: 916954008e18d73b380839e8b0aa783dc0673f74 [file] [log] [blame]
Woojoong Kima053c4a2019-08-09 16:19:14 -07001{{/* vim: set filetype=mustache: */}}
2{{/*
3Copyright 2019-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*/}}
17
18{{- define "comac.onosTosca" -}}
19tosca_definitions_version: tosca_simple_yaml_1_0
20
21imports:
22 - custom_types/onosapp.yaml
23 - custom_types/onosservice.yaml
24 - custom_types/serviceinstanceattribute.yaml
25
26description: Configures services in COMAC
27
28topology_template:
29 node_templates:
30
31 service#onos:
32 type: tosca.nodes.ONOSService
33 properties:
34 name: onos
35 kind: data
36 rest_hostname: {{ .onosRestService | quote }}
37 rest_port: 8181
38
Woojoong Kim4e3f0992019-09-30 14:27:12 -070039{{- if $.resdentialService.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -070040 onos_app#openflow-base:
41 type: tosca.nodes.ONOSApp
42 properties:
43 name: openflow-base
44 app_id: org.onosproject.openflow-base
45 requirements:
46 - owner:
47 node: service#onos
48 relationship: tosca.relationships.BelongsToOne
49
50 onos_app#hostprovider:
51 type: tosca.nodes.ONOSApp
52 properties:
53 name: hostprovider
54 app_id: org.onosproject.hostprovider
55 requirements:
56 - owner:
57 node: service#onos
58 relationship: tosca.relationships.BelongsToOne
59
60 onos_app#olt:
61 type: tosca.nodes.ONOSApp
62 properties:
63 name: olt
64 app_id: org.opencord.olt
65 url: {{ .oltAppUrl }}
66 version: {{ .oltAppVersion }}
67 dependencies: org.opencord.sadis
68 requirements:
69 - owner:
70 node: service#onos
71 relationship: tosca.relationships.BelongsToOne
72
73 onos_app#sadis:
74 type: tosca.nodes.ONOSApp
75 properties:
76 name: sadis
77 app_id: org.opencord.sadis
78 url: {{ .sadisAppUrl }}
79 version: {{ .sadisAppVersion }}
80 requirements:
81 - owner:
82 node: service#onos
83 relationship: tosca.relationships.BelongsToOne
84
85 onos_app#dhcpl2relay:
86 type: tosca.nodes.ONOSApp
87 properties:
88 name: dhcpl2relay
89 app_id: org.opencord.dhcpl2relay
90 url: {{ .dhcpl2relayAppUrl }}
91 version: {{ .dhcpl2relayAppVersion }}
92 dependencies: org.opencord.sadis
93 requirements:
94 - owner:
95 node: service#onos
96 relationship: tosca.relationships.BelongsToOne
97
98 onos_app#kafka:
99 type: tosca.nodes.ONOSApp
100 properties:
101 name: kafka
102 app_id: org.opencord.kafka
103 url: {{ .kafkaAppUrl }}
104 version: {{ .kafkaAppVersion }}
105 requirements:
106 - owner:
107 node: service#onos
108 relationship: tosca.relationships.BelongsToOne
109
110 # CORD-Configuration
111 kafka-config-attr:
112 type: tosca.nodes.ServiceInstanceAttribute
113 properties:
114 name: /onos/v1/network/configuration/apps/org.opencord.kafka
115 value: >
116 {
117 "kafka" : {
118 "bootstrapServers" : {{ .kafkaService | quote }}
119 }
120 }
121 requirements:
122 - service_instance:
123 node: onos_app#kafka
124 relationship: tosca.relationships.BelongsToOne
125
126 sadis-config-attr:
127 type: tosca.nodes.ServiceInstanceAttribute
128 properties:
129 name: /onos/v1/network/configuration/apps/org.opencord.sadis
130 value: >
131 {
132 "sadis" : {
133 "integration" : {
134 "cache" : {
135 "maxsize" : 1000,
136 "ttl": "PT300S"
137 },
138 "url" : "http://sadis-service:8000/subscriber/%s"
139 }
140 },
141 "bandwidthprofile":{
142 "integration":{
143 "url": "http://sadis-service:8000/bandwidthprofiles/%s",
144 "cache":{
145 "enabled":true,
146 "maxsize":40,
147 "ttl":"PT1m"
148 }
149 }
150 }
151 }
152 requirements:
153 - service_instance:
154 node: onos_app#sadis
155 relationship: tosca.relationships.BelongsToOne
156{{- end }}
157
158 onos_app#segmentrouting:
159 type: tosca.nodes.ONOSApp
160 properties:
161 name: org.onosproject.segmentrouting
162 app_id: org.onosproject.segmentrouting
163 requirements:
164 - owner:
165 node: service#onos
166 relationship: tosca.relationships.BelongsToOne
167
168 onos_app#netcfghostprovider:
169 type: tosca.nodes.ONOSApp
170 properties:
171 name: org.onosproject.netcfghostprovider
172 app_id: org.onosproject.netcfghostprovider
173 requirements:
174 - owner:
175 node: service#onos
176 relationship: tosca.relationships.BelongsToOne
177
178 onos_app#openflow:
179 type: tosca.nodes.ONOSApp
180 properties:
181 name: org.onosproject.openflow
182 app_id: org.onosproject.openflow
183 requirements:
184 - owner:
185 node: service#onos
186 relationship: tosca.relationships.BelongsToOne
187{{- end -}}
188
189{{- define "comac.basicFixturesTosca" -}}
190tosca_definitions_version: tosca_simple_yaml_1_0
191description: Some basic fixtures
192imports:
193 - custom_types/networkparametertype.yaml
194 - custom_types/networktemplate.yaml
195topology_template:
196 node_templates:
197
198# -----------------------------------------------------------------------------
199# Network Parameter Types
200# -----------------------------------------------------------------------------
201 s_tag:
202 type: tosca.nodes.NetworkParameterType
203 properties:
204 name: s_tag
205 c_tag:
206 type: tosca.nodes.NetworkParameterType
207 properties:
208 name: c_tag
209 next_hop:
210 type: tosca.nodes.NetworkParameterType
211 properties:
212 name: next_hop
213 device:
214 type: tosca.nodes.NetworkParameterType
215 properties:
216 name: device
217 bridge:
218 type: tosca.nodes.NetworkParameterType
219 properties:
220 name: bridge
221 neutron_port_name:
222 type: tosca.nodes.NetworkParameterType
223 properties:
224 name: neutron_port_name
225
226# -----------------------------------------------------------------------------
227# Network Templates
228# -----------------------------------------------------------------------------
229 Private:
230 type: tosca.nodes.NetworkTemplate
231 properties:
232 name: Private
233 visibility: private
234 translation: none
235
236 Public shared IPv4:
237 type: tosca.nodes.NetworkTemplate
238 properties:
239 name: Public shared IPv4
240 visibility: private
241 translation: NAT
242 shared_network_name: nat-net
243
244 Public dedicated IPv4:
245 type: tosca.nodes.NetworkTemplate
246 properties:
247 name: Public dedicated IPv4
248 visibility: public
249 translation: none
250 shared_network_name: ext-net
251
252{{- end -}}
253
254{{- define "comac.serviceGraphTosca" -}}
255tosca_definitions_version: tosca_simple_yaml_1_0
256imports:
257 - custom_types/fabricservice.yaml
258 - custom_types/mcordsubscriberservice.yaml
259 - custom_types/onosservice.yaml
260 - custom_types/vrouterservice.yaml
Woojoong Kim4e3f0992019-09-30 14:27:12 -0700261{{- if .Values.resdentialService.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700262 - custom_types/rcordservice.yaml
263 - custom_types/voltservice.yaml
264 - custom_types/fabriccrossconnectservice.yaml
265{{- end }}
266 - custom_types/servicegraphconstraint.yaml
267 - custom_types/servicedependency.yaml
268 - custom_types/service.yaml
269description: COMAC service graph
270topology_template:
271 node_templates:
272
273 service#onos:
274 type: tosca.nodes.ONOSService
275 properties:
276 name: onos
277 must-exist: true
278
279 service#fabric:
280 type: tosca.nodes.FabricService
281 properties:
282 name: fabric
283 must-exist: true
284
285 service#vrouter:
286 type: tosca.nodes.VRouterService
287 properties:
288 name: vrouter
289 must-exist: true
290
291 service#mcord:
292 type: tosca.nodes.MCordSubscriberService
293 properties:
294 name: mcord
295 must-exist: true
296
Woojoong Kim4e3f0992019-09-30 14:27:12 -0700297{{- if .Values.resdentialService.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700298 service#rcord:
299 type: tosca.nodes.RCORDService
300 properties:
301 name: rcord
302 must-exist: true
303
304 service#volt:
305 type: tosca.nodes.VOLTService
306 properties:
307 name: volt
308 must-exist: true
309
310 service#fabric-crossconnect:
311 type: tosca.nodes.FabricCrossconnectService
312 properties:
313 name: fabric-crossconnect
314 must-exist: true
315{{- end }}
316
317 service#omec-cp:
318 type: tosca.nodes.Service
319 properties:
320 name: omec-cp
321
322 service#omec-up:
323 type: tosca.nodes.Service
324 properties:
325 name: omec-up
326
327 service#cdn-local:
328 type: tosca.nodes.Service
329 properties:
330 name: cdn-local
331
332 service#cdn-remote:
333 type: tosca.nodes.Service
334 properties:
335 name: cdn-remote
336
337 service_dependency#onos-fabric_fabric:
338 type: tosca.nodes.ServiceDependency
339 properties:
340 connect_method: none
341 requirements:
342 - subscriber_service:
343 node: service#fabric
344 relationship: tosca.relationships.BelongsToOne
345 - provider_service:
346 node: service#onos
347 relationship: tosca.relationships.BelongsToOne
348
349 service_dependency#vrouter_fabric:
350 type: tosca.nodes.ServiceDependency
351 properties:
352 connect_method: none
353 requirements:
354 - subscriber_service:
355 node: service#vrouter
356 relationship: tosca.relationships.BelongsToOne
357 - provider_service:
358 node: service#fabric
359 relationship: tosca.relationships.BelongsToOne
360
Woojoong Kim4e3f0992019-09-30 14:27:12 -0700361{{- if .Values.resdentialService.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700362 service_dependency#rcord_volt:
363 type: tosca.nodes.ServiceDependency
364 properties:
365 connect_method: none
366 requirements:
367 - subscriber_service:
368 node: service#rcord
369 relationship: tosca.relationships.BelongsToOne
370 - provider_service:
371 node: service#volt
372 relationship: tosca.relationships.BelongsToOne
373
374 service_dependency#onos_volt:
375 type: tosca.nodes.ServiceDependency
376 properties:
377 connect_method: none
378 requirements:
379 - subscriber_service:
380 node: service#volt
381 relationship: tosca.relationships.BelongsToOne
382 - provider_service:
383 node: service#onos
384 relationship: tosca.relationships.BelongsToOne
385
386 service_dependency#volt_fabric-crossconnect:
387 type: tosca.nodes.ServiceDependency
388 properties:
389 connect_method: none
390 requirements:
391 - subscriber_service:
392 node: service#volt
393 relationship: tosca.relationships.BelongsToOne
394 - provider_service:
395 node: service#fabric-crossconnect
396 relationship: tosca.relationships.BelongsToOne
397
398 service_dependency#onos_fabric-crossconnect:
399 type: tosca.nodes.ServiceDependency
400 properties:
401 connect_method: none
402 requirements:
403 - subscriber_service:
404 node: service#fabric-crossconnect
405 relationship: tosca.relationships.BelongsToOne
406 - provider_service:
407 node: service#onos
408 relationship: tosca.relationships.BelongsToOne
409{{- end }}
410
411 service_dependency#mcord_epc_cp:
412 type: tosca.nodes.ServiceDependency
413 properties:
414 connect_method: none
415 requirements:
416 - subscriber_service:
417 node: service#omec-cp
418 relationship: tosca.relationships.BelongsToOne
419 - provider_service:
420 node: service#mcord
421 relationship: tosca.relationships.BelongsToOne
422
423 service_dependency#mcord_epc_up:
424 type: tosca.nodes.ServiceDependency
425 properties:
426 connect_method: none
427 requirements:
428 - subscriber_service:
429 node: service#omec-up
430 relationship: tosca.relationships.BelongsToOne
431 - provider_service:
432 node: service#mcord
433 relationship: tosca.relationships.BelongsToOne
434
435 service_dependency#epc_cp_epc_up:
436 type: tosca.nodes.ServiceDependency
437 properties:
438 connect_method: none
439 requirements:
440 - subscriber_service:
441 node: service#omec-up
442 relationship: tosca.relationships.BelongsToOne
443 - provider_service:
444 node: service#omec-cp
445 relationship: tosca.relationships.BelongsToOne
446
447 service_dependency#epc_up_cdn_local:
448 type: tosca.nodes.ServiceDependency
449 properties:
450 connect_method: none
451 requirements:
452 - subscriber_service:
453 node: service#cdn-local
454 relationship: tosca.relationships.BelongsToOne
455 - provider_service:
456 node: service#omec-up
457 relationship: tosca.relationships.BelongsToOne
458
459 service_dependency#cdn_local_cdn_remote:
460 type: tosca.nodes.ServiceDependency
461 properties:
462 connect_method: none
463 requirements:
464 - subscriber_service:
465 node: service#cdn-remote
466 relationship: tosca.relationships.BelongsToOne
467 - provider_service:
468 node: service#cdn-local
469 relationship: tosca.relationships.BelongsToOne
470{{- end -}}