blob: fef0364f626ac2be233a29ea670d5e9442c856ae [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*/}}
17{{- define "rcord-lite.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 "rcord-lite.serviceGraphTosca" -}}
118tosca_definitions_version: tosca_simple_yaml_1_0
119imports:
120 - custom_types/fabricservice.yaml
121 - custom_types/onosservice.yaml
122 - custom_types/rcordservice.yaml
123 - custom_types/vrouterservice.yaml
124 - custom_types/voltservice.yaml
125 - custom_types/vsghwservice.yaml
126 - custom_types/servicedependency.yaml
127 - custom_types/servicegraphconstraint.yaml
128description: rcord-lite 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
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700140 service#ONOS_VOLTHA:
141 type: tosca.nodes.ONOSService
142 properties:
143 name: ONOS_VOLTHA
144 must-exist: true
145
Andy Baviere3023282018-05-12 06:35:13 -0700146 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#vrouter:
159 type: tosca.nodes.VRouterService
160 properties:
161 name: vrouter
162 must-exist: true
163
164 service#volt:
165 type: tosca.nodes.VOLTService
166 properties:
167 name: volt
168 must-exist: true
169
170 service#vsg-hw:
171 type: tosca.nodes.VSGHWService
172 properties:
173 name: vsg-hw
174 must-exist: true
175
176# The rcord-lite service graph
177
178 service_dependency#onos-fabric_fabric:
179 type: tosca.nodes.ServiceDependency
180 properties:
181 connect_method: None
182 requirements:
183 - subscriber_service:
184 node: service#ONOS_Fabric
185 relationship: tosca.relationships.BelongsToOne
186 - provider_service:
187 node: service#fabric
188 relationship: tosca.relationships.BelongsToOne
189
190 service_dependency#rcord_volt:
191 type: tosca.nodes.ServiceDependency
192 properties:
193 connect_method: None
194 requirements:
195 - subscriber_service:
196 node: service#rcord
197 relationship: tosca.relationships.BelongsToOne
198 - provider_service:
199 node: service#volt
200 relationship: tosca.relationships.BelongsToOne
201
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700202 service_dependency#onos_voltha_volt:
203 type: tosca.nodes.ServiceDependency
204 properties:
205 connect_method: None
206 requirements:
207 - subscriber_service:
208 node: service#volt
209 relationship: tosca.relationships.BelongsToOne
210 - provider_service:
211 node: service#ONOS_VOLTHA
212 relationship: tosca.relationships.BelongsToOne
213
Andy Baviere3023282018-05-12 06:35:13 -0700214 service_dependency#fabric_vrouter:
215 type: tosca.nodes.ServiceDependency
216 properties:
217 connect_method: None
218 requirements:
219 - subscriber_service:
220 node: service#fabric
221 relationship: tosca.relationships.BelongsToOne
222 - provider_service:
223 node: service#vrouter
224 relationship: tosca.relationships.BelongsToOne
225
226 service_dependency#volt_vsg-hw:
227 type: tosca.nodes.ServiceDependency
228 properties:
229 connect_method: None
230 requirements:
231 - subscriber_service:
232 node: service#volt
233 relationship: tosca.relationships.BelongsToOne
234 - provider_service:
235 node: service#vsg-hw
236 relationship: tosca.relationships.BelongsToOne
237
238 service_dependency#onos_fabric_vsg-hw:
239 type: tosca.nodes.ServiceDependency
240 properties:
241 connect_method: None
242 requirements:
243 - subscriber_service:
244 node: service#vsg-hw
245 relationship: tosca.relationships.BelongsToOne
246 - provider_service:
247 node: service#ONOS_Fabric
248 relationship: tosca.relationships.BelongsToOne
249
250 constraints:
251 type: tosca.nodes.ServiceGraphConstraint
252 properties:
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700253 constraints: '[[null, "rcord"], ["ONOS_VOLTHA", "volt"], ["ONOS_Fabric", "vsg-hw"], ["fabric", null], ["vrouter", null]]'
Andy Baviere3023282018-05-12 06:35:13 -0700254{{- end -}}
255