blob: 924d84614127d30599ff460ffc91a152c7470e20 [file] [log] [blame]
Andy Baviera40e82b2018-05-07 17:00:36 -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*/}}
17{{- define "mcord.fixtureTosca" -}}
18tosca_definitions_version: tosca_simple_yaml_1_0
19
20imports:
21 - custom_types/deployment.yaml
22 - custom_types/site.yaml
23 - custom_types/networktemplate.yaml
24 - custom_types/network.yaml
25 - custom_types/networkslice.yaml
26 - custom_types/sitedeployment.yaml
27
28description: set up site and deployment and link them
29
30topology_template:
31 node_templates:
32
33 {{ .Values.cordSiteName }}:
34 type: tosca.nodes.Site
35 properties:
36 name: {{ .Values.cordSiteName }}
37 site_url: http://mysite.opencord.us/
38 hosts_nodes: true
39
40 {{ .Values.cordDeploymentName }}:
41 type: tosca.nodes.Deployment
42 properties:
43 name: {{ .Values.cordDeploymentName }}
44{{- end -}}
45
46{{- define "mcord.serviceGraphTosca" -}}
47tosca_definitions_version: tosca_simple_yaml_1_0
48
49imports:
50 - custom_types/internetemulatorservice.yaml
51 - custom_types/hssdbservice.yaml
52 - custom_types/mcordsubscriberservice.yaml
53 - custom_types/progranservice.yaml
54 - custom_types/sdncontrollerservice.yaml
55 - custom_types/vepcservice.yaml
56 - custom_types/vhssservice.yaml
57 - custom_types/vmmeservice.yaml
58 - custom_types/vspgwcservice.yaml
59 - custom_types/vspgwuservice.yaml
60 - custom_types/servicegraphconstraint.yaml
61 - custom_types/servicedependency.yaml
62 - custom_types/serviceinstancelink.yaml
63
64description: Configures the base-openstack service graph
65
66topology_template:
67 node_templates:
68
69 service#vmme:
70 type: tosca.nodes.VMMEService
71 properties:
72 name: vmme
73 must-exist: true
74
75 service#vspgwc:
76 type: tosca.nodes.VSPGWCService
77 properties:
78 name: vspgwc
79 must-exist: true
80
81 service#vspgwu:
82 type: tosca.nodes.VSPGWUService
83 properties:
84 name: vspgwu
85 must-exist: true
86
87 service#vhss:
88 type: tosca.nodes.VHSSService
89 properties:
90 name: vhss
91 must-exist: true
92
93 service#hssdb:
94 type: tosca.nodes.HSSDBService
95 properties:
96 name: hssdb
97 must-exist: true
98
99 service#internetemulator:
100 type: tosca.nodes.InternetEmulatorService
101 properties:
102 name: internetemulator
103 must-exist: true
104
105 service#sdncontroller:
106 type: tosca.nodes.SDNControllerService
107 properties:
108 name: sdncontroller
109 must-exist: true
110
111 service#vepc:
112 type: tosca.nodes.VEPCService
113 properties:
114 name: vepc
115 must-exist: true
116
117 service#progran:
118 type: tosca.nodes.ProgranService
119 properties:
120 name: progran
121 must-exist: true
122
123 service#mcord:
124 type: tosca.nodes.MCordSubscriberService
125 properties:
126 name: mcord
127
128 vmme_vspgwc:
129 type: tosca.nodes.ServiceDependency
130 properties:
131 connect_method: None
132 requirements:
133 - subscriber_service:
134 node: service#vmme
135 relationship: tosca.relationships.BelongsToOne
136 - provider_service:
137 node: service#vspgwc
138 relationship: tosca.relationships.BelongsToOne
139
140 vmme_vspgwu:
141 type: tosca.nodes.ServiceDependency
142 properties:
143 connect_method: None
144 requirements:
145 - subscriber_service:
146 node: service#vmme
147 relationship: tosca.relationships.BelongsToOne
148 - provider_service:
149 node: service#vspgwu
150 relationship: tosca.relationships.BelongsToOne
151
152 vspgwc_vspgwu:
153 type: tosca.nodes.ServiceDependency
154 properties:
155 connect_method: None
156 requirements:
157 - subscriber_service:
158 node: service#vspgwc
159 relationship: tosca.relationships.BelongsToOne
160 - provider_service:
161 node: service#vspgwu
162 relationship: tosca.relationships.BelongsToOne
163
164 vmme_vhss:
165 type: tosca.nodes.ServiceDependency
166 properties:
167 connect_method: None
168 requirements:
169 - subscriber_service:
170 node: service#vmme
171 relationship: tosca.relationships.BelongsToOne
172 - provider_service:
173 node: service#vhss
174 relationship: tosca.relationships.BelongsToOne
175
176 vhss_hssdb:
177 type: tosca.nodes.ServiceDependency
178 properties:
179 connect_method: None
180 requirements:
181 - subscriber_service:
182 node: service#vhss
183 relationship: tosca.relationships.BelongsToOne
184 - provider_service:
185 node: service#hssdb
186 relationship: tosca.relationships.BelongsToOne
187
188 mcord_vmme:
189 type: tosca.nodes.ServiceDependency
190 properties:
191 connect_method: None
192 requirements:
193 - subscriber_service:
194 node: service#vmme
195 relationship: tosca.relationships.BelongsToOne
196 - provider_service:
197 node: service#mcord
198 relationship: tosca.relationships.BelongsToOne
199
200 constraints:
201 type: tosca.nodes.ServiceGraphConstraint
202 properties:
203 constraints: '[ ["vepc", null, "mcord", null, null], [null, null, "progran", null, null], ["hssdb", "vhss", "vmme", null, null], [null, "vspgwc", "sdncontroller","vspgwu", null], [null, null, null, "internetemulator", null] ]'
204{{- end -}}
205
206{{- define "mcord.sliceTosca" -}}
207tosca_definitions_version: tosca_simple_yaml_1_0
208
209imports:
210 - custom_types/internetemulatorservice.yaml
211 - custom_types/hssdbservice.yaml
212 - custom_types/mcordsubscriberservice.yaml
213 - custom_types/progranservice.yaml
214 - custom_types/sdncontrollerservice.yaml
215 - custom_types/vepcservice.yaml
216 - custom_types/vhssservice.yaml
217 - custom_types/vmmeservice.yaml
218 - custom_types/vspgwcservice.yaml
219 - custom_types/vspgwuservice.yaml
220 - custom_types/servicegraphconstraint.yaml
221 - custom_types/servicedependency.yaml
222 - custom_types/serviceinstancelink.yaml
223 - custom_types/site.yaml
224 - custom_types/slice.yaml
225 - custom_types/flavor.yaml
226 - custom_types/image.yaml
227
228description: Configures the M-CORD slices
229
230topology_template:
231 node_templates:
232
233 {{ .Values.cordSiteName }}:
234 type: tosca.nodes.Site
235 properties:
236 name: {{ .Values.cordSiteName }}
237 must-exist: true
238
239 service#vmme:
240 type: tosca.nodes.VMMEService
241 properties:
242 name: vmme
243 must-exist: true
244
245 service#vspgwc:
246 type: tosca.nodes.VSPGWCService
247 properties:
248 name: vspgwc
249 must-exist: true
250
251 service#vspgwu:
252 type: tosca.nodes.VSPGWUService
253 properties:
254 name: vspgwu
255 must-exist: true
256
257 service#vhss:
258 type: tosca.nodes.VHSSService
259 properties:
260 name: vhss
261 must-exist: true
262
263 service#hssdb:
264 type: tosca.nodes.HSSDBService
265 properties:
266 name: hssdb
267 must-exist: true
268
269 service#internetemulator:
270 type: tosca.nodes.InternetEmulatorService
271 properties:
272 name: internetemulator
273 must-exist: true
274
275 service#sdncontroller:
276 type: tosca.nodes.SDNControllerService
277 properties:
278 name: sdncontroller
279 must-exist: true
280
281 m1.small:
282 type: tosca.nodes.Flavor
283 properties:
284 name: m1.small
285 must-exist: true
286
287 m1.large:
288 type: tosca.nodes.Flavor
289 properties:
290 name: m1.large
291 must-exist: true
292
293 m1.xlarge:
294 type: tosca.nodes.Flavor
295 properties:
296 name: m1.xlarge
297 must-exist: true
298
299 image_mme:
300 type: tosca.nodes.Image
301 properties:
302 name: image_mme_{{ .Values.vmme.vnfImageVersion }}
303 must-exist: true
304
305 image_spgwc:
306 type: tosca.nodes.Image
307 properties:
308 name: image_spgwc_{{ .Values.vspgwc.vnfImageVersion }}
309 must-exist: true
310
311 image_spgwu:
312 type: tosca.nodes.Image
313 properties:
314 name: image_spgwu_{{ .Values.vspgwu.vnfImageVersion }}
315 must-exist: true
316
317 image_hss:
318 type: tosca.nodes.Image
319 properties:
320 name: image_hss_{{ .Values.vhss.vnfImageVersion }}
321 must-exist: true
322
323 image_hssdb:
324 type: tosca.nodes.Image
325 properties:
326 name: image_hssdb_{{ .Values.hssdb.vnfImageVersion }}
327 must-exist: true
328
329 image_internetemulator:
330 type: tosca.nodes.Image
331 properties:
332 name: image_internetemulator_{{ .Values.internetemulator.vnfImageVersion }}
333 must-exist: true
334
335 image_sdncontroller:
336 type: tosca.nodes.Image
337 properties:
338 name: image_sdncontroller_{{ .Values.sdncontroller.vnfImageVersion }}
339 must-exist: true
340
341 {{ .Values.cordSiteName }}_vmme:
342 description: vMME Service Slice
343 type: tosca.nodes.Slice
344 properties:
345 name: {{ .Values.cordSiteName }}_vmme
346 default_isolation: vm
347 network: noauto
348 requirements:
349 - site:
350 node: {{ .Values.cordSiteName }}
351 relationship: tosca.relationships.BelongsToOne
352 - service:
353 node: service#vmme
354 relationship: tosca.relationships.BelongsToOne
355 - default_image:
356 node: image_mme
357 relationship: tosca.relationships.BelongsToOne
358 - default_flavor:
359 node: m1.large
360 relationship: tosca.relationships.BelongsToOne
361
362 {{ .Values.cordSiteName }}_vspgwc:
363 description: vSPGW-C slice
364 type: tosca.nodes.Slice
365 properties:
366 name: {{ .Values.cordSiteName }}_vspgwc
367 default_isolation: vm
368 network: noauto
369 requirements:
370 - site:
371 node: {{ .Values.cordSiteName }}
372 relationship: tosca.relationships.BelongsToOne
373 - service:
374 node: service#vspgwc
375 relationship: tosca.relationships.BelongsToOne
376 - default_image:
377 node: image_spgwc
378 relationship: tosca.relationships.BelongsToOne
379 - default_flavor:
380 node: m1.large
381 relationship: tosca.relationships.BelongsToOne
382
383 {{ .Values.cordSiteName }}_vspgwu:
384 description: vSPGW-U slice
385 type: tosca.nodes.Slice
386 properties:
387 name: {{ .Values.cordSiteName }}_vspgwu
388 default_isolation: vm
389 network: noauto
390 requirements:
391 - site:
392 node: {{ .Values.cordSiteName }}
393 relationship: tosca.relationships.BelongsToOne
394 - service:
395 node: service#vspgwu
396 relationship: tosca.relationships.BelongsToOne
397 - default_image:
398 node: image_spgwu
399 relationship: tosca.relationships.BelongsToOne
400 - default_flavor:
401 node: m1.xlarge
402 relationship: tosca.relationships.BelongsToOne
403
404 {{ .Values.cordSiteName }}_vhss:
405 description: vHSS Service Slice
406 type: tosca.nodes.Slice
407 properties:
408 name: {{ .Values.cordSiteName }}_vhss
409 default_isolation: vm
410 network: noauto
411 requirements:
412 - site:
413 node: {{ .Values.cordSiteName }}
414 relationship: tosca.relationships.BelongsToOne
415 - service:
416 node: service#vhss
417 relationship: tosca.relationships.BelongsToOne
418 - default_image:
419 node: image_hss
420 relationship: tosca.relationships.BelongsToOne
421 - default_flavor:
422 node: m1.large
423 relationship: tosca.relationships.BelongsToOne
424
425 {{ .Values.cordSiteName }}_hssdb:
426 description: HSS-DB Service Slice
427 type: tosca.nodes.Slice
428 properties:
429 name: {{ .Values.cordSiteName }}_hssdb
430 default_isolation: vm
431 network: noauto
432 requirements:
433 - site:
434 node: {{ .Values.cordSiteName }}
435 relationship: tosca.relationships.BelongsToOne
436 - service:
437 node: service#hssdb
438 relationship: tosca.relationships.BelongsToOne
439 - default_image:
440 node: image_hssdb
441 relationship: tosca.relationships.BelongsToOne
442 - default_flavor:
443 node: m1.large
444 relationship: tosca.relationships.BelongsToOne
445
446 {{ .Values.cordSiteName }}_internetemulator:
447 description: Internetemulator Service Slice
448 type: tosca.nodes.Slice
449 properties:
450 name: {{ .Values.cordSiteName }}_internetemulator
451 default_isolation: vm
452 network: noauto
453 requirements:
454 - site:
455 node: {{ .Values.cordSiteName }}
456 relationship: tosca.relationships.BelongsToOne
457 - service:
458 node: service#internetemulator
459 relationship: tosca.relationships.BelongsToOne
460 - default_image:
461 node: image_internetemulator
462 relationship: tosca.relationships.BelongsToOne
463 - default_flavor:
464 node: m1.small
465 relationship: tosca.relationships.BelongsToOne
466
467 {{ .Values.cordSiteName }}_sdncontroller:
468 description: SDN controller slice
469 type: tosca.nodes.Slice
470 properties:
471 name: {{ .Values.cordSiteName }}_sdncontroller
472 default_isolation: vm
473 network: noauto
474 requirements:
475 - site:
476 node: {{ .Values.cordSiteName }}
477 relationship: tosca.relationships.BelongsToOne
478 - service:
479 node: service#sdncontroller
480 relationship: tosca.relationships.BelongsToOne
481 - default_image:
482 node: image_sdncontroller
483 relationship: tosca.relationships.BelongsToOne
484 - default_flavor:
485 node: m1.small
486 relationship: tosca.relationships.BelongsToOne
487{{- end -}}
488
489{{- define "mcord.networkTosca" -}}
490tosca_definitions_version: tosca_simple_yaml_1_0
491
492imports:
493 - custom_types/networktemplate.yaml
494 - custom_types/slice.yaml
495 - custom_types/networkslice.yaml
496 - custom_types/network.yaml
497
498description: Configures the M-CORD network templates, vEPC will create the networks
499
500topology_template:
501 node_templates:
502
503 private_template:
504 type: tosca.nodes.NetworkTemplate
505 properties:
506 name: private_template
507 visibility: private
508 translation: none
509 vtn_kind: PRIVATE
510
511 flat_template:
512 type: tosca.nodes.NetworkTemplate
513 properties:
514 name: flat_template
515 visibility: private
516 translation: none
517 vtn_kind: FLAT
518
519# Network Slices for InternetEmulator, not created by EPC
520
521 management:
522 type: tosca.nodes.Network
523 properties:
524 name: management
525 must-exist: true
526
527 {{ .Values.cordSiteName }}_internetemulator:
528 type: tosca.nodes.Slice
529 properties:
530 name: {{ .Values.cordSiteName }}_internetemulator
531 must-exist: true
532
533 {{ .Values.cordSiteName }}_vspgwu:
534 type: tosca.nodes.Slice
535 properties:
536 name: {{ .Values.cordSiteName }}_vspgwu
537 must-exist: true
538
539 sgi_network:
540 type: tosca.nodes.Network
541 properties:
542 name: sgi_network
543 subnet: 115.0.0.0/24
544 permit_all_slices: true
545 requirements:
546 - template:
547 node: private_template
548 relationship: tosca.relationships.BelongsToOne
549 - owner:
550 node: {{ .Values.cordSiteName }}_vspgwu
551 relationship: tosca.relationships.BelongsToOne
552
553 internetemulator_slice_management_network:
554 type: tosca.nodes.NetworkSlice
555 requirements:
556 - network:
557 node: management
558 relationship: tosca.relationships.BelongsToOne
559 - slice:
560 node: {{ .Values.cordSiteName }}_internetemulator
561 relationship: tosca.relationships.BelongsToOne
562
563 internetemulator_slice_sgi_network:
564 type: tosca.nodes.NetworkSlice
565 requirements:
566 - network:
567 node: sgi_network
568 relationship: tosca.relationships.BelongsToOne
569 - slice:
570 node: {{ .Values.cordSiteName }}_internetemulator
571 relationship: tosca.relationships.BelongsToOne
572
573{{- end -}}