blob: 712f1764c82ac648b2799fdd4c02ec7618b4204d [file] [log] [blame]
Scott Bakerafff3082018-07-16 17:23:26 -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*/}}
Matteo Scandolo34dd2362018-12-12 15:16:25 -080017{{- define "seba-services.onosTosca" -}}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070018tosca_definitions_version: tosca_simple_yaml_1_0
19
20imports:
21 - custom_types/onosapp.yaml
22 - custom_types/onosservice.yaml
23 - custom_types/serviceinstanceattribute.yaml
24
25description: Configures the VOLTHA ONOS service
26
27topology_template:
28 node_templates:
29
30 service#onos:
31 type: tosca.nodes.ONOSService
32 properties:
33 name: onos
34 kind: data
35 rest_hostname: {{ .onosRestService | quote }}
36 rest_port: 8181
37
38 onos_app#openflow-base:
39 type: tosca.nodes.ONOSApp
40 properties:
41 name: openflow-base
42 app_id: org.onosproject.openflow-base
43 requirements:
44 - owner:
45 node: service#onos
46 relationship: tosca.relationships.BelongsToOne
47
48 onos_app#hostprovider:
49 type: tosca.nodes.ONOSApp
50 properties:
51 name: hostprovider
52 app_id: org.onosproject.hostprovider
53 requirements:
54 - owner:
55 node: service#onos
56 relationship: tosca.relationships.BelongsToOne
57
58 onos_app#olt:
59 type: tosca.nodes.ONOSApp
60 properties:
61 name: olt
62 app_id: org.opencord.olt
63 url: {{ .oltAppUrl }}
Matt Jeanneretf3fbac22019-01-15 21:16:39 -050064 version: {{ .oltAppVersion }}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070065 dependencies: org.opencord.sadis
66 requirements:
67 - owner:
68 node: service#onos
69 relationship: tosca.relationships.BelongsToOne
70
71 onos_app#sadis:
72 type: tosca.nodes.ONOSApp
73 properties:
74 name: sadis
75 app_id: org.opencord.sadis
76 url: {{ .sadisAppUrl }}
Matt Jeanneretf3fbac22019-01-15 21:16:39 -050077 version: {{ .sadisAppVersion }}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070078 requirements:
79 - owner:
80 node: service#onos
81 relationship: tosca.relationships.BelongsToOne
82
83 onos_app#dhcpl2relay:
84 type: tosca.nodes.ONOSApp
85 properties:
86 name: dhcpl2relay
87 app_id: org.opencord.dhcpl2relay
88 url: {{ .dhcpl2relayAppUrl }}
Matt Jeanneretf3fbac22019-01-15 21:16:39 -050089 version: {{ .dhcpl2relayAppVersion }}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070090 dependencies: org.opencord.sadis
91 requirements:
92 - owner:
93 node: service#onos
94 relationship: tosca.relationships.BelongsToOne
95
Jonathan Hart9f638ff2018-08-22 18:19:15 -070096 onos_app#kafka:
97 type: tosca.nodes.ONOSApp
98 properties:
99 name: kafka
100 app_id: org.opencord.kafka
101 url: {{ .kafkaAppUrl }}
Matt Jeanneretf3fbac22019-01-15 21:16:39 -0500102 version: {{ .kafkaAppVersion }}
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700103 requirements:
104 - owner:
105 node: service#onos
106 relationship: tosca.relationships.BelongsToOne
107
108 # CORD-Configuration
109 kafka-config-attr:
110 type: tosca.nodes.ServiceInstanceAttribute
111 properties:
112 name: /onos/v1/network/configuration/apps/org.opencord.kafka
113 value: >
114 {
115 "kafka" : {
116 "bootstrapServers" : {{ .kafkaService | quote }}
117 }
118 }
119 requirements:
120 - service_instance:
Andy Bavier1a24ced2018-09-15 11:49:14 -0700121 node: onos_app#kafka
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700122 relationship: tosca.relationships.BelongsToOne
123
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700124 sadis-config-attr:
125 type: tosca.nodes.ServiceInstanceAttribute
126 properties:
127 name: /onos/v1/network/configuration/apps/org.opencord.sadis
128 value: >
129 {
130 "sadis" : {
131 "integration" : {
132 "cache" : {
Matteo Scandolo4c481d12018-11-19 13:28:17 -0800133 "maxsize" : 1000,
134 "ttl": "PT300S"
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700135 },
136 "url" : "http://sadis-service:8000/subscriber/%s"
137 }
Zack Williamse68bbde2019-04-15 22:03:13 -0700138 },
139 "bandwidthprofile":{
140 "integration":{
141 "url": "http://sadis-service:8000/bandwidthprofiles/%s",
142 "cache":{
143 "enabled":true,
144 "maxsize":40,
145 "ttl":"PT1m"
146 }
147 }
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700148 }
149 }
150 requirements:
151 - service_instance:
152 node: onos_app#sadis
153 relationship: tosca.relationships.BelongsToOne
154
155 onos_app#segmentrouting:
156 type: tosca.nodes.ONOSApp
157 properties:
158 name: org.onosproject.segmentrouting
159 app_id: org.onosproject.segmentrouting
160 requirements:
161 - owner:
162 node: service#onos
163 relationship: tosca.relationships.BelongsToOne
164
165 onos_app#netcfghostprovider:
166 type: tosca.nodes.ONOSApp
167 properties:
168 name: org.onosproject.netcfghostprovider
169 app_id: org.onosproject.netcfghostprovider
170 requirements:
171 - owner:
172 node: service#onos
173 relationship: tosca.relationships.BelongsToOne
174
175 onos_app#openflow:
176 type: tosca.nodes.ONOSApp
177 properties:
178 name: org.onosproject.openflow
179 app_id: org.onosproject.openflow
180 requirements:
181 - owner:
182 node: service#onos
183 relationship: tosca.relationships.BelongsToOne
184{{- end -}}
185
Matteo Scandolo34dd2362018-12-12 15:16:25 -0800186{{- define "seba-services.basicFixturesTosca" -}}
Scott Bakerafff3082018-07-16 17:23:26 -0700187tosca_definitions_version: tosca_simple_yaml_1_0
188description: Some basic fixtures
189imports:
Scott Bakerafff3082018-07-16 17:23:26 -0700190 - custom_types/networkparametertype.yaml
191 - custom_types/networktemplate.yaml
Scott Bakerafff3082018-07-16 17:23:26 -0700192topology_template:
193 node_templates:
194
195# -----------------------------------------------------------------------------
196# Network Parameter Types
197# -----------------------------------------------------------------------------
198 s_tag:
199 type: tosca.nodes.NetworkParameterType
200 properties:
201 name: s_tag
202 c_tag:
203 type: tosca.nodes.NetworkParameterType
204 properties:
205 name: c_tag
206 next_hop:
207 type: tosca.nodes.NetworkParameterType
208 properties:
209 name: next_hop
210 device:
211 type: tosca.nodes.NetworkParameterType
212 properties:
213 name: device
214 bridge:
215 type: tosca.nodes.NetworkParameterType
216 properties:
217 name: bridge
218 neutron_port_name:
219 type: tosca.nodes.NetworkParameterType
220 properties:
221 name: neutron_port_name
222
Scott Bakerafff3082018-07-16 17:23:26 -0700223# -----------------------------------------------------------------------------
224# Network Templates
225# -----------------------------------------------------------------------------
226 Private:
227 type: tosca.nodes.NetworkTemplate
228 properties:
229 name: Private
230 visibility: private
231 translation: none
232
233 Public shared IPv4:
234 type: tosca.nodes.NetworkTemplate
235 properties:
236 name: Public shared IPv4
237 visibility: private
238 translation: NAT
239 shared_network_name: nat-net
240
241 Public dedicated IPv4:
242 type: tosca.nodes.NetworkTemplate
243 properties:
244 name: Public dedicated IPv4
245 visibility: public
246 translation: none
247 shared_network_name: ext-net
248
Scott Bakerafff3082018-07-16 17:23:26 -0700249{{- end -}}
250
251
Matteo Scandolo34dd2362018-12-12 15:16:25 -0800252{{- define "seba-services.serviceGraphTosca" -}}
Scott Bakerafff3082018-07-16 17:23:26 -0700253tosca_definitions_version: tosca_simple_yaml_1_0
254imports:
255 - custom_types/fabricservice.yaml
256 - custom_types/onosservice.yaml
257 - custom_types/rcordservice.yaml
258 - custom_types/voltservice.yaml
259 - custom_types/fabriccrossconnectservice.yaml
260 - custom_types/servicedependency.yaml
261 - custom_types/servicegraphconstraint.yaml
Matteo Scandolo34dd2362018-12-12 15:16:25 -0800262description: seba service graph
Scott Bakerafff3082018-07-16 17:23:26 -0700263topology_template:
264 node_templates:
265
266# These services must be defined before loading the graph
267
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700268 service#onos:
Scott Bakerafff3082018-07-16 17:23:26 -0700269 type: tosca.nodes.ONOSService
270 properties:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700271 name: onos
Scott Bakerafff3082018-07-16 17:23:26 -0700272 must-exist: true
273
274 service#fabric:
275 type: tosca.nodes.FabricService
276 properties:
277 name: fabric
278 must-exist: true
279
280 service#rcord:
281 type: tosca.nodes.RCORDService
282 properties:
283 name: rcord
284 must-exist: true
285
286 service#volt:
287 type: tosca.nodes.VOLTService
288 properties:
289 name: volt
290 must-exist: true
291
292 service#fabric-crossconnect:
293 type: tosca.nodes.FabricCrossconnectService
294 properties:
295 name: fabric-crossconnect
296 must-exist: true
297
Scott Bakerafff3082018-07-16 17:23:26 -0700298 service_dependency#onos-fabric_fabric:
299 type: tosca.nodes.ServiceDependency
300 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700301 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700302 requirements:
303 - subscriber_service:
Scott Bakere9ae0482018-08-16 15:42:05 -0700304 node: service#fabric
Scott Bakerafff3082018-07-16 17:23:26 -0700305 relationship: tosca.relationships.BelongsToOne
306 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700307 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700308 relationship: tosca.relationships.BelongsToOne
309
310 service_dependency#rcord_volt:
311 type: tosca.nodes.ServiceDependency
312 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700313 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700314 requirements:
315 - subscriber_service:
316 node: service#rcord
317 relationship: tosca.relationships.BelongsToOne
318 - provider_service:
319 node: service#volt
320 relationship: tosca.relationships.BelongsToOne
321
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700322 service_dependency#onos_volt:
Scott Bakerafff3082018-07-16 17:23:26 -0700323 type: tosca.nodes.ServiceDependency
324 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700325 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700326 requirements:
327 - subscriber_service:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700328 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700329 relationship: tosca.relationships.BelongsToOne
330 - provider_service:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700331 node: service#volt
Scott Bakerafff3082018-07-16 17:23:26 -0700332 relationship: tosca.relationships.BelongsToOne
333
334 service_dependency#volt_fabric-crossconnect:
335 type: tosca.nodes.ServiceDependency
336 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700337 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700338 requirements:
339 - subscriber_service:
340 node: service#volt
341 relationship: tosca.relationships.BelongsToOne
342 - provider_service:
343 node: service#fabric-crossconnect
344 relationship: tosca.relationships.BelongsToOne
345
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700346 service_dependency#onos_fabric-crossconnect:
Scott Bakerafff3082018-07-16 17:23:26 -0700347 type: tosca.nodes.ServiceDependency
348 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700349 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700350 requirements:
351 - subscriber_service:
352 node: service#fabric-crossconnect
353 relationship: tosca.relationships.BelongsToOne
354 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700355 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700356 relationship: tosca.relationships.BelongsToOne
Scott Bakerafff3082018-07-16 17:23:26 -0700357{{- end -}}