Andy Bavier | 01685f8 | 2017-12-21 14:06:54 -0700 | [diff] [blame] | 1 | |
| 2 | {# |
| 3 | Copyright 2017-present Open Networking Foundation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | #} |
| 17 | |
| 18 | |
| 19 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 20 | |
| 21 | imports: |
| 22 | - custom_types/networktemplate.yaml |
| 23 | - custom_types/network.yaml |
| 24 | - custom_types/slice.yaml |
| 25 | - custom_types/site.yaml |
| 26 | |
Zack Williams | 4a830ed | 2018-01-18 09:55:27 -0700 | [diff] [blame] | 27 | description: management network config, generated by ecord profile |
Andy Bavier | 01685f8 | 2017-12-21 14:06:54 -0700 | [diff] [blame] | 28 | |
| 29 | topology_template: |
| 30 | node_templates: |
| 31 | |
| 32 | # site, fully created in deployment.yaml |
| 33 | {{ site_name }}: |
| 34 | type: tosca.nodes.Site |
| 35 | properties: |
| 36 | name: {{ site_name }} |
| 37 | |
Zack Williams | 4a830ed | 2018-01-18 09:55:27 -0700 | [diff] [blame] | 38 | # management (vtn: MANAGEMENT_LOCAL) network |
Andy Bavier | 01685f8 | 2017-12-21 14:06:54 -0700 | [diff] [blame] | 39 | management_template: |
| 40 | type: tosca.nodes.NetworkTemplate |
| 41 | properties: |
| 42 | name: management_template |
| 43 | visibility: private |
| 44 | translation: none |
| 45 | vtn_kind: MANAGEMENT_LOCAL |
| 46 | |
| 47 | management: |
| 48 | type: tosca.nodes.Network |
| 49 | properties: |
| 50 | name: management |
| 51 | # ip_version: 4 |
Zack Williams | 4a830ed | 2018-01-18 09:55:27 -0700 | [diff] [blame] | 52 | subnet: {{ vtn_net_management_local_cidr }} |
Andy Bavier | 01685f8 | 2017-12-21 14:06:54 -0700 | [diff] [blame] | 53 | permit_all_slices: true |
| 54 | requirements: |
| 55 | - template: |
| 56 | node: management_template |
| 57 | relationship: tosca.relationships.BelongsToOne |
| 58 | - owner: |
| 59 | node: slice#{{ site_name }}_management |
| 60 | relationship: tosca.relationships.BelongsToOne |
| 61 | |
Zack Williams | 4a830ed | 2018-01-18 09:55:27 -0700 | [diff] [blame] | 62 | {% if use_vtn_net_management_host %} |
| 63 | # management_host (vtn: MANAGEMENT_HOST) network |
| 64 | management_host_template: |
Andy Bavier | 01685f8 | 2017-12-21 14:06:54 -0700 | [diff] [blame] | 65 | type: tosca.nodes.NetworkTemplate |
| 66 | properties: |
Zack Williams | 4a830ed | 2018-01-18 09:55:27 -0700 | [diff] [blame] | 67 | name: management_host_template |
Andy Bavier | 01685f8 | 2017-12-21 14:06:54 -0700 | [diff] [blame] | 68 | visibility: private |
| 69 | translation: none |
| 70 | vtn_kind: MANAGEMENT_HOST |
| 71 | |
Zack Williams | 4a830ed | 2018-01-18 09:55:27 -0700 | [diff] [blame] | 72 | management_host: |
Andy Bavier | 01685f8 | 2017-12-21 14:06:54 -0700 | [diff] [blame] | 73 | type: tosca.nodes.Network |
| 74 | properties: |
Zack Williams | 4a830ed | 2018-01-18 09:55:27 -0700 | [diff] [blame] | 75 | name: management_host |
Andy Bavier | 01685f8 | 2017-12-21 14:06:54 -0700 | [diff] [blame] | 76 | # ip_version: 4 |
Zack Williams | 4a830ed | 2018-01-18 09:55:27 -0700 | [diff] [blame] | 77 | subnet: {{ vtn_net_management_host_cidr }} |
| 78 | start_ip: {{ vtn_net_management_host_range_xos_low }} |
| 79 | end_ip: {{ vtn_net_management_host_range_xos_high }} |
| 80 | permit_all_slices: true |
Andy Bavier | 01685f8 | 2017-12-21 14:06:54 -0700 | [diff] [blame] | 81 | requirements: |
| 82 | - template: |
Zack Williams | 4a830ed | 2018-01-18 09:55:27 -0700 | [diff] [blame] | 83 | node: management_host_template |
Andy Bavier | 01685f8 | 2017-12-21 14:06:54 -0700 | [diff] [blame] | 84 | relationship: tosca.relationships.BelongsToOne |
| 85 | - owner: |
| 86 | node: slice#{{ site_name }}_management |
| 87 | relationship: tosca.relationships.BelongsToOne |
| 88 | {% endif %} |
| 89 | |
Zack Williams | 4a830ed | 2018-01-18 09:55:27 -0700 | [diff] [blame] | 90 | # Slice to own management networks |
Andy Bavier | 01685f8 | 2017-12-21 14:06:54 -0700 | [diff] [blame] | 91 | slice#{{ site_name }}_management: |
Zack Williams | 4a830ed | 2018-01-18 09:55:27 -0700 | [diff] [blame] | 92 | description: This slice exists solely to own the management network(s) |
Andy Bavier | 01685f8 | 2017-12-21 14:06:54 -0700 | [diff] [blame] | 93 | type: tosca.nodes.Slice |
| 94 | properties: |
| 95 | network: noauto |
| 96 | name: {{ site_name }}_management |
| 97 | requirements: |
| 98 | - site: |
| 99 | node: {{ site_name }} |
| 100 | relationship: tosca.relationships.BelongsToOne |
| 101 | |