blob: 0377afc91a972342245ba865592a8460d23956b6 [file] [log] [blame]
Scott Baker7a916f72017-10-25 16:52:52 -07001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15tosca_definitions_version: tosca_simple_yaml_1_0
16
17imports:
18 - custom_types/exampleservice.yaml
19 - custom_types/exampleserviceinstance.yaml
20 - custom_types/color.yaml
21 - custom_types/embeddedimage.yaml
22
23description: add colors and images to exampleservice demo
24
25topology_template:
26 node_templates:
27 red:
28 type: tosca.nodes.Color
29 properties:
30 name: red
31 html_code: "#FF0000"
32
33 green:
34 type: tosca.nodes.Color
35 properties:
36 name: green
37 html_code: "#00FF00"
38
39 blue:
40 type: tosca.nodes.Color
41 properties:
42 name: blue
43 html_code: "#0000FF"
44
45 exampleservice:
46 type: tosca.nodes.ExampleService
47 properties:
48 name: exampleservice
49 must-exist: true
50
51 exampletenant1:
52 type: tosca.nodes.ExampleServiceInstance
53 properties:
54 name: exampletenant1
55 tenant_message: world
56 requirements:
57 - owner:
58 node: exampleservice
59 relationship: tosca.relationships.BelongsToOne
60 - background_color:
61 node: red
62 relationship: tosca.relationships.BelongsToOne
63 - foreground_color:
64 node: blue
65 relationship: tosca.relationships.BelongsToOne
66
67 exampleimage:
68 type: tosca.nodes.EmbeddedImage
69 properties:
70 name: someimage
71 url: http://somesite.com/someimage.jpg
72 requirements:
73 - serviceinstance:
74 node: exampletenant1
75 relationship: tosca.relationships.BelongsToOne