aefe862a0074775457a469abf1d26d09536a5ec7
[parser.git] /
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 description: >
4   TOSCA templates used to test custom datatypes.
5
6 node_types:
7   tosca.nodes.my.SomeNode:
8     derived_from: tosca.nodes.Root
9     properties:
10       people:
11         type: tosca.my.datatypes.People
12
13 datatype_definitions:
14   tosca.my.datatypes.PeopleBase:
15     properties:
16       name:
17         type: string
18         required: true
19         constraints:
20           - min_length: 2
21       gender:
22         type: string
23         default: unknown
24
25   tosca.my.datatypes.People:
26     derived_from: tosca.my.datatypes.PeopleBase
27     properties:
28       addresses:
29         type: map
30         entry_schema:
31           type: string
32       contacts:
33         type: list
34         entry_schema:
35           type: tosca.my.datatypes.ContactInfo
36
37   tosca.my.datatypes.ContactInfo:
38     description: simple contact information
39     properties:
40       contact_name:
41         type: string
42         required: true
43         constraints:
44           - min_length: 2
45       contact_email:
46         type: string
47       contact_phone:
48         type: string
49
50 topology_template:
51   node_templates:
52     positive:
53       type: tosca.nodes.my.SomeNode
54       properties:
55         people:
56           name: Mike
57           gender: male
58           addresses: {Home: 1 foo street, Office: 9 bar avenue}
59           contacts:
60             - {contact_name: Tom,
61               contact_email: tom@email.com,
62               contact_phone: '123456789'}
63             - {contact_name: Jerry,
64               contact_email: jerry@email.com,
65               contact_phone: '321654987'}