blob: f161af7884c43f54f28a265f4429bf15471072cf [file] [log] [blame]
Matteo Scandolod2044a42017-08-07 16:08:28 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Scott Baker2ec8f112016-02-08 16:19:14 -080017tosca_definitions_version: tosca_simple_yaml_1_0
18
19description: Template for deploying a single server with predefined properties.
20
21imports:
22 - custom_types/xos.yaml
23
24topology_template:
25 node_templates:
26 mysite:
27 type: tosca.nodes.Site
28
29 Private:
30 type: tosca.nodes.NetworkTemplate
31
32 # this one lets XOS auto-allocate a subnet
33 producer_private_network:
34 type: tosca.nodes.network.Network
35 properties:
36 ip_version: 4
37 requirements:
38 - network_template:
39 node: Private
40 relationship: tosca.relationships.UsesNetworkTemplate
41 - slice:
42 node: mysite_producer
43 relationship: tosca.relationships.MemberOfSlice
44 - slice:
45 node: mysite_producer
46 relationship: tosca.relationships.ConnectsToSlice
47
48 # this one specifies the subnet to use
49 producer_private_network2:
50 type: tosca.nodes.network.Network
51 properties:
52 ip_version: 4
53 cidr: 123.123.0.0/16
54 requirements:
55 - network_template:
56 node: Private
57 relationship: tosca.relationships.UsesNetworkTemplate
58 - slice:
59 node: mysite_producer
60 relationship: tosca.relationships.MemberOfSlice
61 - slice:
62 node: mysite_producer
63 relationship: tosca.relationships.ConnectsToSlice
64
65 mysite_producer:
66 type: tosca.nodes.Slice
67 requirements:
68 - slice:
69 node: mysite
70 relationship: tosca.relationships.MemberOfSite
71
72 mysite_consumer:
73 type: tosca.nodes.Slice
74 requirements:
75 - slice:
76 node: mysite
77 relationship: tosca.relationships.MemberOfSite
78 - network:
79 node: producer_private_network
80 relationship: tosca.relationships.ConnectsToNetwork
81 - network2:
82 node: producer_private_network2
83 relationship: tosca.relationships.ConnectsToNetwork
84
85