blob: a2fdd948a683da9831ed177b6921592f074f5dc9 [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
32
33 m1.small:
34 type: tosca.nodes.Flavor
35 properties:
36 name: m1.small
37
38 m1.medium:
39 type: tosca.nodes.Flavor
40 properties:
41 name: m1.medium
42
43 m1.large:
44 type: tosca.nodes.Flavor
45 properties:
46 name: m1.large
47
48 m1.xlarge:
49 type: tosca.nodes.Flavor
50 properties:
51 name: m1.xlarge
52{{- end -}}
53
54{{- define "openstack.networkTosca" -}}
55tosca_definitions_version: tosca_simple_yaml_1_0
56
57imports:
58 - custom_types/network.yaml
59 - custom_types/networktemplate.yaml
60 - custom_types/site.yaml
61 - custom_types/slice.yaml
62
63description: openstack flavor models
64
65topology_template:
66 node_templates:
67
68 {{ .cordSiteName }}:
69 type: tosca.nodes.Site
70 properties:
71 name: {{ .cordSiteName }}
72 must-exist: true
73
74# For private networks (e.g., per-slice)
75 private_template:
76 type: tosca.nodes.NetworkTemplate
77 properties:
78 name: Private
79 visibility: private
80 translation: none
81 vtn_kind: PRIVATE
82
83# management (vtn: MANAGEMENT_LOCAL) network
84 management_template:
85 type: tosca.nodes.NetworkTemplate
86 properties:
87 name: management_template
88 visibility: private
89 translation: none
90 vtn_kind: MANAGEMENT_LOCAL
91
92 management:
93 type: tosca.nodes.Network
94 properties:
95 name: management
96 # ip_version: 4
97 subnet: 172.27.0.0/24
98 permit_all_slices: true
99 requirements:
100 - template:
101 node: management_template
102 relationship: tosca.relationships.BelongsToOne
103 - owner:
104 node: slice#{{ .cordSiteName }}_management
105 relationship: tosca.relationships.BelongsToOne
106
107# Slice to own management networks
108 slice#{{ .cordSiteName }}_management:
109 description: This slice exists solely to own the management network(s)
110 type: tosca.nodes.Slice
111 properties:
112 network: noauto
113 name: {{ .cordSiteName }}_management
114 requirements:
115 - site:
116 node: {{ .cordSiteName }}
117 relationship: tosca.relationships.BelongsToOne
118{{- end -}}
119
120{{- define "openstack.controllerTosca" -}}
121tosca_definitions_version: tosca_simple_yaml_1_0
122
123imports:
124 - custom_types/controller.yaml
125 - custom_types/controllersite.yaml
126 - custom_types/deployment.yaml
127 - custom_types/site.yaml
128 - custom_types/sitedeployment.yaml
129
130description: openstack controller models
131
132topology_template:
133 node_templates:
134
135 {{ .cordSiteName }}:
136 type: tosca.nodes.Site
137 properties:
138 name: {{ .cordSiteName }}
139 must-exist: true
140
141 {{ .cordDeploymentName }}:
142 type: tosca.nodes.Deployment
143 properties:
144 name: {{ .cordDeploymentName }}
145 must-exist: true
146
147 {{ .cordSiteName }}_{{ .cordDeploymentName }}_openstack:
148 type: tosca.nodes.Controller
149 requirements:
150 - deployment:
151 node: {{ .cordDeploymentName }}
152 relationship: tosca.relationships.BelongsToOne
153 properties:
154 name: {{ .cordSiteName }}_{{ .cordDeploymentName }}_openstack
155 backend_type: OpenStack
156 version: Newton
157 auth_url: http://keystone.openstack.svc.cluster.local/v3
158 admin_user: {{ .keystoneAdminUser }}
159 admin_password: {{ .keystoneAdminPassword }}
160 admin_tenant: {{ .keystoneAdminTenant }}
161 domain: {{ .keystoneDomain }}
162
163 {{ .cordSiteName }}_deployment_{{ .cordDeploymentName }}:
164 type: tosca.nodes.SiteDeployment
165 requirements:
166 - site:
167 node: {{ .cordSiteName }}
168 relationship: tosca.relationships.BelongsToOne
169 - deployment:
170 node: {{ .cordDeploymentName }}
171 relationship: tosca.relationships.BelongsToOne
172 - controller:
173 node: {{ .cordSiteName }}_{{ .cordDeploymentName }}_openstack
174 relationship: tosca.relationships.BelongsToOne
175
176 {{ .cordSiteName }}_openstack_controller:
177 type: tosca.nodes.ControllerSite
178 requirements:
179 - site:
180 node: {{ .cordSiteName }}
181 relationship: tosca.relationships.BelongsToOne
182 - controller:
183 node: {{ .cordSiteName }}_{{ .cordDeploymentName }}_openstack
184 relationship: tosca.relationships.BelongsToOne
185{{- end -}}