blob: 41e6d0f0731b090865f0280a504b081cb2ddd0bc [file] [log] [blame]
Andy Baviere3023282018-05-12 06:35:13 -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*/}}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070017
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070018{{- define "rcord-lite.onosTosca" -}}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070019tosca_definitions_version: tosca_simple_yaml_1_0
20imports:
21 - custom_types/onosapp.yaml
22 - custom_types/onosservice.yaml
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070023 - custom_types/serviceinstanceattribute.yaml
Jonathan Hart9f638ff2018-08-22 18:19:15 -070024description: ONOS service and app for fabric
25topology_template:
26 node_templates:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070027 service#ONOS:
Jonathan Hart9f638ff2018-08-22 18:19:15 -070028 type: tosca.nodes.ONOSService
29 properties:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070030 name: ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -070031 kind: data
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070032 rest_hostname: {{ .onosRestService | quote }}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070033 rest_port: 8181
34
35 onos_app#segmentrouting:
36 type: tosca.nodes.ONOSApp
37 properties:
38 name: org.onosproject.segmentrouting
39 app_id: org.onosproject.segmentrouting
40 requirements:
41 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070042 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -070043 relationship: tosca.relationships.BelongsToOne
44
45 onos_app#vrouter:
46 type: tosca.nodes.ONOSApp
47 properties:
48 name: org.onosproject.vrouter
49 app_id: org.onosproject.vrouter
50 requirements:
51 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070052 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -070053 relationship: tosca.relationships.BelongsToOne
54
55 onos_app#netcfghostprovider:
56 type: tosca.nodes.ONOSApp
57 properties:
58 name: org.onosproject.netcfghostprovider
59 app_id: org.onosproject.netcfghostprovider
60 requirements:
61 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070062 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -070063 relationship: tosca.relationships.BelongsToOne
64
65 onos_app#openflow:
66 type: tosca.nodes.ONOSApp
67 properties:
68 name: org.onosproject.openflow
69 app_id: org.onosproject.openflow
70 requirements:
71 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070072 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -070073 relationship: tosca.relationships.BelongsToOne
Jonathan Hart9f638ff2018-08-22 18:19:15 -070074
75 onos_app#openflow-base:
76 type: tosca.nodes.ONOSApp
77 properties:
78 name: openflow-base
79 app_id: org.onosproject.openflow-base
80 requirements:
81 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070082 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -070083 relationship: tosca.relationships.BelongsToOne
84
85 onos_app#hostprovider:
86 type: tosca.nodes.ONOSApp
87 properties:
88 name: hostprovider
89 app_id: org.onosproject.hostprovider
90 requirements:
91 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070092 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -070093 relationship: tosca.relationships.BelongsToOne
94
95 onos_app#cord-config:
96 type: tosca.nodes.ONOSApp
97 properties:
98 name: cord-config
99 app_id: org.opencord.config
100 url: {{ .cordConfigAppURL }}
101 version: 1.4.0
102 requirements:
103 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700104 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700105 relationship: tosca.relationships.BelongsToOne
106
107 onos_app#olt:
108 type: tosca.nodes.ONOSApp
109 properties:
110 name: olt
111 app_id: org.opencord.olt
112 url: {{ .oltAppUrl }}
113 version: 2.0.0.SNAPSHOT
114 dependencies: org.opencord.config
115 requirements:
116 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700117 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700118 relationship: tosca.relationships.BelongsToOne
119
120 onos_app#sadis:
121 type: tosca.nodes.ONOSApp
122 properties:
123 name: sadis
124 app_id: org.opencord.sadis
125 url: {{ .sadisAppUrl }}
126 version: 2.1.0
127 requirements:
128 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700129 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700130 relationship: tosca.relationships.BelongsToOne
131
132 onos_app#dhcpl2relay:
133 type: tosca.nodes.ONOSApp
134 properties:
135 name: dhcpl2relay
136 app_id: org.opencord.dhcpl2relay
137 url: {{ .dhcpl2relayAppUrl }}
138 version: 1.5.0.SNAPSHOT
139 dependencies: org.opencord.sadis
140 requirements:
141 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700142 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700143 relationship: tosca.relationships.BelongsToOne
144
145 onos_app#aaa:
146 type: tosca.nodes.ONOSApp
147 properties:
148 name: aaa
149 app_id: org.opencord.aaa
150 url: {{ .aaaAppUrl }}
151 version: 1.8.0.SNAPSHOT
152 dependencies: org.opencord.sadis
153 requirements:
154 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700155 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700156 relationship: tosca.relationships.BelongsToOne
157
158 onos_app#kafka:
159 type: tosca.nodes.ONOSApp
160 properties:
161 name: kafka
162 app_id: org.opencord.kafka
163 url: {{ .kafkaAppUrl }}
164 version: 1.0.0.SNAPSHOT
165 dependencies: org.opencord.olt,org.opencord.aaa,org.opencord.dhcpl2relay
166 requirements:
167 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700168 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700169 relationship: tosca.relationships.BelongsToOne
170
171 # CORD-Configuration
172 cord-config-attr:
173 type: tosca.nodes.ServiceInstanceAttribute
174 properties:
175 name: /onos/v1/network/configuration/apps/org.opencord.kafka
176 value: >
177 {
178 "kafka" : {
179 "bootstrapServers" : {{ .kafkaService | quote }}
180 }
181 }
182 requirements:
183 - service_instance:
184 node: onos_app#olt
185 relationship: tosca.relationships.BelongsToOne
186
187 olt-config-attr:
188 type: tosca.nodes.ServiceInstanceAttribute
189 properties:
190 name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true
191 value: >
192 {
193 "enableDhcpOnProvisioning" : true
194 }
195 requirements:
196 - service_instance:
197 node: onos_app#olt
198 relationship: tosca.relationships.BelongsToOne
199
200 dhcpl2relay-config-attr:
201 type: tosca.nodes.ServiceInstanceAttribute
202 properties:
203 name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay
204 value: >
205 {
206 "dhcpl2relay" : {
207 "useOltUplinkForServerPktInOut" : true
208 }
209 }
210 requirements:
211 - service_instance:
212 node: onos_app#dhcpl2relay
213 relationship: tosca.relationships.BelongsToOne
214
215 aaa-config-attr:
216 type: tosca.nodes.ServiceInstanceAttribute
217 properties:
218 name: /onos/v1/network/configuration/apps/org.opencord.aaa
219 value: >
220 {
221 "AAA" : {
222 "radiusConnectionType" : "socket",
223 "radiusHost" : "freeradius.voltha.svc.cluster.local",
224 "radiusServerPort" : "1812",
225 "radiusSecret" : "SECRET"
226 }
227 }
228 requirements:
229 - service_instance:
230 node: onos_app#aaa
231 relationship: tosca.relationships.BelongsToOne
232
233 sadis-config-attr:
234 type: tosca.nodes.ServiceInstanceAttribute
235 properties:
236 name: /onos/v1/network/configuration/apps/org.opencord.sadis
237 value: >
238 {
239 "sadis" : {
240 "integration" : {
241 "cache" : {
242 "maxsize" : 1000
243 },
244 "url" : "http://sadis-service:8000/subscriber/%s"
245 }
246 }
247 }
248 requirements:
249 - service_instance:
250 node: onos_app#sadis
251 relationship: tosca.relationships.BelongsToOne
252{{- end -}}
253
Andy Baviere3023282018-05-12 06:35:13 -0700254{{- define "rcord-lite.serviceGraphTosca" -}}
255tosca_definitions_version: tosca_simple_yaml_1_0
256imports:
257 - custom_types/fabricservice.yaml
258 - custom_types/onosservice.yaml
259 - custom_types/rcordservice.yaml
260 - custom_types/vrouterservice.yaml
261 - custom_types/voltservice.yaml
262 - custom_types/vsghwservice.yaml
263 - custom_types/servicedependency.yaml
264 - custom_types/servicegraphconstraint.yaml
265description: rcord-lite service graph
266topology_template:
267 node_templates:
268
269# These services must be defined before loading the graph
270
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700271 service#ONOS:
Andy Baviere3023282018-05-12 06:35:13 -0700272 type: tosca.nodes.ONOSService
273 properties:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700274 name: ONOS
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700275 must-exist: true
276
Andy Baviere3023282018-05-12 06:35:13 -0700277 service#fabric:
278 type: tosca.nodes.FabricService
279 properties:
280 name: fabric
281 must-exist: true
282
283 service#rcord:
284 type: tosca.nodes.RCORDService
285 properties:
286 name: rcord
287 must-exist: true
288
289 service#vrouter:
290 type: tosca.nodes.VRouterService
291 properties:
292 name: vrouter
293 must-exist: true
294
295 service#volt:
296 type: tosca.nodes.VOLTService
297 properties:
298 name: volt
299 must-exist: true
300
301 service#vsg-hw:
302 type: tosca.nodes.VSGHWService
303 properties:
304 name: vsg-hw
305 must-exist: true
306
307# The rcord-lite service graph
308
309 service_dependency#onos-fabric_fabric:
310 type: tosca.nodes.ServiceDependency
311 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700312 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700313 requirements:
314 - subscriber_service:
Scott Bakere9ae0482018-08-16 15:42:05 -0700315 node: service#fabric
Andy Baviere3023282018-05-12 06:35:13 -0700316 relationship: tosca.relationships.BelongsToOne
317 - provider_service:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700318 node: service#ONOS
Andy Baviere3023282018-05-12 06:35:13 -0700319 relationship: tosca.relationships.BelongsToOne
320
321 service_dependency#rcord_volt:
322 type: tosca.nodes.ServiceDependency
323 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700324 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700325 requirements:
326 - subscriber_service:
327 node: service#rcord
328 relationship: tosca.relationships.BelongsToOne
329 - provider_service:
330 node: service#volt
331 relationship: tosca.relationships.BelongsToOne
332
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700333 service_dependency#onos_voltha_volt:
334 type: tosca.nodes.ServiceDependency
335 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700336 connect_method: none
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700337 requirements:
338 - subscriber_service:
339 node: service#volt
340 relationship: tosca.relationships.BelongsToOne
341 - provider_service:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700342 node: service#ONOS
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700343 relationship: tosca.relationships.BelongsToOne
344
Andy Baviere3023282018-05-12 06:35:13 -0700345 service_dependency#fabric_vrouter:
346 type: tosca.nodes.ServiceDependency
347 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700348 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700349 requirements:
350 - subscriber_service:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700351 node: service#vrouter
Andy Baviere3023282018-05-12 06:35:13 -0700352 relationship: tosca.relationships.BelongsToOne
353 - provider_service:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700354 node: service#fabric
Andy Baviere3023282018-05-12 06:35:13 -0700355 relationship: tosca.relationships.BelongsToOne
356
357 service_dependency#volt_vsg-hw:
358 type: tosca.nodes.ServiceDependency
359 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700360 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700361 requirements:
362 - subscriber_service:
363 node: service#volt
364 relationship: tosca.relationships.BelongsToOne
365 - provider_service:
366 node: service#vsg-hw
367 relationship: tosca.relationships.BelongsToOne
368
369 service_dependency#onos_fabric_vsg-hw:
370 type: tosca.nodes.ServiceDependency
371 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700372 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700373 requirements:
374 - subscriber_service:
375 node: service#vsg-hw
376 relationship: tosca.relationships.BelongsToOne
377 - provider_service:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700378 node: service#ONOS
Andy Baviere3023282018-05-12 06:35:13 -0700379 relationship: tosca.relationships.BelongsToOne
380
381 constraints:
382 type: tosca.nodes.ServiceGraphConstraint
383 properties:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700384 constraints: '[[null, "rcord"], [null, "volt"], ["ONOS", "vsg-hw"], ["fabric", null], ["vrouter", null]]'
Andy Baviere3023282018-05-12 06:35:13 -0700385{{- end -}}