blob: 0bc8be4c451373c044133b7500a353ecbac970a3 [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*/}}
Hyunsun Moon35abc2e2019-10-19 15:05:03 -060017{{- define "mcord-services.onosFabricTosca" -}}
Andy Baviera40e82b2018-05-07 17:00:36 -070018tosca_definitions_version: tosca_simple_yaml_1_0
Hyunsun Moon35abc2e2019-10-19 15:05:03 -060019description: Configures ONOS services
Matteo Scandolo3f2426b2019-01-18 13:46:26 -080020
21imports:
22 - custom_types/onosapp.yaml
23 - custom_types/onosservice.yaml
24 - custom_types/serviceinstanceattribute.yaml
25
Matteo Scandolo3f2426b2019-01-18 13:46:26 -080026topology_template:
27 node_templates:
28
29 service#onos:
30 type: tosca.nodes.ONOSService
31 properties:
32 name: onos
33 kind: data
Hyunsun Moonb3915512019-12-01 00:41:28 -080034 rest_hostname: {{ .onosFabricRestHost | quote }}
35 rest_port: {{ .onosFabricRestPort }}
Matteo Scandolo3f2426b2019-01-18 13:46:26 -080036
37 onos_app#segmentrouting:
38 type: tosca.nodes.ONOSApp
39 properties:
40 name: org.onosproject.segmentrouting
41 app_id: org.onosproject.segmentrouting
42 requirements:
43 - owner:
44 node: service#onos
45 relationship: tosca.relationships.BelongsToOne
46
47 onos_app#netcfghostprovider:
48 type: tosca.nodes.ONOSApp
49 properties:
50 name: org.onosproject.netcfghostprovider
51 app_id: org.onosproject.netcfghostprovider
52 requirements:
53 - owner:
54 node: service#onos
55 relationship: tosca.relationships.BelongsToOne
56
57 onos_app#openflow:
58 type: tosca.nodes.ONOSApp
59 properties:
60 name: org.onosproject.openflow
61 app_id: org.onosproject.openflow
62 requirements:
63 - owner:
64 node: service#onos
65 relationship: tosca.relationships.BelongsToOne
66{{- end -}}
67
Hyunsun Moon35abc2e2019-10-19 15:05:03 -060068{{- define "mcord-services.onosProgranTosca" -}}
69tosca_definitions_version: tosca_simple_yaml_1_0
70description: Configures ONOS services
71
72imports:
73 - custom_types/onosapp.yaml
74 - custom_types/onosservice.yaml
75 - custom_types/serviceinstanceattribute.yaml
76
77topology_template:
78 node_templates:
79
80 service#onos-progran:
81 type: tosca.nodes.ONOSService
82 properties:
83 name: onos-progran
84 kind: data
Hyunsun Moonb3915512019-12-01 00:41:28 -080085 rest_hostname: {{ .onosProgranRestHost | quote }}
86 rest_port: {{ .onosProgranRestPort }}
Hyunsun Moon35abc2e2019-10-19 15:05:03 -060087
88 onos_app#progran:
89 type: tosca.nodes.ONOSApp
90 properties:
91 name: org.onosproject.progran
92 app_id: org.onosproject.progran
93 requirements:
94 - owner:
95 node: service#onos-progran
96 relationship: tosca.relationships.BelongsToOne
97{{- end -}}
98
99{{- define "mcord-services.serviceGraphTosca" -}}
Andy Baviera40e82b2018-05-07 17:00:36 -0700100tosca_definitions_version: tosca_simple_yaml_1_0
101
102imports:
Andy Baviera40e82b2018-05-07 17:00:36 -0700103 - custom_types/mcordsubscriberservice.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -0700104 - custom_types/servicegraphconstraint.yaml
105 - custom_types/servicedependency.yaml
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800106 - custom_types/service.yaml
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600107{{- if or .Values.fabric.enabled .Values.progran.enabled }}
108 - custom_types/onosservice.yaml
109{{- end }}
110{{- if .Values.fabric.enabled }}
111 - custom_types/fabricservice.yaml
112 - custom_types/vrouterservice.yaml
113{{- end }}
114{{- if .Values.progran.enabled }}
115 - custom_types/progranservice.yaml
116{{- end }}
Andy Baviera40e82b2018-05-07 17:00:36 -0700117
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800118description: Configures the M-CORD service graph
Andy Baviera40e82b2018-05-07 17:00:36 -0700119
120topology_template:
121 node_templates:
Andy Baviera40e82b2018-05-07 17:00:36 -0700122 service#mcord:
123 type: tosca.nodes.MCordSubscriberService
124 properties:
125 name: mcord
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800126 must-exist: true
Andy Baviera40e82b2018-05-07 17:00:36 -0700127
Woojoong Kim79360c32019-07-08 15:56:50 -0700128 service#omec-cp:
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800129 type: tosca.nodes.Service
130 properties:
Woojoong Kim79360c32019-07-08 15:56:50 -0700131 name: omec-cp
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800132
Woojoong Kim79360c32019-07-08 15:56:50 -0700133 service#omec-up:
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800134 type: tosca.nodes.Service
135 properties:
Woojoong Kim79360c32019-07-08 15:56:50 -0700136 name: omec-up
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800137
Matteo Scandoloc889afb2019-02-15 10:42:00 -0800138 service#cdn-local:
139 type: tosca.nodes.Service
140 properties:
141 name: cdn-local
142
143 service#cdn-remote:
144 type: tosca.nodes.Service
145 properties:
146 name: cdn-remote
147
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600148{{- if .Values.fabric.enabled }}
149 service#onos:
150 type: tosca.nodes.ONOSService
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800151 properties:
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600152 name: onos
153 must-exist: true
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800154
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600155 service#fabric:
156 type: tosca.nodes.FabricService
Matteo Scandoloa9ac2b82019-01-29 16:55:35 -0800157 properties:
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600158 name: fabric
159 must-exist: true
Matteo Scandoloa9ac2b82019-01-29 16:55:35 -0800160
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600161 service#vrouter:
162 type: tosca.nodes.VRouterService
Woojoong Kimee78bac2019-06-21 14:31:42 -0700163 properties:
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600164 name: vrouter
165 must-exist: true
166{{- end }}
Woojoong Kimee78bac2019-06-21 14:31:42 -0700167
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600168{{- if .Values.progran.enabled }}
169 service#onos-progran:
170 type: tosca.nodes.ONOSService
Woojoong Kimee78bac2019-06-21 14:31:42 -0700171 properties:
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600172 name: onos-progran
173 must-exist: true
Woojoong Kimee78bac2019-06-21 14:31:42 -0700174
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600175 service#progran:
176 type: tosca.nodes.ProgranService
Woojoong Kimee78bac2019-06-21 14:31:42 -0700177 properties:
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600178 name: progran
179 must-exist: true
180{{- end }}
Woojoong Kimee78bac2019-06-21 14:31:42 -0700181
Woojoong Kim5fa7e482019-07-30 00:12:12 -0700182 service_dependency#mcord_epc_cp:
183 type: tosca.nodes.ServiceDependency
184 properties:
185 connect_method: none
186 requirements:
187 - subscriber_service:
188 node: service#omec-cp
189 relationship: tosca.relationships.BelongsToOne
190 - provider_service:
191 node: service#mcord
192 relationship: tosca.relationships.BelongsToOne
193
194 service_dependency#mcord_epc_up:
195 type: tosca.nodes.ServiceDependency
196 properties:
197 connect_method: none
198 requirements:
199 - subscriber_service:
200 node: service#omec-up
201 relationship: tosca.relationships.BelongsToOne
202 - provider_service:
203 node: service#mcord
204 relationship: tosca.relationships.BelongsToOne
Woojoong Kim5fa7e482019-07-30 00:12:12 -0700205
206 service_dependency#epc_cp_epc_up:
207 type: tosca.nodes.ServiceDependency
208 properties:
209 connect_method: none
210 requirements:
211 - subscriber_service:
212 node: service#omec-up
213 relationship: tosca.relationships.BelongsToOne
214 - provider_service:
215 node: service#omec-cp
216 relationship: tosca.relationships.BelongsToOne
217
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600218 service_dependency#cdn_remote_cdn_local:
Woojoong Kimee78bac2019-06-21 14:31:42 -0700219 type: tosca.nodes.ServiceDependency
220 properties:
221 connect_method: none
222 requirements:
223 - subscriber_service:
224 node: service#cdn-local
225 relationship: tosca.relationships.BelongsToOne
226 - provider_service:
Woojoong Kimee78bac2019-06-21 14:31:42 -0700227 node: service#cdn-remote
228 relationship: tosca.relationships.BelongsToOne
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600229
230{{- if .Values.fabric.enabled }}
231 service_dependency#fabric_vrouter:
232 type: tosca.nodes.ServiceDependency
233 properties:
234 connect_method: none
235 requirements:
236 - subscriber_service:
237 node: service#fabric
Woojoong Kimee78bac2019-06-21 14:31:42 -0700238 relationship: tosca.relationships.BelongsToOne
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600239 - provider_service:
240 node: service#onos
241 relationship: tosca.relationships.BelongsToOne
242
243 service_dependency#onos_fabric:
244 type: tosca.nodes.ServiceDependency
245 properties:
246 connect_method: none
247 requirements:
248 - subscriber_service:
249 node: service#vrouter
250 relationship: tosca.relationships.BelongsToOne
251 - provider_service:
252 node: service#fabric
253 relationship: tosca.relationships.BelongsToOne
254{{- end }}
255
256{{- if .Values.progran.enabled }}
257 service_dependency#mcord_progran:
258 type: tosca.nodes.ServiceDependency
259 properties:
260 connect_method: none
261 requirements:
262 - subscriber_service:
263 node: service#progran
264 relationship: tosca.relationships.BelongsToOne
265 - provider_service:
266 node: service#mcord
267 relationship: tosca.relationships.BelongsToOne
268
269 service_dependency#onos_progran:
270 type: tosca.nodes.ServiceDependency
271 properties:
272 connect_method: none
273 requirements:
274 - subscriber_service:
275 node: service#progran
276 relationship: tosca.relationships.BelongsToOne
277 - provider_service:
278 node: service#onos-progran
279 relationship: tosca.relationships.BelongsToOne
280{{- end }}
Woojoong Kimee78bac2019-06-21 14:31:42 -0700281
Andy Baviera40e82b2018-05-07 17:00:36 -0700282 constraints:
283 type: tosca.nodes.ServiceGraphConstraint
284 properties:
Hyunsun Moon35abc2e2019-10-19 15:05:03 -0600285{{- if and .Values.fabric.enabled .Values.progran.enabled }}
286 constraints: '[ [null, "mcord", null, "fabric"], ["cdn-remote", "omec-cp", "progran", "vrouter"], ["cdn-local", "omec-up", "onos-progran", "onos"] ]'
287{{- else if and (not .Values.fabric.enabled) .Values.progran.enabled }}
288 constraints: '[ [null, null, "mcord", null], ["cdn-remote", "omec-cp", null, "progran"], ["cdn-local", "omec-up", null, "onos-progran"] ]'
289{{- else if and .Values.fabric.enabled (not .Values.progran.enabled) }}
290 constraints: '[ [null, "mcord", "fabric"], ["cdn-remote", "omec-cp", "vrouter"], ["cdn-local", "omec-up", "onos"] ]'
291{{- else }}
292 constraints: '[ [null, "mcord"], ["cdn-remote", "omec-cp"], ["cdn-local", "omec-up"] ]'
293{{- end }}
294{{- end -}}