blob: 4ecb462689a131e63ff6d2195730a10cdcad60fa [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
Andy Baviere3023282018-05-12 06:35:13 -070022 - custom_types/deployment.yaml
23topology_template:
24 node_templates:
25
Andy Baviere3023282018-05-12 06:35:13 -070026# ----------------------------------------------------------------------------
27# Roles
28# ----------------------------------------------------------------------------
29 siterole#admin:
30 type: tosca.nodes.SiteRole
31 properties:
32 role: admin
33 siterole#pi:
34 type: tosca.nodes.SiteRole
35 properties:
36 role: pi
37 siterole#tech:
38 type: tosca.nodes.SiteRole
39 properties:
40 role: tech
Andy Baviere3023282018-05-12 06:35:13 -070041
42# -----------------------------------------------------------------------------
43# Deployment
44# -----------------------------------------------------------------------------
45 MyDeployment:
46 type: tosca.nodes.Deployment
47 properties:
48 name: MyDeployment
49{{- end -}}
50
51
52{{- define "rcord-lite.serviceGraphTosca" -}}
53tosca_definitions_version: tosca_simple_yaml_1_0
54imports:
55 - custom_types/fabricservice.yaml
56 - custom_types/onosservice.yaml
57 - custom_types/rcordservice.yaml
58 - custom_types/vrouterservice.yaml
59 - custom_types/voltservice.yaml
60 - custom_types/vsghwservice.yaml
61 - custom_types/servicedependency.yaml
62 - custom_types/servicegraphconstraint.yaml
63description: rcord-lite service graph
64topology_template:
65 node_templates:
66
67# These services must be defined before loading the graph
68
69 service#ONOS_Fabric:
70 type: tosca.nodes.ONOSService
71 properties:
72 name: ONOS_Fabric
73 must-exist: true
74
Matteo Scandoloa772b3c2018-06-11 17:38:42 -070075 service#ONOS_VOLTHA:
76 type: tosca.nodes.ONOSService
77 properties:
78 name: ONOS_VOLTHA
79 must-exist: true
80
Andy Baviere3023282018-05-12 06:35:13 -070081 service#fabric:
82 type: tosca.nodes.FabricService
83 properties:
84 name: fabric
85 must-exist: true
86
87 service#rcord:
88 type: tosca.nodes.RCORDService
89 properties:
90 name: rcord
91 must-exist: true
92
93 service#vrouter:
94 type: tosca.nodes.VRouterService
95 properties:
96 name: vrouter
97 must-exist: true
98
99 service#volt:
100 type: tosca.nodes.VOLTService
101 properties:
102 name: volt
103 must-exist: true
104
105 service#vsg-hw:
106 type: tosca.nodes.VSGHWService
107 properties:
108 name: vsg-hw
109 must-exist: true
110
111# The rcord-lite service graph
112
113 service_dependency#onos-fabric_fabric:
114 type: tosca.nodes.ServiceDependency
115 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700116 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700117 requirements:
118 - subscriber_service:
119 node: service#ONOS_Fabric
120 relationship: tosca.relationships.BelongsToOne
121 - provider_service:
122 node: service#fabric
123 relationship: tosca.relationships.BelongsToOne
124
125 service_dependency#rcord_volt:
126 type: tosca.nodes.ServiceDependency
127 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700128 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700129 requirements:
130 - subscriber_service:
131 node: service#rcord
132 relationship: tosca.relationships.BelongsToOne
133 - provider_service:
134 node: service#volt
135 relationship: tosca.relationships.BelongsToOne
136
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700137 service_dependency#onos_voltha_volt:
138 type: tosca.nodes.ServiceDependency
139 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700140 connect_method: none
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700141 requirements:
142 - subscriber_service:
143 node: service#volt
144 relationship: tosca.relationships.BelongsToOne
145 - provider_service:
146 node: service#ONOS_VOLTHA
147 relationship: tosca.relationships.BelongsToOne
148
Andy Baviere3023282018-05-12 06:35:13 -0700149 service_dependency#fabric_vrouter:
150 type: tosca.nodes.ServiceDependency
151 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700152 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700153 requirements:
154 - subscriber_service:
155 node: service#fabric
156 relationship: tosca.relationships.BelongsToOne
157 - provider_service:
158 node: service#vrouter
159 relationship: tosca.relationships.BelongsToOne
160
161 service_dependency#volt_vsg-hw:
162 type: tosca.nodes.ServiceDependency
163 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700164 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700165 requirements:
166 - subscriber_service:
167 node: service#volt
168 relationship: tosca.relationships.BelongsToOne
169 - provider_service:
170 node: service#vsg-hw
171 relationship: tosca.relationships.BelongsToOne
172
173 service_dependency#onos_fabric_vsg-hw:
174 type: tosca.nodes.ServiceDependency
175 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700176 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700177 requirements:
178 - subscriber_service:
179 node: service#vsg-hw
180 relationship: tosca.relationships.BelongsToOne
181 - provider_service:
182 node: service#ONOS_Fabric
183 relationship: tosca.relationships.BelongsToOne
184
185 constraints:
186 type: tosca.nodes.ServiceGraphConstraint
187 properties:
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700188 constraints: '[[null, "rcord"], ["ONOS_VOLTHA", "volt"], ["ONOS_Fabric", "vsg-hw"], ["fabric", null], ["vrouter", null]]'
Andy Baviere3023282018-05-12 06:35:13 -0700189{{- end -}}
190