blob: ac429ffe2666ed498cb83e042d3e80a3d4ddd0fb [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
40 {{ .Values.cordDeploymentName }}:
41 type: tosca.nodes.Deployment
42 properties:
43 name: {{ .Values.cordDeploymentName }}
44{{- end -}}
45
46{{- define "base-openstack.serviceGraphTosca" -}}
47tosca_definitions_version: tosca_simple_yaml_1_0
48
49imports:
50 - custom_types/onosapp.yaml
51 - custom_types/servicegraphconstraint.yaml
52 - 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
67 VTN_ONOS_app:
68 type: tosca.nodes.ONOSApp
69 properties:
70 name: VTN_ONOS_app
71 must-exist: true
72
73 VTN_ONOS_app_VTN_Service:
74 type: tosca.nodes.ServiceInstanceLink
75 requirements:
76 - provider_service_instance:
77 node: VTN_ONOS_app
78 relationship: tosca.relationships.BelongsToOne
79 - subscriber_service:
80 node: service#vtn
81 relationship: tosca.relationships.BelongsToOne
82
83 constraints:
84 type: tosca.nodes.ServiceGraphConstraint
85 properties:
86 constraints: '[]'
87{{- end -}}
88
89{{- define "base-openstack.testTosca" -}}
90tosca_definitions_version: tosca_simple_yaml_1_0
91
92imports:
93 - custom_types/flavor.yaml
94 - custom_types/image.yaml
95 - custom_types/site.yaml
96 - custom_types/network.yaml
97 - custom_types/networkslice.yaml
98 - custom_types/slice.yaml
99
100description: for testing basic openstack functionality
101
102topology_template:
103 node_templates:
104
105 Ubuntu-14.04:
106 type: tosca.nodes.Image
107 properties:
108 name: "Ubuntu 14.04 64-bit"
109 disk_format: QCOW2
110 container_format: BARE
111 path: https://github.com/opencord/platform-install/releases/download/vms/trusty-server-cloudimg-amd64-disk1.img.20170201
112
113 {{ .Values.cordSiteName }}:
114 type: tosca.nodes.Site
115 properties:
116 name: {{ .Values.cordSiteName }}
117 must-exist: true
118
119# Define a test slice
120 {{ .Values.cordSiteName }}_test:
121 description: Test Slice
122 type: tosca.nodes.Slice
123 properties:
124 # network: noauto
125 name: {{ .Values.cordSiteName }}_test
126 requirements:
127 - site:
128 node: {{ .Values.cordSiteName }}
129 relationship: tosca.relationships.BelongsToOne
130 - default_image:
131 node: Ubuntu-14.04
132 relationship: tosca.relationships.BelongsToOne
133
134 management:
135 type: tosca.nodes.Network
136 properties:
137 name: management
138 must-exist: true
139
140# Connect test slice to management net
141 networkslice#management_to_{{ .Values.cordSiteName }}_test:
142 type: tosca.nodes.NetworkSlice
143 requirements:
144 - network:
145 node: management
146 relationship: tosca.relationships.BelongsToOne
147 - slice:
148 node: {{ .Values.cordSiteName }}_test
149 relationship: tosca.relationships.BelongsToOne
Andy Bavier6e6191a2018-05-22 14:53:10 -0700150{{- end -}}
151
152{{- define "base-openstack.computeNodeTosca" -}}
153tosca_definitions_version: tosca_simple_yaml_1_0
154
155imports:
156 - custom_types/deployment.yaml
157 - custom_types/node.yaml
158 - custom_types/site.yaml
159 - custom_types/sitedeployment.yaml
160
161description: Adds OpenStack compute nodes
162
163topology_template:
164 node_templates:
165
166# Site/Deployment, fully defined in deployment.yaml
167 site:
168 type: tosca.nodes.Site
169 properties:
170 name: {{ .Values.cordSiteName }}
171 must-exist: true
172
173 deployment:
174 type: tosca.nodes.Deployment
175 properties:
176 name: {{ .Values.cordDeploymentName }}
177 must-exist: true
178
179 site_deployment:
180 type: tosca.nodes.SiteDeployment
181 requirements:
182 - site:
183 node: site
184 relationship: tosca.relationships.BelongsToOne
185 - deployment:
186 node: deployment
187 relationship: tosca.relationships.BelongsToOne
188
189# OpenStack compute nodes
190
191 {{- range .Values.computeNodes }}
192 {{ .name }}:
193 type: tosca.nodes.Node
194 properties:
195 name: {{ .name }}
196 bridgeId: {{ .bridgeId }}
197 dataPlaneIntf: {{ .dataPlaneIntf }}
198 dataPlaneIp: {{ .dataPlaneIp }}
199 requirements:
200 - site_deployment:
201 node: site_deployment
202 relationship: tosca.relationships.BelongsToOne
203 {{- end }}
204{{- end -}}