blob: 9c7b03ccbaca3af4e475da69d0109091473f145f [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:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080022 - custom_types/networktemplate.yaml
23 - custom_types/network.yaml
24 - custom_types/slice.yaml
25 - custom_types/site.yaml
Zack Williams682450e2016-11-19 09:04:41 -070026
27description: management network config, generated by platform-install
28
29topology_template:
30 node_templates:
31
32# site, fully created in deployment.yaml
33 {{ site_name }}:
34 type: tosca.nodes.Site
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080035 properties:
36 name: {{ site_name }}
Zack Williams682450e2016-11-19 09:04:41 -070037
38# management network
39 management_template:
40 type: tosca.nodes.NetworkTemplate
41 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080042 name: management_template
Zack Williams682450e2016-11-19 09:04:41 -070043 visibility: private
44 translation: none
45 vtn_kind: MANAGEMENT_LOCAL
46
Zack Williams682450e2016-11-19 09:04:41 -070047 management:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080048 type: tosca.nodes.Network
Zack Williams682450e2016-11-19 09:04:41 -070049 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080050 name: management
51 # ip_version: 4
52 subnet: {{ management_network_cidr }}
53 permit_all_slices: true
Zack Williams682450e2016-11-19 09:04:41 -070054 requirements:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080055 - template:
Zack Williams682450e2016-11-19 09:04:41 -070056 node: management_template
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080057 relationship: tosca.relationships.BelongsToOne
Zack Williams682450e2016-11-19 09:04:41 -070058 - owner:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080059 node: slice#{{ site_name }}_management
60 relationship: tosca.relationships.BelongsToOne
Zack Williams682450e2016-11-19 09:04:41 -070061
Zack Williamsa2763112017-01-03 11:38:38 -070062{% if use_management_hosts %}
63 management_hosts_template:
64 type: tosca.nodes.NetworkTemplate
65 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080066 name: management_hosts_template
Zack Williamsa2763112017-01-03 11:38:38 -070067 visibility: private
68 translation: none
69 vtn_kind: MANAGEMENT_HOST
70
71 management_hosts:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080072 type: tosca.nodes.Network
Zack Williamsa2763112017-01-03 11:38:38 -070073 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080074 # ip_version: 4
75 subnet: {{ management_hosts_net_cidr }}
Zack Williamsa2763112017-01-03 11:38:38 -070076 start_ip: {{ management_hosts_net_range_xos_low }}
77 end_ip: {{ management_hosts_net_range_xos_high }}
78 requirements:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080079 - template:
Zack Williamsa2763112017-01-03 11:38:38 -070080 node: management_hosts_template
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080081 relationship: tosca.relationships.BelongsToOne
Zack Williamsa2763112017-01-03 11:38:38 -070082 - owner:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080083 node: slice#{{ site_name }}_management
84 relationship: tosca.relationships.BelongsToOne
Zack Williamsa2763112017-01-03 11:38:38 -070085{% endif %}
86
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080087 slice#{{ site_name }}_management:
Zack Williams682450e2016-11-19 09:04:41 -070088 description: This slice exists solely to own the management network
89 type: tosca.nodes.Slice
90 properties:
91 network: noauto
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080092 name: {{ site_name }}_management
Zack Williams682450e2016-11-19 09:04:41 -070093 requirements:
94 - site:
95 node: {{ site_name }}
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080096 relationship: tosca.relationships.BelongsToOne
Zack Williams682450e2016-11-19 09:04:41 -070097