blob: 35d55bde63c4dbb3e8389d763040affea4d159ba [file] [log] [blame]
Matteo Scandolo2eadad72018-07-25 13:40:56 -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 "nem-att.basicFixturesTosca" -}}
18tosca_definitions_version: tosca_simple_yaml_1_0
19description: Some basic fixtures
20imports:
21 - custom_types/siterole.yaml
22 - custom_types/slicerole.yaml
23 - custom_types/networkparametertype.yaml
24 - custom_types/networktemplate.yaml
25 - custom_types/deployment.yaml
26topology_template:
27 node_templates:
28
29# -----------------------------------------------------------------------------
30# Network Parameter Types
31# -----------------------------------------------------------------------------
32 s_tag:
33 type: tosca.nodes.NetworkParameterType
34 properties:
35 name: s_tag
36 c_tag:
37 type: tosca.nodes.NetworkParameterType
38 properties:
39 name: c_tag
40 next_hop:
41 type: tosca.nodes.NetworkParameterType
42 properties:
43 name: next_hop
44 device:
45 type: tosca.nodes.NetworkParameterType
46 properties:
47 name: device
48 bridge:
49 type: tosca.nodes.NetworkParameterType
50 properties:
51 name: bridge
52 neutron_port_name:
53 type: tosca.nodes.NetworkParameterType
54 properties:
55 name: neutron_port_name
56
57# ----------------------------------------------------------------------------
58# Roles
59# ----------------------------------------------------------------------------
60 siterole#admin:
61 type: tosca.nodes.SiteRole
62 properties:
63 role: admin
64 siterole#pi:
65 type: tosca.nodes.SiteRole
66 properties:
67 role: pi
68 siterole#tech:
69 type: tosca.nodes.SiteRole
70 properties:
71 role: tech
72 slicerole#admin:
73 type: tosca.nodes.SliceRole
74 properties:
75 role: admin
76 slicerole#access:
77 type: tosca.nodes.SliceRole
78 properties:
79 role: access
80
81# -----------------------------------------------------------------------------
82# Network Templates
83# -----------------------------------------------------------------------------
84 Private:
85 type: tosca.nodes.NetworkTemplate
86 properties:
87 name: Private
88 visibility: private
89 translation: none
90
91 Public shared IPv4:
92 type: tosca.nodes.NetworkTemplate
93 properties:
94 name: Public shared IPv4
95 visibility: private
96 translation: NAT
97 shared_network_name: nat-net
98
99 Public dedicated IPv4:
100 type: tosca.nodes.NetworkTemplate
101 properties:
102 name: Public dedicated IPv4
103 visibility: public
104 translation: none
105 shared_network_name: ext-net
106
107# -----------------------------------------------------------------------------
108# Deployment
109# -----------------------------------------------------------------------------
110 MyDeployment:
111 type: tosca.nodes.Deployment
112 properties:
113 name: MyDeployment
114{{- end -}}
115
116
117{{- define "nem-att.serviceGraphTosca" -}}
118tosca_definitions_version: tosca_simple_yaml_1_0
119imports:
120 - custom_types/fabricservice.yaml
121 - custom_types/fabriccrossconnectservice.yaml
122 - custom_types/hippieossservice.yaml
123 - custom_types/onosservice.yaml
124 - custom_types/rcordservice.yaml
125 - custom_types/servicedependency.yaml
126 - custom_types/servicegraphconstraint.yaml
127 - custom_types/voltservice.yaml
128description: rcord-fc service graph
129topology_template:
130 node_templates:
131
132# These services must be defined before loading the graph
133
134 service#ONOS_Fabric:
135 type: tosca.nodes.ONOSService
136 properties:
137 name: ONOS_Fabric
138 must-exist: true
139
140 service#ONOS_VOLTHA:
141 type: tosca.nodes.ONOSService
142 properties:
143 name: ONOS_VOLTHA
144 must-exist: true
145
146 service#fabric:
147 type: tosca.nodes.FabricService
148 properties:
149 name: fabric
150 must-exist: true
151
152 service#rcord:
153 type: tosca.nodes.RCORDService
154 properties:
155 name: rcord
156 must-exist: true
157
158 service#volt:
159 type: tosca.nodes.VOLTService
160 properties:
161 name: volt
162 must-exist: true
163
164 service#fabric-crossconnect:
165 type: tosca.nodes.FabricCrossconnectService
166 properties:
167 name: fabric-crossconnect
168 must-exist: true
169
170 # The nem-att service graph
171 service_dependency#onos-fabric_fabric:
172 type: tosca.nodes.ServiceDependency
173 properties:
174 connect_method: None
175 requirements:
176 - subscriber_service:
177 node: service#ONOS_Fabric
178 relationship: tosca.relationships.BelongsToOne
179 - provider_service:
180 node: service#fabric
181 relationship: tosca.relationships.BelongsToOne
182
183 service_dependency#rcord_volt:
184 type: tosca.nodes.ServiceDependency
185 properties:
186 connect_method: None
187 requirements:
188 - subscriber_service:
189 node: service#rcord
190 relationship: tosca.relationships.BelongsToOne
191 - provider_service:
192 node: service#volt
193 relationship: tosca.relationships.BelongsToOne
194
195 service_dependency#onos_voltha_volt:
196 type: tosca.nodes.ServiceDependency
197 properties:
198 connect_method: None
199 requirements:
200 - subscriber_service:
201 node: service#volt
202 relationship: tosca.relationships.BelongsToOne
203 - provider_service:
204 node: service#ONOS_VOLTHA
205 relationship: tosca.relationships.BelongsToOne
206
207 service_dependency#volt_fabric-crossconnect:
208 type: tosca.nodes.ServiceDependency
209 properties:
210 connect_method: None
211 requirements:
212 - subscriber_service:
213 node: service#volt
214 relationship: tosca.relationships.BelongsToOne
215 - provider_service:
216 node: service#fabric-crossconnect
217 relationship: tosca.relationships.BelongsToOne
218
219 service_dependency#onos_fabric_fabric-crossconnect:
220 type: tosca.nodes.ServiceDependency
221 properties:
222 connect_method: None
223 requirements:
224 - subscriber_service:
225 node: service#fabric-crossconnect
226 relationship: tosca.relationships.BelongsToOne
227 - provider_service:
228 node: service#ONOS_Fabric
229 relationship: tosca.relationships.BelongsToOne
230
231 constraints:
232 type: tosca.nodes.ServiceGraphConstraint
233 properties:
234 constraints: '[[null, "rcord"], ["ONOS_VOLTHA", "volt"], ["ONOS_Fabric", "fabric-crossconnect"], ["fabric", null]]'
235
236 # hippie-oss
237 service#oss:
238 type: tosca.nodes.HippieOSSService
239 properties:
240 name: hippie-oss
241 kind: oss
242 create_on_discovery: false
243
244 service_dependency#oss_volt:
245 type: tosca.nodes.ServiceDependency
246 properties:
247 connect_method: None
248 requirements:
249 - subscriber_service:
250 node: service#oss
251 relationship: tosca.relationships.BelongsToOne
252 - provider_service:
253 node: service#volt
254 relationship: tosca.relationships.BelongsToOne
255{{- end -}}
256
257{{- define "nem-att.fabricAppTosca" -}}
258tosca_definitions_version: tosca_simple_yaml_1_0
259imports:
260 - custom_types/onosapp.yaml
261 - custom_types/onosservice.yaml
262description: ONOS service and app for fabric
263topology_template:
264 node_templates:
265 service#ONOS_Fabric:
266 type: tosca.nodes.ONOSService
267 properties:
268 name: ONOS_Fabric
269 kind: platform
270 rest_hostname: {{ .Values.onosFabricRestService | quote }}
271 rest_port: 8181
272
273 onos_app#segmentrouting:
274 type: tosca.nodes.ONOSApp
275 properties:
276 name: org.onosproject.segmentrouting
277 app_id: org.onosproject.segmentrouting
278 requirements:
279 - owner:
280 node: service#ONOS_Fabric
281 relationship: tosca.relationships.BelongsToOne
282
283 onos_app#netcfghostprovider:
284 type: tosca.nodes.ONOSApp
285 properties:
286 name: org.onosproject.netcfghostprovider
287 app_id: org.onosproject.netcfghostprovider
288 requirements:
289 - owner:
290 node: service#ONOS_Fabric
291 relationship: tosca.relationships.BelongsToOne
292
293 onos_app#openflow:
294 type: tosca.nodes.ONOSApp
295 properties:
296 name: org.onosproject.openflow
297 app_id: org.onosproject.openflow
298 requirements:
299 - owner:
300 node: service#ONOS_Fabric
301 relationship: tosca.relationships.BelongsToOne
302{{- end -}}
303
304{{- define "nem-att.volthaOnosTosca" -}}
305tosca_definitions_version: tosca_simple_yaml_1_0
306
307imports:
308 - custom_types/onosapp.yaml
309 - custom_types/onosservice.yaml
310 - custom_types/serviceinstanceattribute.yaml
311
312description: Configures the VOLTHA ONOS service
313
314topology_template:
315 node_templates:
316
317 service#ONOS_VOLTHA:
318 type: tosca.nodes.ONOSService
319 properties:
320 name: ONOS_VOLTHA
321 kind: platform
322 rest_hostname: {{ .Values.onosVolthaRestService | quote }}
323 rest_port: 8181
324
325 onos_app#olt:
326 type: tosca.nodes.ONOSApp
327 properties:
328 name: org.opencord.olt
329 app_id: org.opencord.olt
330 version: 1.4.1
331 requirements:
332 - owner:
333 node: service#ONOS_VOLTHA
334 relationship: tosca.relationships.BelongsToOne
335
336 onos_app#dhcpl2relay:
337 type: tosca.nodes.ONOSApp
338 properties:
339 name: org.opencord.dhcpl2relay
340 app_id: org.opencord.dhcpl2relay
341 version: 1.4.0
342 requirements:
343 - owner:
344 node: service#ONOS_VOLTHA
345 relationship: tosca.relationships.BelongsToOne
346
347 onos_app#aaa:
348 type: tosca.nodes.ONOSApp
349 properties:
350 name: org.opencord.aaa
351 app_id: org.opencord.aaa
352 version: 1.6.0
353 requirements:
354 - owner:
355 node: service#ONOS_VOLTHA
356 relationship: tosca.relationships.BelongsToOne
357
358 # CORD-Configuration
359 cord-config-attr:
360 type: tosca.nodes.ServiceInstanceAttribute
361 properties:
362 name: /onos/v1/network/configuration/apps/org.opencord.kafka
363 value: >
364 {
365 "kafka" : {
366 "bootstrapServers" : {{ .Values.kafkaService | quote }}
367 }
368 }
369 requirements:
370 - service_instance:
371 node: onos_app#olt
372 relationship: tosca.relationships.BelongsToOne
373
374 olt-config-attr:
375 type: tosca.nodes.ServiceInstanceAttribute
376 properties:
377 name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true
378 value: >
379 {
380 "enableDhcpOnProvisioning" : true
381 }
382 requirements:
383 - service_instance:
384 node: onos_app#olt
385 relationship: tosca.relationships.BelongsToOne
386
387 dhcpl2relay-config-attr:
388 type: tosca.nodes.ServiceInstanceAttribute
389 properties:
390 name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay
391 value: >
392 {
393 "dhcpl2relay" : {
394 "useOltUplinkForServerPktInOut" : true
395 }
396 }
397 requirements:
398 - service_instance:
399 node: onos_app#dhcpl2relay
400 relationship: tosca.relationships.BelongsToOne
401
402 aaa-config-attr:
403 type: tosca.nodes.ServiceInstanceAttribute
404 properties:
405 name: /onos/v1/network/configuration/apps/org.opencord.aaa
406 value: >
407 {
408 "AAA" : {
409 "radiusConnectionType" : "socket",
410 "radiusHost" : "freeradius",
411 "radiusServerPort" : "1812",
412 "radiusSecret" : "SECRET"
413 }
414 }
415 requirements:
416 - service_instance:
417 node: onos_app#aaa
418 relationship: tosca.relationships.BelongsToOne
419{{- end -}}