blob: e39f9a4e0709560b7750dad65b45f67cb1e82171 [file] [log] [blame]
Andy Bavier43cdc662018-05-15 14:50:47 -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 "base-openstack.fixtureTosca" -}}
18tosca_definitions_version: tosca_simple_yaml_1_0
19
20imports:
21 - custom_types/deployment.yaml
22 - custom_types/site.yaml
23 - custom_types/networktemplate.yaml
24 - custom_types/network.yaml
25 - custom_types/networkslice.yaml
26 - custom_types/sitedeployment.yaml
27
28description: set up site and deployment and link them
29
30topology_template:
31 node_templates:
32
33 {{ .Values.cordSiteName }}:
34 type: tosca.nodes.Site
35 properties:
36 name: {{ .Values.cordSiteName }}
37 site_url: http://mysite.opencord.us/
38 hosts_nodes: true
39
Andy Bavier43cdc662018-05-15 14:50:47 -070040{{- end -}}
41
42{{- define "base-openstack.serviceGraphTosca" -}}
43tosca_definitions_version: tosca_simple_yaml_1_0
44
45imports:
46 - custom_types/onosapp.yaml
Matteo Scandolo979695d2018-06-08 17:47:01 -070047 - custom_types/onosservice.yaml
Andy Bavier8b945912018-06-12 16:10:04 -070048 - custom_types/servicedependency.yaml
Andy Bavier43cdc662018-05-15 14:50:47 -070049 - custom_types/servicegraphconstraint.yaml
Matteo Scandolo82096382018-06-12 15:07:05 -070050 - custom_types/servicedependency.yaml
Matteo Scandolo979695d2018-06-08 17:47:01 -070051 - custom_types/serviceinstance.yaml
Andy Bavier43cdc662018-05-15 14:50:47 -070052 - custom_types/serviceinstancelink.yaml
53 - custom_types/vtnservice.yaml
54
55description: Configures the base-openstack service graph
56
57topology_template:
58 node_templates:
59
60 service#vtn:
61 type: tosca.nodes.VTNService
62 properties:
63 name: vtn
64 must-exist: true
65 resync: false
66
Matteo Scandolo979695d2018-06-08 17:47:01 -070067 service#ONOS_CORD:
68 type: tosca.nodes.ONOSService
69 properties:
70 name: ONOS_CORD
71 must-exist: true
72
73 # NOTE this is defined in the onos-service TOSCA
74 onos_app#vtn:
Andy Bavier43cdc662018-05-15 14:50:47 -070075 type: tosca.nodes.ONOSApp
76 properties:
Matteo Scandolo979695d2018-06-08 17:47:01 -070077 name: vtn
Andy Bavier43cdc662018-05-15 14:50:47 -070078 must-exist: true
79
Matteo Scandolo979695d2018-06-08 17:47:01 -070080 # NOTE this is defined in the vtn-service TOSCA
81 vtn_service_instance:
82 type: tosca.nodes.ServiceInstance
83 properties:
84 name: VTN config
85 must-exist: true
86
87 onos_app#vtn_VTN_Service:
Andy Bavier43cdc662018-05-15 14:50:47 -070088 type: tosca.nodes.ServiceInstanceLink
89 requirements:
90 - provider_service_instance:
Matteo Scandolo979695d2018-06-08 17:47:01 -070091 node: onos_app#vtn
Andy Bavier43cdc662018-05-15 14:50:47 -070092 relationship: tosca.relationships.BelongsToOne
93 - subscriber_service:
94 node: service#vtn
95 relationship: tosca.relationships.BelongsToOne
Matteo Scandolo979695d2018-06-08 17:47:01 -070096
97 link#vtn_to_vtn-config:
98 type: tosca.nodes.ServiceInstanceLink
99 requirements:
100 - subscriber_service_instance:
101 node: vtn_service_instance
102 relationship: tosca.relationships.BelongsToOne
103 - provider_service_instance:
104 node: onos_app#vtn
105 relationship: tosca.relationships.BelongsToOne
106
107 service_dependency#onos-cord_vtn:
108 type: tosca.nodes.ServiceDependency
109 properties:
Scott Baker1d408032018-08-29 08:34:49 -0700110 connect_method: none
Matteo Scandolo979695d2018-06-08 17:47:01 -0700111 requirements:
112 - subscriber_service:
113 node: service#ONOS_CORD
114 relationship: tosca.relationships.BelongsToOne
115 - provider_service:
116 node: service#vtn
117 relationship: tosca.relationships.BelongsToOne
Andy Bavier43cdc662018-05-15 14:50:47 -0700118{{- end -}}
119
120{{- define "base-openstack.testTosca" -}}
121tosca_definitions_version: tosca_simple_yaml_1_0
122
123imports:
124 - custom_types/flavor.yaml
125 - custom_types/image.yaml
126 - custom_types/site.yaml
127 - custom_types/network.yaml
128 - custom_types/networkslice.yaml
129 - custom_types/slice.yaml
130
131description: for testing basic openstack functionality
132
133topology_template:
134 node_templates:
135
136 Ubuntu-14.04:
137 type: tosca.nodes.Image
138 properties:
139 name: "Ubuntu 14.04 64-bit"
140 disk_format: QCOW2
141 container_format: BARE
142 path: https://github.com/opencord/platform-install/releases/download/vms/trusty-server-cloudimg-amd64-disk1.img.20170201
143
144 {{ .Values.cordSiteName }}:
145 type: tosca.nodes.Site
146 properties:
147 name: {{ .Values.cordSiteName }}
148 must-exist: true
149
150# Define a test slice
151 {{ .Values.cordSiteName }}_test:
152 description: Test Slice
153 type: tosca.nodes.Slice
154 properties:
155 # network: noauto
156 name: {{ .Values.cordSiteName }}_test
157 requirements:
158 - site:
159 node: {{ .Values.cordSiteName }}
160 relationship: tosca.relationships.BelongsToOne
161 - default_image:
162 node: Ubuntu-14.04
163 relationship: tosca.relationships.BelongsToOne
164
165 management:
166 type: tosca.nodes.Network
167 properties:
168 name: management
169 must-exist: true
170
171# Connect test slice to management net
172 networkslice#management_to_{{ .Values.cordSiteName }}_test:
173 type: tosca.nodes.NetworkSlice
174 requirements:
175 - network:
176 node: management
177 relationship: tosca.relationships.BelongsToOne
178 - slice:
179 node: {{ .Values.cordSiteName }}_test
180 relationship: tosca.relationships.BelongsToOne
Andy Bavier6e6191a2018-05-22 14:53:10 -0700181{{- end -}}
182
183{{- define "base-openstack.computeNodeTosca" -}}
184tosca_definitions_version: tosca_simple_yaml_1_0
185
186imports:
187 - custom_types/deployment.yaml
188 - custom_types/node.yaml
189 - custom_types/site.yaml
190 - custom_types/sitedeployment.yaml
191
192description: Adds OpenStack compute nodes
193
194topology_template:
195 node_templates:
196
197# Site/Deployment, fully defined in deployment.yaml
198 site:
199 type: tosca.nodes.Site
200 properties:
201 name: {{ .Values.cordSiteName }}
202 must-exist: true
203
Andy Bavier6e6191a2018-05-22 14:53:10 -0700204 site_deployment:
205 type: tosca.nodes.SiteDeployment
206 requirements:
207 - site:
208 node: site
209 relationship: tosca.relationships.BelongsToOne
210 - deployment:
211 node: deployment
212 relationship: tosca.relationships.BelongsToOne
213
214# OpenStack compute nodes
215
216 {{- range .Values.computeNodes }}
217 {{ .name }}:
218 type: tosca.nodes.Node
219 properties:
220 name: {{ .name }}
221 bridgeId: {{ .bridgeId }}
222 dataPlaneIntf: {{ .dataPlaneIntf }}
223 dataPlaneIp: {{ .dataPlaneIp }}
224 requirements:
225 - site_deployment:
226 node: site_deployment
227 relationship: tosca.relationships.BelongsToOne
228 {{- end }}
229{{- end -}}