blob: 7747670964e0b04a1468b224149187d8f720a9dc [file] [log] [blame]
Scott Baker6a4fd492018-06-19 08:12:42 -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 "demo-exampleservice.publicNetworkTosca" -}}
18tosca_definitions_version: tosca_simple_yaml_1_0
19description: Setup public network
20imports:
21 - custom_types/networktemplate.yaml
22 - custom_types/network.yaml
23 - custom_types/site.yaml
24 - custom_types/slice.yaml
25topology_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 -}}