blob: 4d3cdf588f74f8aca1e9a53646f558e4e76737e4 [file] [log] [blame]
Scott Baker14b74fd2018-06-11 17:35:58 -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
16tosca_definitions_version: tosca_simple_yaml_1_0
17
18description: >
19 Creates a TrustDomain, Principal, Slice, Image, and then brings up an openstack
20 VM attached to the management network.
21
22imports:
23 - custom_types/trustdomain.yaml
24 - custom_types/principal.yaml
25 - custom_types/image.yaml
26 - custom_types/flavor.yaml
27 - custom_types/network.yaml
28 - custom_types/networkslice.yaml
29 - custom_types/node.yaml
30 - custom_types/site.yaml
31 - custom_types/slice.yaml
32 - custom_types/openstackservice.yaml
33 - custom_types/openstackserviceinstance.yaml
34
35topology_template:
36 node_templates:
37 service#openstack:
38 type: tosca.nodes.OpenStackService
39 properties:
40 name: OpenStack
41 must-exist: true
42
43 mysite:
44 type: tosca.nodes.Site
45 properties:
46 name: mysite
47 must-exist: true
48
49 management_network:
50 type: tosca.nodes.Network
51 properties:
52 name: management
53 must-exist: true
54
55 compute_node:
56 type: tosca.nodes.Node
57 properties:
58 name: <insert node hostname here>
59 must-exist: true
60
61 m1.small:
62 type: tosca.nodes.Flavor
63 properties:
64 name: m1.small
65 must-exist: true
66
67 demo_trustdomain:
68 type: tosca.nodes.TrustDomain
69 properties:
70 name: "demo-trust"
71 requirements:
72 - owner:
73 node: service#openstack
74 relationship: tosca.relationships.BelongsToOne
75
76 demo_principal:
77 type: tosca.nodes.Principal
78 properties:
79 name: "demo-account"
80 requirements:
81 - trust_domain:
82 node: demo_trustdomain
83 relationship: tosca.relationships.BelongsToOne
84
85 image_cirros:
86 type: tosca.nodes.Image
87 properties:
88 name: "cirros-0.3.5"
89 container_format: "BARE"
90 disk_format: "QCOW2"
91 path: "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img"
92
93 demo_slice:
94 type: tosca.nodes.Slice
95 properties:
96 name: "demo-slice"
97 requirements:
98 - site:
99 node: mysite
100 relationship: tosca.relationships.BelongsToOne
101 - trust_domain:
102 node: demo_trustdomain
103 relationship: tosca.relationships.BelongsToOne
104 - principal:
105 node: demo_principal
106 relationship: tosca.relationships.BelongsToOne
107
108 demo_slice_management_network:
109 type: tosca.nodes.NetworkSlice
110 requirements:
111 - network:
112 node: management_network
113 relationship: tosca.relationships.BelongsToOne
114 - slice:
115 node: demo_slice
116 relationship: tosca.relationships.BelongsToOne
117
118 demo_instance:
119 type: tosca.nodes.OpenStackServiceInstance
120 properties:
121 name: "demo-instance"
122 requirements:
123 - slice:
124 node: demo_slice
125 relationship: tosca.relationships.BelongsToOne
126 - owner:
127 node: service#openstack
128 relationship: tosca.relationships.BelongsToOne
129 - image:
130 node: image_cirros
131 relationship: tosca.relationships.BelongsToOne
132 - node:
133 node: compute_node
134 relationship: tosca.relationships.BelongsToOne
135 - flavor:
136 node: m1.small
137 relationship: tosca.relationships.BelongsToOne