Scott Baker | 6a4fd49 | 2018-06-19 08:12:42 -0700 | [diff] [blame^] | 1 | {{/* vim: set filetype=mustache: */}} |
| 2 | {{/* |
| 3 | Copyright 2018-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 | {{- define "demo-exampleservice.publicNetworkTosca" -}} |
| 18 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 19 | description: Setup public network |
| 20 | imports: |
| 21 | - custom_types/networktemplate.yaml |
| 22 | - custom_types/network.yaml |
| 23 | - custom_types/site.yaml |
| 24 | - custom_types/slice.yaml |
| 25 | topology_template: |
| 26 | node_templates: |
| 27 | mysite: |
| 28 | type: tosca.nodes.Site |
| 29 | properties: |
| 30 | name: {{ .Values.cordSiteName }} |
| 31 | must-exist: true |
| 32 | |
| 33 | public_networking_slice: |
| 34 | description: This slice exists solely to own the public network |
| 35 | type: tosca.nodes.Slice |
| 36 | properties: |
| 37 | network: noauto |
| 38 | name: public_networking |
| 39 | requirements: |
| 40 | - site: |
| 41 | node: mysite |
| 42 | relationship: tosca.relationships.BelongsToOne |
| 43 | |
| 44 | # public network |
| 45 | public_template: |
| 46 | type: tosca.nodes.NetworkTemplate |
| 47 | properties: |
| 48 | name: public_template |
| 49 | visibility: public |
| 50 | translation: none |
| 51 | vtn_kind: PUBLIC |
| 52 | |
| 53 | public: |
| 54 | type: tosca.nodes.Network |
| 55 | properties: |
| 56 | name: public |
| 57 | permit_all_slices: true |
| 58 | subnet: {{ .Values.addresspool_public_cidr }} |
| 59 | # ip_version: 4 |
| 60 | requirements: |
| 61 | - template: |
| 62 | node: public_template |
| 63 | relationship: tosca.relationships.BelongsToOne |
| 64 | - owner: |
| 65 | node: public_networking_slice |
| 66 | relationship: tosca.relationships.BelongsToOne |
| 67 | {{- end -}} |