blob: 51b5f287f8420d7dc3a23fef76b7ff92abec9b5f [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:
Andy Baviera40e82b2018-05-07 17:00:36 -070021 - custom_types/site.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -070022
23description: set up site and deployment and link them
24
25topology_template:
26 node_templates:
27
28 {{ .Values.cordSiteName }}:
29 type: tosca.nodes.Site
30 properties:
31 name: {{ .Values.cordSiteName }}
32 site_url: http://mysite.opencord.us/
33 hosts_nodes: true
34
Andy Baviera40e82b2018-05-07 17:00:36 -070035{{- end -}}
36
Matteo Scandolo3f2426b2019-01-18 13:46:26 -080037{{- define "mcord.onosTosca" -}}
38tosca_definitions_version: tosca_simple_yaml_1_0
39
40imports:
41 - custom_types/onosapp.yaml
42 - custom_types/onosservice.yaml
43 - custom_types/serviceinstanceattribute.yaml
44
45description: Configures the VOLTHA ONOS service
46
47topology_template:
48 node_templates:
49
50 service#onos:
51 type: tosca.nodes.ONOSService
52 properties:
53 name: onos
54 kind: data
55 rest_hostname: {{ .onosRestService | quote }}
56 rest_port: 8181
57
58 onos_app#segmentrouting:
59 type: tosca.nodes.ONOSApp
60 properties:
61 name: org.onosproject.segmentrouting
62 app_id: org.onosproject.segmentrouting
63 requirements:
64 - owner:
65 node: service#onos
66 relationship: tosca.relationships.BelongsToOne
67
68 onos_app#netcfghostprovider:
69 type: tosca.nodes.ONOSApp
70 properties:
71 name: org.onosproject.netcfghostprovider
72 app_id: org.onosproject.netcfghostprovider
73 requirements:
74 - owner:
75 node: service#onos
76 relationship: tosca.relationships.BelongsToOne
77
78 onos_app#openflow:
79 type: tosca.nodes.ONOSApp
80 properties:
81 name: org.onosproject.openflow
82 app_id: org.onosproject.openflow
83 requirements:
84 - owner:
85 node: service#onos
86 relationship: tosca.relationships.BelongsToOne
87{{- end -}}
88
Andy Baviera40e82b2018-05-07 17:00:36 -070089{{- define "mcord.serviceGraphTosca" -}}
90tosca_definitions_version: tosca_simple_yaml_1_0
91
92imports:
Matteo Scandolo3f2426b2019-01-18 13:46:26 -080093 - custom_types/fabricservice.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -070094 - custom_types/mcordsubscriberservice.yaml
Matteo Scandolo3f2426b2019-01-18 13:46:26 -080095 - custom_types/onosservice.yaml
Woojoong Kim5fa7e482019-07-30 00:12:12 -070096{{- if .Values.progran.enabled }}
Andy Baviera40e82b2018-05-07 17:00:36 -070097 - custom_types/progranservice.yaml
Woojoong Kim5fa7e482019-07-30 00:12:12 -070098{{- end }}
Matteo Scandoloa9ac2b82019-01-29 16:55:35 -080099 - custom_types/vrouterservice.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -0700100 - custom_types/servicegraphconstraint.yaml
101 - custom_types/servicedependency.yaml
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800102 - custom_types/service.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -0700103
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800104description: Configures the M-CORD service graph
Andy Baviera40e82b2018-05-07 17:00:36 -0700105
106topology_template:
107 node_templates:
Woojoong Kim5fa7e482019-07-30 00:12:12 -0700108{{ if .Values.progran.enabled }}
Andy Baviera40e82b2018-05-07 17:00:36 -0700109 service#progran:
110 type: tosca.nodes.ProgranService
111 properties:
112 name: progran
113 must-exist: true
Woojoong Kim5fa7e482019-07-30 00:12:12 -0700114{{ end }}
Matteo Scandoloa9ac2b82019-01-29 16:55:35 -0800115 service#vrouter:
116 type: tosca.nodes.VRouterService
117 properties:
118 name: vrouter
119 must-exist: true
120
Andy Baviera40e82b2018-05-07 17:00:36 -0700121 service#mcord:
122 type: tosca.nodes.MCordSubscriberService
123 properties:
124 name: mcord
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800125 must-exist: true
Andy Baviera40e82b2018-05-07 17:00:36 -0700126
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800127 service#onos:
128 type: tosca.nodes.ONOSService
129 properties:
130 name: onos
131 must-exist: true
132
133 service#fabric:
134 type: tosca.nodes.FabricService
135 properties:
136 name: fabric
137 must-exist: true
138
Woojoong Kim79360c32019-07-08 15:56:50 -0700139 service#omec-cp:
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800140 type: tosca.nodes.Service
141 properties:
Woojoong Kim79360c32019-07-08 15:56:50 -0700142 name: omec-cp
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800143
Woojoong Kim79360c32019-07-08 15:56:50 -0700144 service#omec-up:
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800145 type: tosca.nodes.Service
146 properties:
Woojoong Kim79360c32019-07-08 15:56:50 -0700147 name: omec-up
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800148
Matteo Scandoloc889afb2019-02-15 10:42:00 -0800149 service#cdn-local:
150 type: tosca.nodes.Service
151 properties:
152 name: cdn-local
153
154 service#cdn-remote:
155 type: tosca.nodes.Service
156 properties:
157 name: cdn-remote
158
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800159 service_dependency#onos-fabric_fabric:
160 type: tosca.nodes.ServiceDependency
161 properties:
162 connect_method: none
163 requirements:
164 - subscriber_service:
165 node: service#fabric
166 relationship: tosca.relationships.BelongsToOne
167 - provider_service:
168 node: service#onos
169 relationship: tosca.relationships.BelongsToOne
170
Matteo Scandoloa9ac2b82019-01-29 16:55:35 -0800171 service_dependency#vrouter_fabric:
172 type: tosca.nodes.ServiceDependency
173 properties:
174 connect_method: none
175 requirements:
176 - subscriber_service:
177 node: service#vrouter
178 relationship: tosca.relationships.BelongsToOne
179 - provider_service:
180 node: service#fabric
181 relationship: tosca.relationships.BelongsToOne
182
Woojoong Kim5fa7e482019-07-30 00:12:12 -0700183{{ if .Values.progran.enabled }}
Woojoong Kimee78bac2019-06-21 14:31:42 -0700184 service_dependency#mcord_progran:
185 type: tosca.nodes.ServiceDependency
186 properties:
187 connect_method: none
188 requirements:
189 - subscriber_service:
190 node: service#progran
191 relationship: tosca.relationships.BelongsToOne
192 - provider_service:
193 node: service#mcord
194 relationship: tosca.relationships.BelongsToOne
195
196 service_dependency#progran_epc_cp:
197 type: tosca.nodes.ServiceDependency
198 properties:
199 connect_method: none
200 requirements:
201 - subscriber_service:
Woojoong Kim79360c32019-07-08 15:56:50 -0700202 node: service#omec-cp
Woojoong Kimee78bac2019-06-21 14:31:42 -0700203 relationship: tosca.relationships.BelongsToOne
204 - provider_service:
205 node: service#progran
206 relationship: tosca.relationships.BelongsToOne
207
Woojoong Kimee78bac2019-06-21 14:31:42 -0700208 service_dependency#progran_epc_up:
209 type: tosca.nodes.ServiceDependency
210 properties:
211 connect_method: none
212 requirements:
213 - subscriber_service:
Woojoong Kim79360c32019-07-08 15:56:50 -0700214 node: service#omec-up
Woojoong Kimee78bac2019-06-21 14:31:42 -0700215 relationship: tosca.relationships.BelongsToOne
216 - provider_service:
217 node: service#progran
218 relationship: tosca.relationships.BelongsToOne
219
Woojoong Kim5fa7e482019-07-30 00:12:12 -0700220{{ else }}
221 service_dependency#mcord_epc_cp:
222 type: tosca.nodes.ServiceDependency
223 properties:
224 connect_method: none
225 requirements:
226 - subscriber_service:
227 node: service#omec-cp
228 relationship: tosca.relationships.BelongsToOne
229 - provider_service:
230 node: service#mcord
231 relationship: tosca.relationships.BelongsToOne
232
233 service_dependency#mcord_epc_up:
234 type: tosca.nodes.ServiceDependency
235 properties:
236 connect_method: none
237 requirements:
238 - subscriber_service:
239 node: service#omec-up
240 relationship: tosca.relationships.BelongsToOne
241 - provider_service:
242 node: service#mcord
243 relationship: tosca.relationships.BelongsToOne
244{{ end }}
245
246 service_dependency#epc_cp_epc_up:
247 type: tosca.nodes.ServiceDependency
248 properties:
249 connect_method: none
250 requirements:
251 - subscriber_service:
252 node: service#omec-up
253 relationship: tosca.relationships.BelongsToOne
254 - provider_service:
255 node: service#omec-cp
256 relationship: tosca.relationships.BelongsToOne
257
Woojoong Kimee78bac2019-06-21 14:31:42 -0700258 service_dependency#epc_up_cdn_local:
259 type: tosca.nodes.ServiceDependency
260 properties:
261 connect_method: none
262 requirements:
263 - subscriber_service:
264 node: service#cdn-local
265 relationship: tosca.relationships.BelongsToOne
266 - provider_service:
Woojoong Kim79360c32019-07-08 15:56:50 -0700267 node: service#omec-up
Woojoong Kimee78bac2019-06-21 14:31:42 -0700268 relationship: tosca.relationships.BelongsToOne
269
270 service_dependency#cdn_local_cdn_remote:
271 type: tosca.nodes.ServiceDependency
272 properties:
273 connect_method: none
274 requirements:
275 - subscriber_service:
276 node: service#cdn-remote
277 relationship: tosca.relationships.BelongsToOne
278 - provider_service:
279 node: service#cdn-local
280 relationship: tosca.relationships.BelongsToOne
281
Andy Baviera40e82b2018-05-07 17:00:36 -0700282 constraints:
283 type: tosca.nodes.ServiceGraphConstraint
284 properties:
Woojoong Kim5fa7e482019-07-30 00:12:12 -0700285{{ if (.Values.seba.enabled) and (.Values.progran.enabled) }}
Woojoong Kim79360c32019-07-08 15:56:50 -0700286 constraints: '[ ["mcord", null, "onos"], ["progran", null, "fabric"], ["omec-cp", null, null] ["omec-up", null, null] ]'
Woojoong Kim5fa7e482019-07-30 00:12:12 -0700287{{ else if (not .Values.seba.enabled) and (.Values.progran.enabled) }}
Woojoong Kim79360c32019-07-08 15:56:50 -0700288 constraints: '[ ["mcord", "progran", null], ["omec-cp", "omec-up", "onos"], [null, "cdn-local", "fabric"], [null, "cdn-remote", "vrouter"] ]'
Woojoong Kim5fa7e482019-07-30 00:12:12 -0700289{{ else if (not .Values.seba.enabled) and (not .Values.progran.enabled) }}
290 constraints: '[ [null, "mcord", null], ["omec-cp", "omec-up", "onos"], [null, "cdn-local", "fabric"], [null, "cdn-remote", "vrouter"] ]'
291{{ end }}
Woojoong Kimee78bac2019-06-21 14:31:42 -0700292{{- end -}}