blob: 175f4062963a795a43204305c8449268f912708a [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
Andy Baviera40e82b2018-05-07 17:00:36 -070023
24description: set up site and deployment and link them
25
26topology_template:
27 node_templates:
28
29 {{ .Values.cordSiteName }}:
30 type: tosca.nodes.Site
31 properties:
32 name: {{ .Values.cordSiteName }}
33 site_url: http://mysite.opencord.us/
34 hosts_nodes: true
35
Andy Baviera40e82b2018-05-07 17:00:36 -070036{{- end -}}
37
Matteo Scandolo3f2426b2019-01-18 13:46:26 -080038{{- define "mcord.onosTosca" -}}
39tosca_definitions_version: tosca_simple_yaml_1_0
40
41imports:
42 - custom_types/onosapp.yaml
43 - custom_types/onosservice.yaml
44 - custom_types/serviceinstanceattribute.yaml
45
46description: Configures the VOLTHA ONOS service
47
48topology_template:
49 node_templates:
50
51 service#onos:
52 type: tosca.nodes.ONOSService
53 properties:
54 name: onos
55 kind: data
56 rest_hostname: {{ .onosRestService | quote }}
57 rest_port: 8181
58
59 onos_app#segmentrouting:
60 type: tosca.nodes.ONOSApp
61 properties:
62 name: org.onosproject.segmentrouting
63 app_id: org.onosproject.segmentrouting
64 requirements:
65 - owner:
66 node: service#onos
67 relationship: tosca.relationships.BelongsToOne
68
69 onos_app#netcfghostprovider:
70 type: tosca.nodes.ONOSApp
71 properties:
72 name: org.onosproject.netcfghostprovider
73 app_id: org.onosproject.netcfghostprovider
74 requirements:
75 - owner:
76 node: service#onos
77 relationship: tosca.relationships.BelongsToOne
78
79 onos_app#openflow:
80 type: tosca.nodes.ONOSApp
81 properties:
82 name: org.onosproject.openflow
83 app_id: org.onosproject.openflow
84 requirements:
85 - owner:
86 node: service#onos
87 relationship: tosca.relationships.BelongsToOne
88{{- end -}}
89
Andy Baviera40e82b2018-05-07 17:00:36 -070090{{- define "mcord.serviceGraphTosca" -}}
91tosca_definitions_version: tosca_simple_yaml_1_0
92
93imports:
Matteo Scandolo3f2426b2019-01-18 13:46:26 -080094 - custom_types/fabricservice.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -070095 - custom_types/mcordsubscriberservice.yaml
Matteo Scandolo3f2426b2019-01-18 13:46:26 -080096 - custom_types/onosservice.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -070097 - custom_types/progranservice.yaml
Matteo Scandoloa9ac2b82019-01-29 16:55:35 -080098 - custom_types/vrouterservice.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -070099 - custom_types/servicegraphconstraint.yaml
100 - custom_types/servicedependency.yaml
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800101 - custom_types/service.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -0700102
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800103description: Configures the M-CORD service graph
Andy Baviera40e82b2018-05-07 17:00:36 -0700104
105topology_template:
106 node_templates:
107
Andy Baviera40e82b2018-05-07 17:00:36 -0700108 service#progran:
109 type: tosca.nodes.ProgranService
110 properties:
111 name: progran
112 must-exist: true
113
Matteo Scandoloa9ac2b82019-01-29 16:55:35 -0800114 service#vrouter:
115 type: tosca.nodes.VRouterService
116 properties:
117 name: vrouter
118 must-exist: true
119
Andy Baviera40e82b2018-05-07 17:00:36 -0700120 service#mcord:
121 type: tosca.nodes.MCordSubscriberService
122 properties:
123 name: mcord
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800124 must-exist: true
Andy Baviera40e82b2018-05-07 17:00:36 -0700125
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800126 service#onos:
127 type: tosca.nodes.ONOSService
128 properties:
129 name: onos
130 must-exist: true
131
132 service#fabric:
133 type: tosca.nodes.FabricService
134 properties:
135 name: fabric
136 must-exist: true
137
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800138 service#epc-local:
139 type: tosca.nodes.Service
140 properties:
141 name: epc-local
142
143 service#epc-remote:
144 type: tosca.nodes.Service
145 properties:
146 name: epc-remote
147
Matteo Scandoloc889afb2019-02-15 10:42:00 -0800148 service#cdn-local:
149 type: tosca.nodes.Service
150 properties:
151 name: cdn-local
152
153 service#cdn-remote:
154 type: tosca.nodes.Service
155 properties:
156 name: cdn-remote
157
158 service_dependency#epc_local_cdn_local:
159 type: tosca.nodes.ServiceDependency
160 properties:
161 connect_method: none
162 requirements:
163 - subscriber_service:
164 node: service#epc-local
165 relationship: tosca.relationships.BelongsToOne
166 - provider_service:
167 node: service#cdn-local
168 relationship: tosca.relationships.BelongsToOne
169
170 service_dependency#cdn_local_cdn_remote:
171 type: tosca.nodes.ServiceDependency
172 properties:
173 connect_method: none
174 requirements:
175 - subscriber_service:
176 node: service#cdn-local
177 relationship: tosca.relationships.BelongsToOne
178 - provider_service:
179 node: service#cdn-remote
180 relationship: tosca.relationships.BelongsToOne
181
182 service_dependency#mcord_progran:
Andy Baviera40e82b2018-05-07 17:00:36 -0700183 type: tosca.nodes.ServiceDependency
184 properties:
Scott Baker1d408032018-08-29 08:34:49 -0700185 connect_method: none
Andy Baviera40e82b2018-05-07 17:00:36 -0700186 requirements:
187 - subscriber_service:
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800188 node: service#progran
Andy Baviera40e82b2018-05-07 17:00:36 -0700189 relationship: tosca.relationships.BelongsToOne
190 - provider_service:
191 node: service#mcord
192 relationship: tosca.relationships.BelongsToOne
193
Matteo Scandoloc889afb2019-02-15 10:42:00 -0800194 service_dependency#progran_epc_local:
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800195 type: tosca.nodes.ServiceDependency
196 properties:
197 connect_method: none
198 requirements:
199 - subscriber_service:
200 node: service#epc-local
201 relationship: tosca.relationships.BelongsToOne
202 - provider_service:
203 node: service#progran
204 relationship: tosca.relationships.BelongsToOne
205
Matteo Scandoloc889afb2019-02-15 10:42:00 -0800206 service_dependency#epc_local_epc_remote:
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800207 type: tosca.nodes.ServiceDependency
208 properties:
209 connect_method: none
210 requirements:
211 - subscriber_service:
212 node: service#epc-remote
213 relationship: tosca.relationships.BelongsToOne
214 - provider_service:
215 node: service#epc-local
216 relationship: tosca.relationships.BelongsToOne
217
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800218 service_dependency#onos-fabric_fabric:
219 type: tosca.nodes.ServiceDependency
220 properties:
221 connect_method: none
222 requirements:
223 - subscriber_service:
224 node: service#fabric
225 relationship: tosca.relationships.BelongsToOne
226 - provider_service:
227 node: service#onos
228 relationship: tosca.relationships.BelongsToOne
229
Matteo Scandoloa9ac2b82019-01-29 16:55:35 -0800230 service_dependency#vrouter_fabric:
231 type: tosca.nodes.ServiceDependency
232 properties:
233 connect_method: none
234 requirements:
235 - subscriber_service:
236 node: service#vrouter
237 relationship: tosca.relationships.BelongsToOne
238 - provider_service:
239 node: service#fabric
240 relationship: tosca.relationships.BelongsToOne
241
Andy Baviera40e82b2018-05-07 17:00:36 -0700242 constraints:
243 type: tosca.nodes.ServiceGraphConstraint
244 properties:
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800245{{- if .Values.seba.enabled }}
246 constraints: '[ ["mcord", null, "onos"], ["progran", null, "fabric"], ["epc-local", null, null] ["epc-remote", null, null] ]'
247{{ else }}
Matteo Scandoloc889afb2019-02-15 10:42:00 -0800248 constraints: '[ ["mcord", null, "rcord", null], ["progran", null, "volt", "att-workflow-driver"], ["epc-local", "cdn-local", "fabric-crossconnect", "onos"], ["epc-remote", "cdn-remote", "vrouter", "fabric"] ]'
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800249{{- end -}}
Andy Baviera40e82b2018-05-07 17:00:36 -0700250{{- end -}}