blob: cb329b4f03c56d76f387e4be3469104c7d869eef [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
124 olt-config-attr:
125 type: tosca.nodes.ServiceInstanceAttribute
126 properties:
127 name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true
128 value: >
129 {
130 "enableDhcpOnProvisioning" : true
131 }
132 requirements:
133 - service_instance:
134 node: onos_app#olt
135 relationship: tosca.relationships.BelongsToOne
136
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700137 sadis-config-attr:
138 type: tosca.nodes.ServiceInstanceAttribute
139 properties:
140 name: /onos/v1/network/configuration/apps/org.opencord.sadis
141 value: >
142 {
143 "sadis" : {
144 "integration" : {
145 "cache" : {
Matteo Scandolo4c481d12018-11-19 13:28:17 -0800146 "maxsize" : 1000,
147 "ttl": "PT300S"
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700148 },
149 "url" : "http://sadis-service:8000/subscriber/%s"
150 }
151 }
152 }
153 requirements:
154 - service_instance:
155 node: onos_app#sadis
156 relationship: tosca.relationships.BelongsToOne
157
158 onos_app#segmentrouting:
159 type: tosca.nodes.ONOSApp
160 properties:
161 name: org.onosproject.segmentrouting
162 app_id: org.onosproject.segmentrouting
163 requirements:
164 - owner:
165 node: service#onos
166 relationship: tosca.relationships.BelongsToOne
167
168 onos_app#netcfghostprovider:
169 type: tosca.nodes.ONOSApp
170 properties:
171 name: org.onosproject.netcfghostprovider
172 app_id: org.onosproject.netcfghostprovider
173 requirements:
174 - owner:
175 node: service#onos
176 relationship: tosca.relationships.BelongsToOne
177
178 onos_app#openflow:
179 type: tosca.nodes.ONOSApp
180 properties:
181 name: org.onosproject.openflow
182 app_id: org.onosproject.openflow
183 requirements:
184 - owner:
185 node: service#onos
186 relationship: tosca.relationships.BelongsToOne
187{{- end -}}
188
Matteo Scandolo34dd2362018-12-12 15:16:25 -0800189{{- define "seba-services.basicFixturesTosca" -}}
Scott Bakerafff3082018-07-16 17:23:26 -0700190tosca_definitions_version: tosca_simple_yaml_1_0
191description: Some basic fixtures
192imports:
Scott Bakerafff3082018-07-16 17:23:26 -0700193 - custom_types/networkparametertype.yaml
194 - custom_types/networktemplate.yaml
Scott Bakerafff3082018-07-16 17:23:26 -0700195topology_template:
196 node_templates:
197
198# -----------------------------------------------------------------------------
199# Network Parameter Types
200# -----------------------------------------------------------------------------
201 s_tag:
202 type: tosca.nodes.NetworkParameterType
203 properties:
204 name: s_tag
205 c_tag:
206 type: tosca.nodes.NetworkParameterType
207 properties:
208 name: c_tag
209 next_hop:
210 type: tosca.nodes.NetworkParameterType
211 properties:
212 name: next_hop
213 device:
214 type: tosca.nodes.NetworkParameterType
215 properties:
216 name: device
217 bridge:
218 type: tosca.nodes.NetworkParameterType
219 properties:
220 name: bridge
221 neutron_port_name:
222 type: tosca.nodes.NetworkParameterType
223 properties:
224 name: neutron_port_name
225
Scott Bakerafff3082018-07-16 17:23:26 -0700226# -----------------------------------------------------------------------------
227# Network Templates
228# -----------------------------------------------------------------------------
229 Private:
230 type: tosca.nodes.NetworkTemplate
231 properties:
232 name: Private
233 visibility: private
234 translation: none
235
236 Public shared IPv4:
237 type: tosca.nodes.NetworkTemplate
238 properties:
239 name: Public shared IPv4
240 visibility: private
241 translation: NAT
242 shared_network_name: nat-net
243
244 Public dedicated IPv4:
245 type: tosca.nodes.NetworkTemplate
246 properties:
247 name: Public dedicated IPv4
248 visibility: public
249 translation: none
250 shared_network_name: ext-net
251
Scott Bakerafff3082018-07-16 17:23:26 -0700252{{- end -}}
253
254
Matteo Scandolo34dd2362018-12-12 15:16:25 -0800255{{- define "seba-services.serviceGraphTosca" -}}
Scott Bakerafff3082018-07-16 17:23:26 -0700256tosca_definitions_version: tosca_simple_yaml_1_0
257imports:
258 - custom_types/fabricservice.yaml
259 - custom_types/onosservice.yaml
260 - custom_types/rcordservice.yaml
261 - custom_types/voltservice.yaml
262 - custom_types/fabriccrossconnectservice.yaml
263 - custom_types/servicedependency.yaml
264 - custom_types/servicegraphconstraint.yaml
Matteo Scandolo34dd2362018-12-12 15:16:25 -0800265description: seba service graph
Scott Bakerafff3082018-07-16 17:23:26 -0700266topology_template:
267 node_templates:
268
269# These services must be defined before loading the graph
270
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700271 service#onos:
Scott Bakerafff3082018-07-16 17:23:26 -0700272 type: tosca.nodes.ONOSService
273 properties:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700274 name: onos
Scott Bakerafff3082018-07-16 17:23:26 -0700275 must-exist: true
276
277 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#volt:
290 type: tosca.nodes.VOLTService
291 properties:
292 name: volt
293 must-exist: true
294
295 service#fabric-crossconnect:
296 type: tosca.nodes.FabricCrossconnectService
297 properties:
298 name: fabric-crossconnect
299 must-exist: true
300
Scott Bakerafff3082018-07-16 17:23:26 -0700301 service_dependency#onos-fabric_fabric:
302 type: tosca.nodes.ServiceDependency
303 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700304 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700305 requirements:
306 - subscriber_service:
Scott Bakere9ae0482018-08-16 15:42:05 -0700307 node: service#fabric
Scott Bakerafff3082018-07-16 17:23:26 -0700308 relationship: tosca.relationships.BelongsToOne
309 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700310 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700311 relationship: tosca.relationships.BelongsToOne
312
313 service_dependency#rcord_volt:
314 type: tosca.nodes.ServiceDependency
315 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700316 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700317 requirements:
318 - subscriber_service:
319 node: service#rcord
320 relationship: tosca.relationships.BelongsToOne
321 - provider_service:
322 node: service#volt
323 relationship: tosca.relationships.BelongsToOne
324
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700325 service_dependency#onos_volt:
Scott Bakerafff3082018-07-16 17:23:26 -0700326 type: tosca.nodes.ServiceDependency
327 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700328 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700329 requirements:
330 - subscriber_service:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700331 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700332 relationship: tosca.relationships.BelongsToOne
333 - provider_service:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700334 node: service#volt
Scott Bakerafff3082018-07-16 17:23:26 -0700335 relationship: tosca.relationships.BelongsToOne
336
337 service_dependency#volt_fabric-crossconnect:
338 type: tosca.nodes.ServiceDependency
339 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700340 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700341 requirements:
342 - subscriber_service:
343 node: service#volt
344 relationship: tosca.relationships.BelongsToOne
345 - provider_service:
346 node: service#fabric-crossconnect
347 relationship: tosca.relationships.BelongsToOne
348
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700349 service_dependency#onos_fabric-crossconnect:
Scott Bakerafff3082018-07-16 17:23:26 -0700350 type: tosca.nodes.ServiceDependency
351 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700352 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700353 requirements:
354 - subscriber_service:
355 node: service#fabric-crossconnect
356 relationship: tosca.relationships.BelongsToOne
357 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700358 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700359 relationship: tosca.relationships.BelongsToOne
Scott Bakerafff3082018-07-16 17:23:26 -0700360{{- end -}}