blob: 45f3b1286354767df9126cc395b1d446ac8a25a4 [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
Andy Baviera40e82b2018-05-07 17:00:36 -070096 - custom_types/progranservice.yaml
Matteo Scandoloa9ac2b82019-01-29 16:55:35 -080097 - custom_types/vrouterservice.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -070098 - custom_types/servicegraphconstraint.yaml
99 - custom_types/servicedependency.yaml
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800100 - custom_types/service.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -0700101
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800102description: Configures the M-CORD service graph
Andy Baviera40e82b2018-05-07 17:00:36 -0700103
104topology_template:
105 node_templates:
106
Andy Baviera40e82b2018-05-07 17:00:36 -0700107 service#progran:
108 type: tosca.nodes.ProgranService
109 properties:
110 name: progran
111 must-exist: true
112
Matteo Scandoloa9ac2b82019-01-29 16:55:35 -0800113 service#vrouter:
114 type: tosca.nodes.VRouterService
115 properties:
116 name: vrouter
117 must-exist: true
118
Andy Baviera40e82b2018-05-07 17:00:36 -0700119 service#mcord:
120 type: tosca.nodes.MCordSubscriberService
121 properties:
122 name: mcord
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800123 must-exist: true
Andy Baviera40e82b2018-05-07 17:00:36 -0700124
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800125 service#onos:
126 type: tosca.nodes.ONOSService
127 properties:
128 name: onos
129 must-exist: true
130
131 service#fabric:
132 type: tosca.nodes.FabricService
133 properties:
134 name: fabric
135 must-exist: true
136
Woojoong Kimee78bac2019-06-21 14:31:42 -0700137 service#epc-cp:
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800138 type: tosca.nodes.Service
139 properties:
Woojoong Kimee78bac2019-06-21 14:31:42 -0700140 name: epc-cp
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800141
Woojoong Kimee78bac2019-06-21 14:31:42 -0700142 service#epc-up:
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800143 type: tosca.nodes.Service
144 properties:
Woojoong Kimee78bac2019-06-21 14:31:42 -0700145 name: epc-up
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800146
Matteo Scandoloc889afb2019-02-15 10:42:00 -0800147 service#cdn-local:
148 type: tosca.nodes.Service
149 properties:
150 name: cdn-local
151
152 service#cdn-remote:
153 type: tosca.nodes.Service
154 properties:
155 name: cdn-remote
156
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800157 service_dependency#onos-fabric_fabric:
158 type: tosca.nodes.ServiceDependency
159 properties:
160 connect_method: none
161 requirements:
162 - subscriber_service:
163 node: service#fabric
164 relationship: tosca.relationships.BelongsToOne
165 - provider_service:
166 node: service#onos
167 relationship: tosca.relationships.BelongsToOne
168
Matteo Scandoloa9ac2b82019-01-29 16:55:35 -0800169 service_dependency#vrouter_fabric:
170 type: tosca.nodes.ServiceDependency
171 properties:
172 connect_method: none
173 requirements:
174 - subscriber_service:
175 node: service#vrouter
176 relationship: tosca.relationships.BelongsToOne
177 - provider_service:
178 node: service#fabric
179 relationship: tosca.relationships.BelongsToOne
180
Woojoong Kimee78bac2019-06-21 14:31:42 -0700181 service_dependency#mcord_progran:
182 type: tosca.nodes.ServiceDependency
183 properties:
184 connect_method: none
185 requirements:
186 - subscriber_service:
187 node: service#progran
188 relationship: tosca.relationships.BelongsToOne
189 - provider_service:
190 node: service#mcord
191 relationship: tosca.relationships.BelongsToOne
192
193 service_dependency#progran_epc_cp:
194 type: tosca.nodes.ServiceDependency
195 properties:
196 connect_method: none
197 requirements:
198 - subscriber_service:
199 node: service#epc-cp
200 relationship: tosca.relationships.BelongsToOne
201 - provider_service:
202 node: service#progran
203 relationship: tosca.relationships.BelongsToOne
204
205 service_dependency#epc_cp_epc_up:
206 type: tosca.nodes.ServiceDependency
207 properties:
208 connect_method: none
209 requirements:
210 - subscriber_service:
211 node: service#epc-up
212 relationship: tosca.relationships.BelongsToOne
213 - provider_service:
214 node: service#epc-cp
215 relationship: tosca.relationships.BelongsToOne
216
217 service_dependency#progran_epc_up:
218 type: tosca.nodes.ServiceDependency
219 properties:
220 connect_method: none
221 requirements:
222 - subscriber_service:
223 node: service#epc-up
224 relationship: tosca.relationships.BelongsToOne
225 - provider_service:
226 node: service#progran
227 relationship: tosca.relationships.BelongsToOne
228
229 service_dependency#epc_up_cdn_local:
230 type: tosca.nodes.ServiceDependency
231 properties:
232 connect_method: none
233 requirements:
234 - subscriber_service:
235 node: service#cdn-local
236 relationship: tosca.relationships.BelongsToOne
237 - provider_service:
238 node: service#epc-up
239 relationship: tosca.relationships.BelongsToOne
240
241 service_dependency#cdn_local_cdn_remote:
242 type: tosca.nodes.ServiceDependency
243 properties:
244 connect_method: none
245 requirements:
246 - subscriber_service:
247 node: service#cdn-remote
248 relationship: tosca.relationships.BelongsToOne
249 - provider_service:
250 node: service#cdn-local
251 relationship: tosca.relationships.BelongsToOne
252
Andy Baviera40e82b2018-05-07 17:00:36 -0700253 constraints:
254 type: tosca.nodes.ServiceGraphConstraint
255 properties:
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800256{{- if .Values.seba.enabled }}
Woojoong Kimee78bac2019-06-21 14:31:42 -0700257 constraints: '[ ["mcord", null, "onos"], ["progran", null, "fabric"], ["epc-cp", null, null] ["epc-up", null, null] ]'
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800258{{ else }}
Woojoong Kimee78bac2019-06-21 14:31:42 -0700259 constraints: '[ ["mcord", "progran", null], ["epc-cp", "epc-up", "onos"], [null, "cdn-local", "fabric"], [null, "cdn-remote", "vrouter"] ]'
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800260{{- end -}}
Woojoong Kimee78bac2019-06-21 14:31:42 -0700261{{- end -}}