blob: ad56d0926868c97c6301725df646e92966ce88b5 [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 "openstack.flavorTosca" -}}
18tosca_definitions_version: tosca_simple_yaml_1_0
19
20imports:
21 - custom_types/flavor.yaml
22
23description: openstack flavor models
24
25topology_template:
26 node_templates:
27
28 m1.tiny:
29 type: tosca.nodes.Flavor
30 properties:
31 name: m1.tiny
Scott Baker1d408032018-08-29 08:34:49 -070032 flavor: m1.tiny
Andy Bavier43cdc662018-05-15 14:50:47 -070033
34 m1.small:
35 type: tosca.nodes.Flavor
36 properties:
37 name: m1.small
Scott Baker1d408032018-08-29 08:34:49 -070038 flavor: m1.small
Andy Bavier43cdc662018-05-15 14:50:47 -070039
40 m1.medium:
41 type: tosca.nodes.Flavor
42 properties:
43 name: m1.medium
Scott Baker1d408032018-08-29 08:34:49 -070044 flavor: m1.medium
Andy Bavier43cdc662018-05-15 14:50:47 -070045
46 m1.large:
47 type: tosca.nodes.Flavor
48 properties:
49 name: m1.large
Scott Baker1d408032018-08-29 08:34:49 -070050 flavor: m1.large
Andy Bavier43cdc662018-05-15 14:50:47 -070051
52 m1.xlarge:
53 type: tosca.nodes.Flavor
54 properties:
55 name: m1.xlarge
Scott Baker1d408032018-08-29 08:34:49 -070056 flavor: m1.xlarge
Andy Bavier43cdc662018-05-15 14:50:47 -070057{{- end -}}
58
59{{- define "openstack.networkTosca" -}}
60tosca_definitions_version: tosca_simple_yaml_1_0
61
62imports:
63 - custom_types/network.yaml
64 - custom_types/networktemplate.yaml
65 - custom_types/site.yaml
66 - custom_types/slice.yaml
67
68description: openstack flavor models
69
70topology_template:
71 node_templates:
72
73 {{ .cordSiteName }}:
74 type: tosca.nodes.Site
75 properties:
76 name: {{ .cordSiteName }}
77 must-exist: true
78
79# For private networks (e.g., per-slice)
80 private_template:
81 type: tosca.nodes.NetworkTemplate
82 properties:
83 name: Private
84 visibility: private
85 translation: none
86 vtn_kind: PRIVATE
87
88# management (vtn: MANAGEMENT_LOCAL) network
89 management_template:
90 type: tosca.nodes.NetworkTemplate
91 properties:
92 name: management_template
93 visibility: private
94 translation: none
95 vtn_kind: MANAGEMENT_LOCAL
96
97 management:
98 type: tosca.nodes.Network
99 properties:
100 name: management
101 # ip_version: 4
102 subnet: 172.27.0.0/24
103 permit_all_slices: true
104 requirements:
105 - template:
106 node: management_template
107 relationship: tosca.relationships.BelongsToOne
108 - owner:
109 node: slice#{{ .cordSiteName }}_management
110 relationship: tosca.relationships.BelongsToOne
111
112# Slice to own management networks
113 slice#{{ .cordSiteName }}_management:
114 description: This slice exists solely to own the management network(s)
115 type: tosca.nodes.Slice
116 properties:
117 network: noauto
118 name: {{ .cordSiteName }}_management
119 requirements:
120 - site:
121 node: {{ .cordSiteName }}
122 relationship: tosca.relationships.BelongsToOne
123{{- end -}}
124
125{{- define "openstack.controllerTosca" -}}
126tosca_definitions_version: tosca_simple_yaml_1_0
127
128imports:
129 - custom_types/controller.yaml
130 - custom_types/controllersite.yaml
131 - custom_types/deployment.yaml
132 - custom_types/site.yaml
133 - custom_types/sitedeployment.yaml
Scott Bakera08a2d72018-05-22 16:09:14 -0700134 - custom_types/openstackservice.yaml
Andy Bavier43cdc662018-05-15 14:50:47 -0700135
136description: openstack controller models
137
138topology_template:
139 node_templates:
140
141 {{ .cordSiteName }}:
142 type: tosca.nodes.Site
143 properties:
144 name: {{ .cordSiteName }}
145 must-exist: true
146
147 {{ .cordDeploymentName }}:
148 type: tosca.nodes.Deployment
149 properties:
150 name: {{ .cordDeploymentName }}
151 must-exist: true
152
Scott Bakera08a2d72018-05-22 16:09:14 -0700153 service#openstack:
154 type: tosca.nodes.OpenStackService
155 properties:
156 name: "OpenStack"
157 auth_url: http://keystone.openstack.svc.cluster.local/v3
158 admin_user: {{ .keystoneAdminUser }}
159 admin_password: {{ .keystoneAdminPassword }}
160 admin_tenant: {{ .keystoneAdminTenant }}
161
Andy Bavier43cdc662018-05-15 14:50:47 -0700162 {{ .cordSiteName }}_{{ .cordDeploymentName }}_openstack:
163 type: tosca.nodes.Controller
164 requirements:
165 - deployment:
166 node: {{ .cordDeploymentName }}
167 relationship: tosca.relationships.BelongsToOne
168 properties:
169 name: {{ .cordSiteName }}_{{ .cordDeploymentName }}_openstack
170 backend_type: OpenStack
171 version: Newton
172 auth_url: http://keystone.openstack.svc.cluster.local/v3
173 admin_user: {{ .keystoneAdminUser }}
174 admin_password: {{ .keystoneAdminPassword }}
175 admin_tenant: {{ .keystoneAdminTenant }}
176 domain: {{ .keystoneDomain }}
177
178 {{ .cordSiteName }}_deployment_{{ .cordDeploymentName }}:
179 type: tosca.nodes.SiteDeployment
180 requirements:
181 - site:
182 node: {{ .cordSiteName }}
183 relationship: tosca.relationships.BelongsToOne
184 - deployment:
185 node: {{ .cordDeploymentName }}
186 relationship: tosca.relationships.BelongsToOne
187 - controller:
188 node: {{ .cordSiteName }}_{{ .cordDeploymentName }}_openstack
189 relationship: tosca.relationships.BelongsToOne
190
191 {{ .cordSiteName }}_openstack_controller:
192 type: tosca.nodes.ControllerSite
193 requirements:
194 - site:
195 node: {{ .cordSiteName }}
196 relationship: tosca.relationships.BelongsToOne
197 - controller:
198 node: {{ .cordSiteName }}_{{ .cordDeploymentName }}_openstack
199 relationship: tosca.relationships.BelongsToOne
200{{- end -}}