blob: 1c7a41b460ab181b07d270e7a719df9c47515eb3 [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
2{#
3Copyright 2017-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
18
Zack Williams682450e2016-11-19 09:04:41 -070019tosca_definitions_version: tosca_simple_yaml_1_0
20
21imports:
22 - custom_types/xos.yaml
23
24description: deployment config, generated by platform-install
25
26topology_template:
27 node_templates:
28
29# Flavors
30
31{% for flavor in deployment_flavors %}
32 {{ flavor }}:
33 type: tosca.nodes.Flavor
34
35{% endfor %}
36
37# Deployment
38 {{ deployment_type }}:
39 type: tosca.nodes.Deployment
40 requirements:
41{% for flavor in deployment_flavors %}
Zack Williams1396aa32017-06-06 10:28:29 -070042 - {{ flavor }}:
43 node: {{ flavor }}
44 relationship: tosca.relationships.SupportsFlavor
Zack Williams682450e2016-11-19 09:04:41 -070045
46{% endfor %}
47
48# Site
49 {{ site_name }}:
50 type: tosca.nodes.Site
51 properties:
Zack Williams1396aa32017-06-06 10:28:29 -070052 display_name: {{ site_humanname }}
53 site_url: http://{{ site_name }}.opencloud.us/
54 hosts_nodes: true
Zack Williams682450e2016-11-19 09:04:41 -070055 requirements:
56 - deployment:
57 node: {{ deployment_type }}
58 relationship: tosca.relationships.MemberOfDeployment
59
60# Attach the Tenant view to the deployment
61 Tenant:
62 type: tosca.nodes.DashboardView
63 properties:
Zack Williams1396aa32017-06-06 10:28:29 -070064 no-create: true
65 no-delete: true
Zack Williams682450e2016-11-19 09:04:41 -070066 requirements:
Zack Williams1396aa32017-06-06 10:28:29 -070067 - deployment:
68 node: {{ deployment_type }}
69 relationship: tosca.relationships.SupportsDeployment
Zack Williams682450e2016-11-19 09:04:41 -070070
71# XOS Users
Zack Williamsa2763112017-01-03 11:38:38 -070072# Default admin user account
73 {{ xos_admin_user }}:
74 type: tosca.nodes.User
75 properties:
76 password: {{ xos_admin_pass }}
77 firstname: {{ xos_admin_first }}
78 lastname: {{ xos_admin_last }}
79 is_admin: True
80 requirements:
81 - site:
82 node: {{ site_name }}
83 relationship: tosca.relationships.MemberOfSite
84 - tenant_dashboard:
Zack Williams1396aa32017-06-06 10:28:29 -070085 node: Tenant
86 relationship: tosca.relationships.UsesDashboard
Zack Williamsa2763112017-01-03 11:38:38 -070087
88# All other users
Zack Williams682450e2016-11-19 09:04:41 -070089{% for user in xos_users %}
90 {{ user.email }}:
91 type: tosca.nodes.User
92 properties:
93 password: {{ user.password }}
94 firstname: {{ user.first | default(user.email) }}
95 lastname: {{ user.last | default("unknown") }}
96 is_admin: {{ user.admin | default("false") }}
97 requirements:
98 - site:
99 node: {{ site_name }}
100 relationship: tosca.relationships.MemberOfSite
101 - tenant_dashboard:
Zack Williams1396aa32017-06-06 10:28:29 -0700102 node: Tenant
103 relationship: tosca.relationships.UsesDashboard
Zack Williams682450e2016-11-19 09:04:41 -0700104
105{% endfor %}
106