DCAE-D be initial commit
[sdc/dcae-d/dt-be-main.git] / dcaedt_validator / checker / src / main / resources / tosca / tosca-examples-types.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 description: >
3  Non-normative type definitions, as per section 8 of TOSCA simple profile.
4
5
6 artifact_types:
7
8   tosca.artifacts.Deployment.Image.Container.Docker:
9     derived_from: tosca.artifacts.Deployment.Image
10     description: Docker Container Image
11
12   tosca.artifacts.Deployment.Image.VM.ISO:
13     derived_from: tosca.artifacts.Deployment.Image.VM
14     description: Virtual Machine (VM) image in ISO disk format
15     mime_type: application/octet-stream
16     file_ext: [ iso ]
17
18   tosca.artifacts.Deployment.Image.VM.QCOW2:
19     derived_from: tosca.artifacts.Deployment.Image.VM
20     description: Virtual Machine (VM) image in QCOW v2 standard disk format
21     mime_type: application/octet-stream
22     file_ext: [ qcow2 ]
23
24
25 capability_types:
26
27   tosca.capabilities.Container.Docker:
28     derived_from: tosca.capabilities.Container
29     properties:
30       version:
31         type: list
32         required: false
33         entry_schema: version
34       publish_all:
35         type: boolean
36         default: false
37         required: false
38       publish_ports:
39         type: list
40         entry_schema: tosca.datatypes.network.PortSpec
41         required: false
42       expose_ports:
43         type: list
44         entry_schema: tosca.datatypes.network.PortSpec
45         required: false
46       volumes:
47         type: list
48         entry_schema: string
49         required: false
50
51
52 node_types:
53   
54   tosca.nodes.Database.MySQL:
55     derived_from: tosca.nodes.Database
56     requirements:
57       - host:
58           capability: tosca.capabilities.Container
59           node: tosca.nodes.DBMS.MySQL
60
61   tosca.nodes.DBMS.MySQL:
62     derived_from: tosca.nodes.DBMS
63     properties:
64       port:
65         type: integer
66         description: reflect the default MySQL server port
67         default: 3306
68       root_password:
69         type: string
70         # MySQL requires a root_password for configuration
71         # Override parent DBMS definition to make this property required
72         required: true
73     capabilities:
74       # Further constrain the \91host\92 capability to only allow MySQL databases
75       host:
76         type: tosca.capabilities.Container
77         valid_source_types: [ tosca.nodes.Database.MySQL ]
78
79   tosca.nodes.WebServer.Apache:
80     derived_from: tosca.nodes.WebServer
81
82   tosca.nodes.WebApplication.WordPress:
83     derived_from: tosca.nodes.WebApplication
84     properties:
85       admin_user:
86         type: string
87       admin_password:
88         type: string
89       db_host:
90         type: string
91     requirements:
92       - database_endpoint:
93           capability: tosca.capabilities.Endpoint.Database
94           node: tosca.nodes.Database
95           relationship: tosca.relationships.ConnectsTo
96
97   tosca.nodes.WebServer.Nodejs:
98     derived_from: tosca.nodes.WebServer
99     properties:
100       # Property to supply the desired implementation in the Github repository
101       github_url:
102         required: no
103         type: string
104         description: location of the application on the github.
105         default: https://github.com/mmm/testnode.git
106     interfaces:
107       Standard:
108         type: tosca.interfaces.node.lifecycle.Standard
109         inputs:
110           github_url:
111             type: string
112
113   tosca.nodes.Container.Application.Docker:
114     derived_from: tosca.nodes.Container.Application
115     requirements:
116       - host:
117           capability: tosca.capabilities.Container.Docker