Synchronise the openstack bugs
[parser.git] / tosca2heat / tosca-parser / toscaparser / tests / data / test_credential_datatype.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 description: >
4   TOSCA simple profile with to demonstrate the usage of the
5   TOSCA Credential Data Type.
6
7 imports:
8   - custom_types/wordpress.yaml
9
10 relationship_types:
11   my.types.WordpressDbConnection:
12     derived_from: tosca.relationships.ConnectsTo
13     properties:
14       credential:
15         user: db_user
16         token: db_pwd
17
18 topology_template:
19   node_templates:
20     wordpress:
21       type: tosca.nodes.WebApplication.WordPress
22       requirements:
23         - host: webserver
24         - database_endpoint:
25             node: mysql_database
26             relationship: my.types.WordpressDbConnection
27
28     mysql_database:
29       type: tosca.nodes.Database
30       properties:
31         name: db_name
32         user: db_user
33         password: db_pwd
34       capabilities:
35         database_endpoint:
36           properties:
37             port: 3306
38       requirements:
39         - host:
40             node: mysql_dbms
41
42     mysql_dbms:
43       type: tosca.nodes.DBMS
44       properties:
45         root_password: db_root_pwd
46         port: 3306
47       requirements:
48         - host: server
49
50     webserver:
51       type: tosca.nodes.WebServer
52       properties:
53         admin_credential:
54           user: username
55           token: some_pass
56       requirements:
57         - host: server
58
59     server:
60       type: tosca.nodes.Compute
61       capabilities:
62         host:
63           properties:
64             disk_size: 10 GB
65             num_cpus: 1
66             mem_size: 4096 MB
67         os:
68           properties:
69             architecture: x86_64
70             type: Linux
71             distribution: Ubuntu
72             version: 14.04
73
74   outputs:
75     website_url:
76       description: URL for Wordpress wiki.
77       value: { get_attribute: [server, private_address] }