blob: 792f15265012bc878eccd6911835d50e576d13bd [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 Kim6db4c4d2019-10-03 10:22:07 -070039{{- if $.residentialService.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
Woojoong Kimfdb269e2019-10-02 10:51:33 -070060 # FOR ATT-Workflow --
61 onos_app#aaa:
62 type: tosca.nodes.ONOSApp
63 properties:
64 name: aaa
65 app_id: org.opencord.aaa
66 url: {{ .aaaAppUrl }}
67 version: {{ .aaaAppVersion }}
68 dependencies: org.opencord.sadis
69 requirements:
70 - owner:
71 node: service#onos
72 relationship: tosca.relationships.BelongsToOne
73 # --
74
Woojoong Kima053c4a2019-08-09 16:19:14 -070075 onos_app#olt:
76 type: tosca.nodes.ONOSApp
77 properties:
78 name: olt
79 app_id: org.opencord.olt
80 url: {{ .oltAppUrl }}
81 version: {{ .oltAppVersion }}
82 dependencies: org.opencord.sadis
83 requirements:
84 - owner:
85 node: service#onos
86 relationship: tosca.relationships.BelongsToOne
87
88 onos_app#sadis:
89 type: tosca.nodes.ONOSApp
90 properties:
91 name: sadis
92 app_id: org.opencord.sadis
93 url: {{ .sadisAppUrl }}
94 version: {{ .sadisAppVersion }}
95 requirements:
96 - owner:
97 node: service#onos
98 relationship: tosca.relationships.BelongsToOne
99
100 onos_app#dhcpl2relay:
101 type: tosca.nodes.ONOSApp
102 properties:
103 name: dhcpl2relay
104 app_id: org.opencord.dhcpl2relay
105 url: {{ .dhcpl2relayAppUrl }}
106 version: {{ .dhcpl2relayAppVersion }}
107 dependencies: org.opencord.sadis
108 requirements:
109 - owner:
110 node: service#onos
111 relationship: tosca.relationships.BelongsToOne
112
113 onos_app#kafka:
114 type: tosca.nodes.ONOSApp
115 properties:
116 name: kafka
117 app_id: org.opencord.kafka
118 url: {{ .kafkaAppUrl }}
119 version: {{ .kafkaAppVersion }}
120 requirements:
121 - owner:
122 node: service#onos
123 relationship: tosca.relationships.BelongsToOne
124
125 # CORD-Configuration
126 kafka-config-attr:
127 type: tosca.nodes.ServiceInstanceAttribute
128 properties:
129 name: /onos/v1/network/configuration/apps/org.opencord.kafka
130 value: >
131 {
132 "kafka" : {
133 "bootstrapServers" : {{ .kafkaService | quote }}
134 }
135 }
136 requirements:
137 - service_instance:
138 node: onos_app#kafka
139 relationship: tosca.relationships.BelongsToOne
140
141 sadis-config-attr:
142 type: tosca.nodes.ServiceInstanceAttribute
143 properties:
144 name: /onos/v1/network/configuration/apps/org.opencord.sadis
145 value: >
146 {
147 "sadis" : {
148 "integration" : {
149 "cache" : {
150 "maxsize" : 1000,
151 "ttl": "PT300S"
152 },
153 "url" : "http://sadis-service:8000/subscriber/%s"
154 }
155 },
156 "bandwidthprofile":{
157 "integration":{
158 "url": "http://sadis-service:8000/bandwidthprofiles/%s",
159 "cache":{
160 "enabled":true,
161 "maxsize":40,
162 "ttl":"PT1m"
163 }
164 }
165 }
166 }
167 requirements:
168 - service_instance:
169 node: onos_app#sadis
170 relationship: tosca.relationships.BelongsToOne
Woojoong Kimfdb269e2019-10-02 10:51:33 -0700171
172 # FOR ATT-Workflow --
173 aaa-config-attr:
174 type: tosca.nodes.ServiceInstanceAttribute
175 properties:
176 name: /onos/v1/network/configuration/apps/org.opencord.aaa
177 value: >
178 {
179 "AAA" : {
180 "radiusConnectionType" : "socket",
181 "radiusHost" : "freeradius.voltha.svc.cluster.local",
182 "radiusServerPort" : "1812",
183 "radiusSecret" : "SECRET"
184 }
185 }
186 requirements:
187 - service_instance:
188 node: onos_app#aaa
189 relationship: tosca.relationships.BelongsToOne
190
191 olt-config-attr:
192 type: tosca.nodes.ServiceInstanceAttribute
193 properties:
194 name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true
195 value: >
196 {
197 "enableDhcpOnProvisioning" : true
198 }
199 requirements:
200 - service_instance:
201 node: onos_app#olt
202 relationship: tosca.relationships.BelongsToOne
203 # --
Woojoong Kima053c4a2019-08-09 16:19:14 -0700204{{- end }}
205
206 onos_app#segmentrouting:
207 type: tosca.nodes.ONOSApp
208 properties:
209 name: org.onosproject.segmentrouting
210 app_id: org.onosproject.segmentrouting
211 requirements:
212 - owner:
213 node: service#onos
214 relationship: tosca.relationships.BelongsToOne
215
216 onos_app#netcfghostprovider:
217 type: tosca.nodes.ONOSApp
218 properties:
219 name: org.onosproject.netcfghostprovider
220 app_id: org.onosproject.netcfghostprovider
221 requirements:
222 - owner:
223 node: service#onos
224 relationship: tosca.relationships.BelongsToOne
225
226 onos_app#openflow:
227 type: tosca.nodes.ONOSApp
228 properties:
229 name: org.onosproject.openflow
230 app_id: org.onosproject.openflow
231 requirements:
232 - owner:
233 node: service#onos
234 relationship: tosca.relationships.BelongsToOne
235{{- end -}}
236
237{{- define "comac.basicFixturesTosca" -}}
238tosca_definitions_version: tosca_simple_yaml_1_0
239description: Some basic fixtures
240imports:
241 - custom_types/networkparametertype.yaml
242 - custom_types/networktemplate.yaml
243topology_template:
244 node_templates:
245
246# -----------------------------------------------------------------------------
247# Network Parameter Types
248# -----------------------------------------------------------------------------
249 s_tag:
250 type: tosca.nodes.NetworkParameterType
251 properties:
252 name: s_tag
253 c_tag:
254 type: tosca.nodes.NetworkParameterType
255 properties:
256 name: c_tag
257 next_hop:
258 type: tosca.nodes.NetworkParameterType
259 properties:
260 name: next_hop
261 device:
262 type: tosca.nodes.NetworkParameterType
263 properties:
264 name: device
265 bridge:
266 type: tosca.nodes.NetworkParameterType
267 properties:
268 name: bridge
269 neutron_port_name:
270 type: tosca.nodes.NetworkParameterType
271 properties:
272 name: neutron_port_name
273
274# -----------------------------------------------------------------------------
275# Network Templates
276# -----------------------------------------------------------------------------
277 Private:
278 type: tosca.nodes.NetworkTemplate
279 properties:
280 name: Private
281 visibility: private
282 translation: none
283
284 Public shared IPv4:
285 type: tosca.nodes.NetworkTemplate
286 properties:
287 name: Public shared IPv4
288 visibility: private
289 translation: NAT
290 shared_network_name: nat-net
291
292 Public dedicated IPv4:
293 type: tosca.nodes.NetworkTemplate
294 properties:
295 name: Public dedicated IPv4
296 visibility: public
297 translation: none
298 shared_network_name: ext-net
299
300{{- end -}}
301
302{{- define "comac.serviceGraphTosca" -}}
303tosca_definitions_version: tosca_simple_yaml_1_0
304imports:
Woojoong Kim1e7d4862019-10-09 13:15:59 -0700305{{- if .Values.fabric.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700306 - custom_types/fabricservice.yaml
Woojoong Kim1e7d4862019-10-09 13:15:59 -0700307{{- end }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700308 - custom_types/mcordsubscriberservice.yaml
309 - custom_types/onosservice.yaml
Woojoong Kim1e7d4862019-10-09 13:15:59 -0700310{{- if .Values.vrouter.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700311 - custom_types/vrouterservice.yaml
Woojoong Kim1e7d4862019-10-09 13:15:59 -0700312{{- end }}
Woojoong Kim13a5c992019-10-03 11:03:27 -0700313{{- if .Values.progran.enabled }}
Woojoong Kim63858a52019-10-03 14:03:33 -0700314 - custom_types/progranservice.yaml
Woojoong Kim13a5c992019-10-03 11:03:27 -0700315{{- end }}
Woojoong Kim6db4c4d2019-10-03 10:22:07 -0700316{{- if .Values.residentialService.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700317 - custom_types/rcordservice.yaml
318 - custom_types/voltservice.yaml
319 - custom_types/fabriccrossconnectservice.yaml
Woojoong Kimfdb269e2019-10-02 10:51:33 -0700320 - custom_types/attworkflowdriverservice.yaml
Woojoong Kima053c4a2019-08-09 16:19:14 -0700321{{- end }}
322 - custom_types/servicegraphconstraint.yaml
323 - custom_types/servicedependency.yaml
324 - custom_types/service.yaml
325description: COMAC service graph
326topology_template:
327 node_templates:
328
329 service#onos:
330 type: tosca.nodes.ONOSService
331 properties:
332 name: onos
333 must-exist: true
334
Woojoong Kim1e7d4862019-10-09 13:15:59 -0700335{{ if .Values.fabric.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700336 service#fabric:
337 type: tosca.nodes.FabricService
338 properties:
339 name: fabric
340 must-exist: true
Woojoong Kim1e7d4862019-10-09 13:15:59 -0700341{{ end }}
342{{ if .Values.vrouter.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700343 service#vrouter:
344 type: tosca.nodes.VRouterService
345 properties:
346 name: vrouter
347 must-exist: true
Woojoong Kim1e7d4862019-10-09 13:15:59 -0700348{{ end }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700349
350 service#mcord:
351 type: tosca.nodes.MCordSubscriberService
352 properties:
353 name: mcord
354 must-exist: true
355
Woojoong Kim13a5c992019-10-03 11:03:27 -0700356{{ if .Values.progran.enabled }}
357 service#progran:
358 type: tosca.nodes.ProgranService
359 properties:
360 name: progran
361 must-exist: true
362{{ end }}
363
Woojoong Kim6db4c4d2019-10-03 10:22:07 -0700364{{- if .Values.residentialService.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700365 service#rcord:
366 type: tosca.nodes.RCORDService
367 properties:
368 name: rcord
369 must-exist: true
370
371 service#volt:
372 type: tosca.nodes.VOLTService
373 properties:
374 name: volt
375 must-exist: true
376
377 service#fabric-crossconnect:
378 type: tosca.nodes.FabricCrossconnectService
379 properties:
380 name: fabric-crossconnect
381 must-exist: true
Woojoong Kimfdb269e2019-10-02 10:51:33 -0700382
383 # FOR ATT-Workflow --
384 service#att-workflow-driver:
385 type: tosca.nodes.AttWorkflowDriverService
386 properties:
387 name: att-workflow-driver
388 must-exist: true
389 # --
Woojoong Kima053c4a2019-08-09 16:19:14 -0700390{{- end }}
391
392 service#omec-cp:
393 type: tosca.nodes.Service
394 properties:
395 name: omec-cp
396
397 service#omec-up:
398 type: tosca.nodes.Service
399 properties:
400 name: omec-up
401
402 service#cdn-local:
403 type: tosca.nodes.Service
404 properties:
405 name: cdn-local
406
407 service#cdn-remote:
408 type: tosca.nodes.Service
409 properties:
410 name: cdn-remote
411
Woojoong Kim1e7d4862019-10-09 13:15:59 -0700412{{ if .Values.fabric.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700413 service_dependency#onos-fabric_fabric:
414 type: tosca.nodes.ServiceDependency
415 properties:
416 connect_method: none
417 requirements:
418 - subscriber_service:
419 node: service#fabric
420 relationship: tosca.relationships.BelongsToOne
421 - provider_service:
422 node: service#onos
423 relationship: tosca.relationships.BelongsToOne
424
Woojoong Kim1e7d4862019-10-09 13:15:59 -0700425{{ if .Values.vrouter.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700426 service_dependency#vrouter_fabric:
427 type: tosca.nodes.ServiceDependency
428 properties:
429 connect_method: none
430 requirements:
431 - subscriber_service:
432 node: service#vrouter
433 relationship: tosca.relationships.BelongsToOne
434 - provider_service:
435 node: service#fabric
436 relationship: tosca.relationships.BelongsToOne
Woojoong Kim1e7d4862019-10-09 13:15:59 -0700437{{ end }}
438{{ end }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700439
Woojoong Kim6db4c4d2019-10-03 10:22:07 -0700440{{- if .Values.residentialService.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700441 service_dependency#rcord_volt:
442 type: tosca.nodes.ServiceDependency
443 properties:
444 connect_method: none
445 requirements:
446 - subscriber_service:
447 node: service#rcord
448 relationship: tosca.relationships.BelongsToOne
449 - provider_service:
450 node: service#volt
451 relationship: tosca.relationships.BelongsToOne
452
453 service_dependency#onos_volt:
454 type: tosca.nodes.ServiceDependency
455 properties:
456 connect_method: none
457 requirements:
458 - subscriber_service:
459 node: service#volt
460 relationship: tosca.relationships.BelongsToOne
461 - provider_service:
462 node: service#onos
463 relationship: tosca.relationships.BelongsToOne
464
465 service_dependency#volt_fabric-crossconnect:
466 type: tosca.nodes.ServiceDependency
467 properties:
468 connect_method: none
469 requirements:
470 - subscriber_service:
471 node: service#volt
472 relationship: tosca.relationships.BelongsToOne
473 - provider_service:
474 node: service#fabric-crossconnect
475 relationship: tosca.relationships.BelongsToOne
476
477 service_dependency#onos_fabric-crossconnect:
478 type: tosca.nodes.ServiceDependency
479 properties:
480 connect_method: none
481 requirements:
482 - subscriber_service:
483 node: service#fabric-crossconnect
484 relationship: tosca.relationships.BelongsToOne
485 - provider_service:
486 node: service#onos
487 relationship: tosca.relationships.BelongsToOne
Woojoong Kimfdb269e2019-10-02 10:51:33 -0700488
489 # FOR ATT-Workflow --
490 service_dependency#workflow_volt:
491 type: tosca.nodes.ServiceDependency
492 properties:
493 connect_method: none
494 requirements:
495 - subscriber_service:
496 node: service#att-workflow-driver
497 relationship: tosca.relationships.BelongsToOne
498 - provider_service:
499 node: service#volt
500 relationship: tosca.relationships.BelongsToOne
501 # --
Woojoong Kima053c4a2019-08-09 16:19:14 -0700502{{- end }}
503
Woojoong Kim13a5c992019-10-03 11:03:27 -0700504{{ if .Values.progran.enabled }}
505 service_dependency#mcord_progran:
506 type: tosca.nodes.ServiceDependency
507 properties:
508 connect_method: none
509 requirements:
510 - subscriber_service:
511 node: service#progran
512 relationship: tosca.relationships.BelongsToOne
513 - provider_service:
514 node: service#mcord
515 relationship: tosca.relationships.BelongsToOne
516
517 service_dependency#progran_epc_cp:
518 type: tosca.nodes.ServiceDependency
519 properties:
520 connect_method: none
521 requirements:
522 - subscriber_service:
523 node: service#omec-cp
524 relationship: tosca.relationships.BelongsToOne
525 - provider_service:
526 node: service#progran
527 relationship: tosca.relationships.BelongsToOne
528
529 service_dependency#progran_epc_up:
530 type: tosca.nodes.ServiceDependency
531 properties:
532 connect_method: none
533 requirements:
534 - subscriber_service:
535 node: service#omec-up
536 relationship: tosca.relationships.BelongsToOne
537 - provider_service:
538 node: service#progran
539 relationship: tosca.relationships.BelongsToOne
540
541{{ else }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700542 service_dependency#mcord_epc_cp:
543 type: tosca.nodes.ServiceDependency
544 properties:
545 connect_method: none
546 requirements:
547 - subscriber_service:
548 node: service#omec-cp
549 relationship: tosca.relationships.BelongsToOne
550 - provider_service:
551 node: service#mcord
552 relationship: tosca.relationships.BelongsToOne
553
554 service_dependency#mcord_epc_up:
555 type: tosca.nodes.ServiceDependency
556 properties:
557 connect_method: none
558 requirements:
559 - subscriber_service:
560 node: service#omec-up
561 relationship: tosca.relationships.BelongsToOne
562 - provider_service:
563 node: service#mcord
564 relationship: tosca.relationships.BelongsToOne
Woojoong Kim13a5c992019-10-03 11:03:27 -0700565{{ end }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700566
567 service_dependency#epc_cp_epc_up:
568 type: tosca.nodes.ServiceDependency
569 properties:
570 connect_method: none
571 requirements:
572 - subscriber_service:
573 node: service#omec-up
574 relationship: tosca.relationships.BelongsToOne
575 - provider_service:
576 node: service#omec-cp
577 relationship: tosca.relationships.BelongsToOne
578
579 service_dependency#epc_up_cdn_local:
580 type: tosca.nodes.ServiceDependency
581 properties:
582 connect_method: none
583 requirements:
584 - subscriber_service:
585 node: service#cdn-local
586 relationship: tosca.relationships.BelongsToOne
587 - provider_service:
588 node: service#omec-up
589 relationship: tosca.relationships.BelongsToOne
590
591 service_dependency#cdn_local_cdn_remote:
592 type: tosca.nodes.ServiceDependency
593 properties:
594 connect_method: none
595 requirements:
596 - subscriber_service:
597 node: service#cdn-remote
598 relationship: tosca.relationships.BelongsToOne
599 - provider_service:
600 node: service#cdn-local
601 relationship: tosca.relationships.BelongsToOne
Woojoong Kimfdb269e2019-10-02 10:51:33 -0700602
603 constraints:
604 type: tosca.nodes.ServiceGraphConstraint
605 properties:
Woojoong Kim13a5c992019-10-03 11:03:27 -0700606 constraints: '[["mcord", null, null, "rcord"], ["progran", null, "att-workflow-driver", "volt"], ["omec-cp", "omec-up", "onos", "fabric-crossconnect"], [null, "cdn-local", "fabric", null], [null, "cdn-remote", "vrouter", null]]'
Woojoong Kimfdb269e2019-10-02 10:51:33 -0700607{{- end -}}