blob: 310a4d5a3bdc87002e54370694eb8222ed9a9625 [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 Scandolo7607b522018-08-09 17:03:58 -070017{{- define "att-workflow.basicFixturesTosca" -}}
Scott Bakerafff3082018-07-16 17:23:26 -070018tosca_definitions_version: tosca_simple_yaml_1_0
19description: Some basic fixtures
20imports:
Matteo Scandolo7607b522018-08-09 17:03:58 -070021 - custom_types/deployment.yaml
Scott Bakerafff3082018-07-16 17:23:26 -070022 - custom_types/networkparametertype.yaml
23 - custom_types/networktemplate.yaml
Matteo Scandolo7607b522018-08-09 17:03:58 -070024 - custom_types/siterole.yaml
Scott Bakerafff3082018-07-16 17:23:26 -070025topology_template:
26 node_templates:
27
28# -----------------------------------------------------------------------------
29# Network Parameter Types
30# -----------------------------------------------------------------------------
31 s_tag:
32 type: tosca.nodes.NetworkParameterType
33 properties:
34 name: s_tag
35 c_tag:
36 type: tosca.nodes.NetworkParameterType
37 properties:
38 name: c_tag
39 next_hop:
40 type: tosca.nodes.NetworkParameterType
41 properties:
42 name: next_hop
43 device:
44 type: tosca.nodes.NetworkParameterType
45 properties:
46 name: device
47 bridge:
48 type: tosca.nodes.NetworkParameterType
49 properties:
50 name: bridge
51 neutron_port_name:
52 type: tosca.nodes.NetworkParameterType
53 properties:
54 name: neutron_port_name
55
56# ----------------------------------------------------------------------------
57# Roles
58# ----------------------------------------------------------------------------
59 siterole#admin:
60 type: tosca.nodes.SiteRole
61 properties:
62 role: admin
63 siterole#pi:
64 type: tosca.nodes.SiteRole
65 properties:
66 role: pi
67 siterole#tech:
68 type: tosca.nodes.SiteRole
69 properties:
70 role: tech
Scott Bakerafff3082018-07-16 17:23:26 -070071
72# -----------------------------------------------------------------------------
73# Network Templates
74# -----------------------------------------------------------------------------
75 Private:
76 type: tosca.nodes.NetworkTemplate
77 properties:
78 name: Private
79 visibility: private
80 translation: none
81
82 Public shared IPv4:
83 type: tosca.nodes.NetworkTemplate
84 properties:
85 name: Public shared IPv4
86 visibility: private
87 translation: NAT
88 shared_network_name: nat-net
89
90 Public dedicated IPv4:
91 type: tosca.nodes.NetworkTemplate
92 properties:
93 name: Public dedicated IPv4
94 visibility: public
95 translation: none
96 shared_network_name: ext-net
97
98# -----------------------------------------------------------------------------
99# Deployment
100# -----------------------------------------------------------------------------
101 MyDeployment:
102 type: tosca.nodes.Deployment
103 properties:
104 name: MyDeployment
105{{- end -}}
106
107
Matteo Scandolo7607b522018-08-09 17:03:58 -0700108{{- define "att-workflow.serviceGraphTosca" -}}
Scott Bakerafff3082018-07-16 17:23:26 -0700109tosca_definitions_version: tosca_simple_yaml_1_0
110imports:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700111 - custom_types/attworkflowdriverservice.yaml
Scott Bakerafff3082018-07-16 17:23:26 -0700112 - custom_types/fabricservice.yaml
113 - custom_types/onosservice.yaml
114 - custom_types/rcordservice.yaml
115 - custom_types/voltservice.yaml
116 - custom_types/fabriccrossconnectservice.yaml
117 - custom_types/servicedependency.yaml
118 - custom_types/servicegraphconstraint.yaml
Matteo Scandolo7607b522018-08-09 17:03:58 -0700119description: att-workflow service graph
Scott Bakerafff3082018-07-16 17:23:26 -0700120topology_template:
121 node_templates:
122
123# These services must be defined before loading the graph
124
125 service#ONOS_Fabric:
126 type: tosca.nodes.ONOSService
127 properties:
128 name: ONOS_Fabric
129 must-exist: true
130
131 service#ONOS_VOLTHA:
132 type: tosca.nodes.ONOSService
133 properties:
134 name: ONOS_VOLTHA
135 must-exist: true
136
137 service#fabric:
138 type: tosca.nodes.FabricService
139 properties:
140 name: fabric
141 must-exist: true
142
143 service#rcord:
144 type: tosca.nodes.RCORDService
145 properties:
146 name: rcord
147 must-exist: true
148
149 service#volt:
150 type: tosca.nodes.VOLTService
151 properties:
152 name: volt
153 must-exist: true
154
155 service#fabric-crossconnect:
156 type: tosca.nodes.FabricCrossconnectService
157 properties:
158 name: fabric-crossconnect
159 must-exist: true
160
Matteo Scandolo7607b522018-08-09 17:03:58 -0700161 service#att-workflow-driver:
162 type: tosca.nodes.AttWorkflowDriverService
163 properties:
164 name: att-workflow-driver
165 must-exist: true
166
167# The att-workflow service graph
Scott Bakerafff3082018-07-16 17:23:26 -0700168
169 service_dependency#onos-fabric_fabric:
170 type: tosca.nodes.ServiceDependency
171 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700172 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700173 requirements:
174 - subscriber_service:
Scott Bakere9ae0482018-08-16 15:42:05 -0700175 node: service#fabric
Scott Bakerafff3082018-07-16 17:23:26 -0700176 relationship: tosca.relationships.BelongsToOne
177 - provider_service:
Scott Bakere9ae0482018-08-16 15:42:05 -0700178 node: service#ONOS_Fabric
Scott Bakerafff3082018-07-16 17:23:26 -0700179 relationship: tosca.relationships.BelongsToOne
180
181 service_dependency#rcord_volt:
182 type: tosca.nodes.ServiceDependency
183 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700184 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700185 requirements:
186 - subscriber_service:
187 node: service#rcord
188 relationship: tosca.relationships.BelongsToOne
189 - provider_service:
190 node: service#volt
191 relationship: tosca.relationships.BelongsToOne
192
193 service_dependency#onos_voltha_volt:
194 type: tosca.nodes.ServiceDependency
195 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700196 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700197 requirements:
198 - subscriber_service:
199 node: service#volt
200 relationship: tosca.relationships.BelongsToOne
201 - provider_service:
202 node: service#ONOS_VOLTHA
203 relationship: tosca.relationships.BelongsToOne
204
205 service_dependency#volt_fabric-crossconnect:
206 type: tosca.nodes.ServiceDependency
207 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700208 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700209 requirements:
210 - subscriber_service:
211 node: service#volt
212 relationship: tosca.relationships.BelongsToOne
213 - provider_service:
214 node: service#fabric-crossconnect
215 relationship: tosca.relationships.BelongsToOne
216
217 service_dependency#onos_fabric_fabric-crossconnect:
218 type: tosca.nodes.ServiceDependency
219 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700220 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700221 requirements:
222 - subscriber_service:
223 node: service#fabric-crossconnect
224 relationship: tosca.relationships.BelongsToOne
225 - provider_service:
226 node: service#ONOS_Fabric
227 relationship: tosca.relationships.BelongsToOne
228
Matteo Scandolo7607b522018-08-09 17:03:58 -0700229 service_dependency#workflow_volt:
230 type: tosca.nodes.ServiceDependency
231 properties:
232 connect_method: none
233 requirements:
234 - subscriber_service:
235 node: service#att-workflow-driver
236 relationship: tosca.relationships.BelongsToOne
237 - provider_service:
238 node: service#volt
239 relationship: tosca.relationships.BelongsToOne
240
Scott Bakerafff3082018-07-16 17:23:26 -0700241 constraints:
242 type: tosca.nodes.ServiceGraphConstraint
243 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700244 constraints: '[[null, "rcord", null], ["ONOS_VOLTHA", "volt", null], ["ONOS_Fabric", "fabric-crossconnect", "att-workflow-driver"], ["fabric", null, null]]'
Scott Bakerafff3082018-07-16 17:23:26 -0700245{{- end -}}
246