blob: 3adabcd3f2eb8f8b4256b87c31e5d4618f831b8d [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
Scott Bakera08a2d72018-05-22 16:09:14 -0700147 service#openstack:
148 type: tosca.nodes.OpenStackService
149 properties:
150 name: "OpenStack"
151 auth_url: http://keystone.openstack.svc.cluster.local/v3
152 admin_user: {{ .keystoneAdminUser }}
153 admin_password: {{ .keystoneAdminPassword }}
154 admin_tenant: {{ .keystoneAdminTenant }}
155
Scott Baker4206a5f2019-02-28 17:07:04 -0800156 # TODO: deal with the lack of controller objects
157 # TODO: All of this probably ends up in OpenStack service after the refactor
158# {{ .cordSiteName }}_somedeployment_openstack:
159# type: tosca.nodes.Controller
160# properties:
161# name: {{ .cordSiteName }}_somedeployment_openstack
162# backend_type: OpenStack
163# version: Newton
164# auth_url: http://keystone.openstack.svc.cluster.local/v3
165# admin_user: {{ .keystoneAdminUser }}
166# admin_password: {{ .keystoneAdminPassword }}
167# admin_tenant: {{ .keystoneAdminTenant }}
168# domain: {{ .keystoneDomain }}
Andy Bavier43cdc662018-05-15 14:50:47 -0700169
Andy Bavier43cdc662018-05-15 14:50:47 -0700170{{- end -}}