blob: 7b0f0006de23c303d2a8b30fa20aa0d794f75885 [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:
305 - custom_types/fabricservice.yaml
306 - custom_types/mcordsubscriberservice.yaml
307 - custom_types/onosservice.yaml
308 - custom_types/vrouterservice.yaml
Woojoong Kim6db4c4d2019-10-03 10:22:07 -0700309{{- if .Values.residentialService.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700310 - custom_types/rcordservice.yaml
311 - custom_types/voltservice.yaml
312 - custom_types/fabriccrossconnectservice.yaml
Woojoong Kimfdb269e2019-10-02 10:51:33 -0700313 - custom_types/attworkflowdriverservice.yaml
Woojoong Kima053c4a2019-08-09 16:19:14 -0700314{{- end }}
315 - custom_types/servicegraphconstraint.yaml
316 - custom_types/servicedependency.yaml
317 - custom_types/service.yaml
318description: COMAC service graph
319topology_template:
320 node_templates:
321
322 service#onos:
323 type: tosca.nodes.ONOSService
324 properties:
325 name: onos
326 must-exist: true
327
328 service#fabric:
329 type: tosca.nodes.FabricService
330 properties:
331 name: fabric
332 must-exist: true
333
334 service#vrouter:
335 type: tosca.nodes.VRouterService
336 properties:
337 name: vrouter
338 must-exist: true
339
340 service#mcord:
341 type: tosca.nodes.MCordSubscriberService
342 properties:
343 name: mcord
344 must-exist: true
345
Woojoong Kim6db4c4d2019-10-03 10:22:07 -0700346{{- if .Values.residentialService.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700347 service#rcord:
348 type: tosca.nodes.RCORDService
349 properties:
350 name: rcord
351 must-exist: true
352
353 service#volt:
354 type: tosca.nodes.VOLTService
355 properties:
356 name: volt
357 must-exist: true
358
359 service#fabric-crossconnect:
360 type: tosca.nodes.FabricCrossconnectService
361 properties:
362 name: fabric-crossconnect
363 must-exist: true
Woojoong Kimfdb269e2019-10-02 10:51:33 -0700364
365 # FOR ATT-Workflow --
366 service#att-workflow-driver:
367 type: tosca.nodes.AttWorkflowDriverService
368 properties:
369 name: att-workflow-driver
370 must-exist: true
371 # --
Woojoong Kima053c4a2019-08-09 16:19:14 -0700372{{- end }}
373
374 service#omec-cp:
375 type: tosca.nodes.Service
376 properties:
377 name: omec-cp
378
379 service#omec-up:
380 type: tosca.nodes.Service
381 properties:
382 name: omec-up
383
384 service#cdn-local:
385 type: tosca.nodes.Service
386 properties:
387 name: cdn-local
388
389 service#cdn-remote:
390 type: tosca.nodes.Service
391 properties:
392 name: cdn-remote
393
394 service_dependency#onos-fabric_fabric:
395 type: tosca.nodes.ServiceDependency
396 properties:
397 connect_method: none
398 requirements:
399 - subscriber_service:
400 node: service#fabric
401 relationship: tosca.relationships.BelongsToOne
402 - provider_service:
403 node: service#onos
404 relationship: tosca.relationships.BelongsToOne
405
406 service_dependency#vrouter_fabric:
407 type: tosca.nodes.ServiceDependency
408 properties:
409 connect_method: none
410 requirements:
411 - subscriber_service:
412 node: service#vrouter
413 relationship: tosca.relationships.BelongsToOne
414 - provider_service:
415 node: service#fabric
416 relationship: tosca.relationships.BelongsToOne
417
Woojoong Kim6db4c4d2019-10-03 10:22:07 -0700418{{- if .Values.residentialService.enabled }}
Woojoong Kima053c4a2019-08-09 16:19:14 -0700419 service_dependency#rcord_volt:
420 type: tosca.nodes.ServiceDependency
421 properties:
422 connect_method: none
423 requirements:
424 - subscriber_service:
425 node: service#rcord
426 relationship: tosca.relationships.BelongsToOne
427 - provider_service:
428 node: service#volt
429 relationship: tosca.relationships.BelongsToOne
430
431 service_dependency#onos_volt:
432 type: tosca.nodes.ServiceDependency
433 properties:
434 connect_method: none
435 requirements:
436 - subscriber_service:
437 node: service#volt
438 relationship: tosca.relationships.BelongsToOne
439 - provider_service:
440 node: service#onos
441 relationship: tosca.relationships.BelongsToOne
442
443 service_dependency#volt_fabric-crossconnect:
444 type: tosca.nodes.ServiceDependency
445 properties:
446 connect_method: none
447 requirements:
448 - subscriber_service:
449 node: service#volt
450 relationship: tosca.relationships.BelongsToOne
451 - provider_service:
452 node: service#fabric-crossconnect
453 relationship: tosca.relationships.BelongsToOne
454
455 service_dependency#onos_fabric-crossconnect:
456 type: tosca.nodes.ServiceDependency
457 properties:
458 connect_method: none
459 requirements:
460 - subscriber_service:
461 node: service#fabric-crossconnect
462 relationship: tosca.relationships.BelongsToOne
463 - provider_service:
464 node: service#onos
465 relationship: tosca.relationships.BelongsToOne
Woojoong Kimfdb269e2019-10-02 10:51:33 -0700466
467 # FOR ATT-Workflow --
468 service_dependency#workflow_volt:
469 type: tosca.nodes.ServiceDependency
470 properties:
471 connect_method: none
472 requirements:
473 - subscriber_service:
474 node: service#att-workflow-driver
475 relationship: tosca.relationships.BelongsToOne
476 - provider_service:
477 node: service#volt
478 relationship: tosca.relationships.BelongsToOne
479 # --
Woojoong Kima053c4a2019-08-09 16:19:14 -0700480{{- end }}
481
482 service_dependency#mcord_epc_cp:
483 type: tosca.nodes.ServiceDependency
484 properties:
485 connect_method: none
486 requirements:
487 - subscriber_service:
488 node: service#omec-cp
489 relationship: tosca.relationships.BelongsToOne
490 - provider_service:
491 node: service#mcord
492 relationship: tosca.relationships.BelongsToOne
493
494 service_dependency#mcord_epc_up:
495 type: tosca.nodes.ServiceDependency
496 properties:
497 connect_method: none
498 requirements:
499 - subscriber_service:
500 node: service#omec-up
501 relationship: tosca.relationships.BelongsToOne
502 - provider_service:
503 node: service#mcord
504 relationship: tosca.relationships.BelongsToOne
505
506 service_dependency#epc_cp_epc_up:
507 type: tosca.nodes.ServiceDependency
508 properties:
509 connect_method: none
510 requirements:
511 - subscriber_service:
512 node: service#omec-up
513 relationship: tosca.relationships.BelongsToOne
514 - provider_service:
515 node: service#omec-cp
516 relationship: tosca.relationships.BelongsToOne
517
518 service_dependency#epc_up_cdn_local:
519 type: tosca.nodes.ServiceDependency
520 properties:
521 connect_method: none
522 requirements:
523 - subscriber_service:
524 node: service#cdn-local
525 relationship: tosca.relationships.BelongsToOne
526 - provider_service:
527 node: service#omec-up
528 relationship: tosca.relationships.BelongsToOne
529
530 service_dependency#cdn_local_cdn_remote:
531 type: tosca.nodes.ServiceDependency
532 properties:
533 connect_method: none
534 requirements:
535 - subscriber_service:
536 node: service#cdn-remote
537 relationship: tosca.relationships.BelongsToOne
538 - provider_service:
539 node: service#cdn-local
540 relationship: tosca.relationships.BelongsToOne
Woojoong Kimfdb269e2019-10-02 10:51:33 -0700541
542 constraints:
543 type: tosca.nodes.ServiceGraphConstraint
544 properties:
545 constraints: '[["mcord", null, null, "rcord"], [null, null, "att-workflow-driver", "volt"], ["omec-cp", "omec-up", "onos", "fabric-crossconnect"], [null, "cdn-local", "fabric", null], [null, "cdn-remote", "vrouter", null]]'
546{{- end -}}