blob: c9985ae0ed6375560598205c60e334814f0ab6a5 [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
140 service#fabric:
141 type: tosca.nodes.FabricService
142 properties:
143 name: fabric
144 must-exist: true
145
146 service#rcord:
147 type: tosca.nodes.RCORDService
148 properties:
149 name: rcord
150 must-exist: true
151
152 service#vrouter:
153 type: tosca.nodes.VRouterService
154 properties:
155 name: vrouter
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#vsg-hw:
165 type: tosca.nodes.VSGHWService
166 properties:
167 name: vsg-hw
168 must-exist: true
169
170# The rcord-lite service graph
171
172 service_dependency#onos-fabric_fabric:
173 type: tosca.nodes.ServiceDependency
174 properties:
175 connect_method: None
176 requirements:
177 - subscriber_service:
178 node: service#ONOS_Fabric
179 relationship: tosca.relationships.BelongsToOne
180 - provider_service:
181 node: service#fabric
182 relationship: tosca.relationships.BelongsToOne
183
184 service_dependency#rcord_volt:
185 type: tosca.nodes.ServiceDependency
186 properties:
187 connect_method: None
188 requirements:
189 - subscriber_service:
190 node: service#rcord
191 relationship: tosca.relationships.BelongsToOne
192 - provider_service:
193 node: service#volt
194 relationship: tosca.relationships.BelongsToOne
195
196 service_dependency#fabric_vrouter:
197 type: tosca.nodes.ServiceDependency
198 properties:
199 connect_method: None
200 requirements:
201 - subscriber_service:
202 node: service#fabric
203 relationship: tosca.relationships.BelongsToOne
204 - provider_service:
205 node: service#vrouter
206 relationship: tosca.relationships.BelongsToOne
207
208 service_dependency#volt_vsg-hw:
209 type: tosca.nodes.ServiceDependency
210 properties:
211 connect_method: None
212 requirements:
213 - subscriber_service:
214 node: service#volt
215 relationship: tosca.relationships.BelongsToOne
216 - provider_service:
217 node: service#vsg-hw
218 relationship: tosca.relationships.BelongsToOne
219
220 service_dependency#onos_fabric_vsg-hw:
221 type: tosca.nodes.ServiceDependency
222 properties:
223 connect_method: None
224 requirements:
225 - subscriber_service:
226 node: service#vsg-hw
227 relationship: tosca.relationships.BelongsToOne
228 - provider_service:
229 node: service#ONOS_Fabric
230 relationship: tosca.relationships.BelongsToOne
231
232 constraints:
233 type: tosca.nodes.ServiceGraphConstraint
234 properties:
235 constraints: '[[null, "rcord"], [null, "volt"], ["ONOS_Fabric", "vsg-hw"], ["fabric", null], ["vrouter", null]]'
236{{- end -}}
237