blob: 9bef36daf0a055fdfaa5a66dfe1f8124565c1ce3 [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
Scott Baker14b74fd2018-06-11 17:35:58 -070055 m1.small:
56 type: tosca.nodes.Flavor
57 properties:
58 name: m1.small
59 must-exist: true
60
61 demo_trustdomain:
62 type: tosca.nodes.TrustDomain
63 properties:
64 name: "demo-trust"
65 requirements:
66 - owner:
67 node: service#openstack
68 relationship: tosca.relationships.BelongsToOne
69
70 demo_principal:
71 type: tosca.nodes.Principal
72 properties:
73 name: "demo-account"
74 requirements:
75 - trust_domain:
76 node: demo_trustdomain
77 relationship: tosca.relationships.BelongsToOne
78
79 image_cirros:
80 type: tosca.nodes.Image
81 properties:
82 name: "cirros-0.3.5"
83 container_format: "BARE"
84 disk_format: "QCOW2"
85 path: "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img"
86
87 demo_slice:
88 type: tosca.nodes.Slice
89 properties:
90 name: "demo-slice"
91 requirements:
92 - site:
93 node: mysite
94 relationship: tosca.relationships.BelongsToOne
95 - trust_domain:
96 node: demo_trustdomain
97 relationship: tosca.relationships.BelongsToOne
98 - principal:
99 node: demo_principal
100 relationship: tosca.relationships.BelongsToOne
101
102 demo_slice_management_network:
103 type: tosca.nodes.NetworkSlice
104 requirements:
105 - network:
106 node: management_network
107 relationship: tosca.relationships.BelongsToOne
108 - slice:
109 node: demo_slice
110 relationship: tosca.relationships.BelongsToOne
111
112 demo_instance:
113 type: tosca.nodes.OpenStackServiceInstance
114 properties:
115 name: "demo-instance"
116 requirements:
117 - slice:
118 node: demo_slice
119 relationship: tosca.relationships.BelongsToOne
120 - owner:
121 node: service#openstack
122 relationship: tosca.relationships.BelongsToOne
123 - image:
124 node: image_cirros
125 relationship: tosca.relationships.BelongsToOne
Scott Baker14b74fd2018-06-11 17:35:58 -0700126 - flavor:
127 node: m1.small
128 relationship: tosca.relationships.BelongsToOne