DCAE-D be initial commit
[sdc/dcae-d/dt-be-main.git] / dcaedt_validator / checker / src / main / resources / tosca / tosca-common-types.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_1_0
2 description: >
3  TOSCA simple profile common types. To be included by default in all templates.
4
5
6 data_types:
7
8 #see 5.3.1
9   tosca.datatypes.Root:
10     description: The TOSCA root Data Type all other TOSCA base Data Types derive from
11
12 #from 5.3.2
13   tosca.datatypes.Credential:
14     derived_from: tosca.datatypes.Root
15     properties:
16       protocol:
17         type: string
18         required: false
19       token_type:
20         type: string
21         default: password
22       token:
23         type: string
24       keys:
25         type: map
26         required: false
27         entry_schema: string
28       user:
29         type: string
30         required: false
31
32 #from 5.3.3
33   tosca.datatypes.TimeInterval:
34     derived_from: tosca.datatypes.Root
35     properties:
36       start_time:
37         type: timestamp
38         required: true
39       end_time:
40         type: timestamp
41         required: true
42
43 #from 5.3.4
44   tosca.datatypes.network.NetworkInfo:
45     derived_from: tosca.datatypes.Root
46     properties:
47       network_name:
48         type: string
49       network_id:
50         type: string
51       addresses:
52         type: list
53         entry_schema: string
54
55 #from 5.3.5
56   tosca.datatypes.network.PortInfo:
57     derived_from: tosca.datatypes.Root
58     properties:
59       port_name:
60         type: string
61       port_id:
62         type: string
63       network_id:
64         type: string
65       mac_address:
66         type: string
67       addresses:
68         type: list
69         entry_schema: string
70
71 #from 5.3.6
72   tosca.datatypes.network.PortDef:
73     derived_from: integer
74     constraints:
75       - in_range: [ 1, 65535 ]
76
77 #from 5.3.7
78   tosca.datatypes.network.PortSpec:
79     derived_from: tosca.datatypes.Root
80     properties:
81       protocol:
82         type: string
83         required: true
84         default: tcp
85         constraints:
86           - valid_values: [ udp, tcp, igmp ]
87       target:
88 #I think the intent was (same for source):
89 #type: tosca.datatypes.network.PortDef
90         type: integer
91         entry_schema: tosca.datatypes.network.PortDef
92       target_range:
93         type: range
94         constraints:
95           - in_range: [ 1, 65535 ]
96       source:
97         type: integer
98         entry_schema: tosca.datatypes.network.PortDef
99       source_range:
100         type: range
101         constraints:
102           - in_range: [ 1, 65535 ]
103
104 capability_types:
105
106 #from 5.5.1
107   tosca.capabilities.Root:
108     description: The TOSCA root Capability Type all other TOSCA base Capability Types derive from
109
110 #from 5.5.2
111   tosca.capabilities.Node:
112     derived_from: tosca.capabilities.Root
113
114 #from 5.5.3
115   tosca.capabilities.Compute:
116     derived_from: tosca.capabilities.Root
117     properties:
118       name:
119         type: string
120         required: false
121       num_cpus:
122         type: integer
123         required: false
124         constraints:
125           - greater_or_equal: 1
126       cpu_frequency:
127         type: scalar-unit.frequency
128         required: false
129         constraints:
130           - greater_or_equal: 0.1 GHz
131       disk_size:
132         type: scalar-unit.size
133         required: false
134         constraints:
135           - greater_or_equal: 0 MB
136       mem_size:
137         type: scalar-unit.size
138         required: false
139         constraints:
140           - greater_or_equal: 0 MB
141
142 #from 5.5.4
143   tosca.capabilities.Network:
144     derived_from: tosca.capabilities.Root
145     properties:
146       name:
147         type: string
148         required: false
149
150 #from 5.5.5
151   tosca.capabilities.Storage:
152     derived_from: tosca.capabilities.Root
153     properties:
154       name:
155         type: string
156         required: false
157
158 #from 5.5.6
159   tosca.capabilities.compute.Container:
160     derived_from: tosca.capabilities.Compute
161
162 #from 5.5.7
163   tosca.capabilities.Endpoint:
164     derived_from: tosca.capabilities.Root
165     properties:
166       protocol:
167         type: string
168         default: tcp
169       port:
170         type: tosca.datatypes.network.PortDef
171         required: false
172       secure:
173         type: boolean
174         default: false
175       url_path:
176         type: string
177         required: false
178       port_name: 
179         type: string
180         required: false
181       network_name:
182         type: string
183         required: false
184         default: PRIVATE
185       initiator:
186         type: string
187         default: source
188         constraints:
189           - valid_values: [ source, target, peer ]
190       ports:
191         type: map
192         required: false
193         constraints:
194           - min_length: 1
195         entry_schema: tosca.datatypes.network.PortSpec
196     attributes:
197       ip_address:
198         type: string
199
200 #from 5.5.8
201   tosca.capabilities.Endpoint.Public:
202     derived_from: tosca.capabilities.Endpoint
203     properties:
204       # Change the default network_name to use the first public network found
205       network_name:
206         type: string
207         default: PUBLIC
208       floating:
209         description: >
210           indicates that the public address should be allocated from a pool of floating IPs that are associated with the network.
211         type: boolean
212         default: false
213         status: experimental
214       dns_name:
215         description: The optional name to register with DNS
216         type: string
217         required: false
218         status: experimental
219
220 #from 5.5.9
221   tosca.capabilities.Endpoint.Admin:
222     derived_from: tosca.capabilities.Endpoint
223     # Change Endpoint secure indicator to true from its default of false
224     properties:
225       secure:
226         type: boolean
227         default: true
228         constraints:
229           - equal: true
230
231 #from 5.5.10
232   tosca.capabilities.Endpoint.Database:
233     derived_from: tosca.capabilities.Endpoint
234
235 #from 5.5.11
236   tosca.capabilities.Attachment:
237     derived_from: tosca.capabilities.Root
238
239 #from 5.5.12
240   tosca.capabilities.OperatingSystem:
241     derived_from: tosca.capabilities.Root
242     properties:
243       architecture:
244         type: string
245         required: false
246       type:
247         type: string
248         required: false
249       distribution:
250         type: string
251         required: false
252       version:
253         type: version
254         required: false
255
256 #from 5.5.13
257   tosca.capabilities.Scalable:
258     derived_from: tosca.capabilities.Root
259     properties:
260       min_instances:
261         type: integer
262         default: 1
263       max_instances:
264         type: integer
265         default: 1
266       default_instances:
267         type: integer
268
269 #from C.3.11
270   tosca.capabilities.network.Bindable:
271     derived_from: tosca.capabilities.Node
272
273
274 relationship_types:
275
276 #from 5.7.1
277   tosca.relationships.Root:
278     description: The TOSCA root Relationship Type all other TOSCA base Relationship Types derive from
279     attributes:
280       tosca_id:
281         type: string
282       tosca_name:
283         type: string
284     interfaces:
285       Configure:
286         type: tosca.interfaces.relationship.Configure
287
288 #from 5.7.2
289   tosca.relationships.DependsOn:
290     derived_from: tosca.relationships.Root
291     valid_target_types: [ tosca.capabilities.Node ]
292
293 #from 5.7.3
294   tosca.relationships.HostedOn:
295     derived_from: tosca.relationships.Root
296     valid_target_types: [ tosca.capabilities.compute.Container ]
297
298 #from 5.7.4
299   tosca.relationships.ConnectsTo:
300     derived_from: tosca.relationships.Root
301     valid_target_types: [ tosca.capabilities.Endpoint ]
302     properties:
303       credential:
304         type: tosca.datatypes.Credential
305         required: false
306
307 #from 5.7.5
308   tosca.relationships.AttachesTo:
309     derived_from: tosca.relationships.Root
310     valid_target_types: [ tosca.capabilities.Attachment ]
311     properties:
312       location:
313         type: string
314         constraints:
315           - min_length: 1
316       device:
317         type: string
318         required: false
319
320 #from 5.7.6
321   tosca.relationships.RoutesTo:
322     derived_from: tosca.relationships.ConnectsTo
323     valid_target_types: [ tosca.capabilities.Endpoint ]
324
325
326 interface_types:
327
328 #from 5.8.3
329   tosca.interfaces.Root:
330 #    derived_from: tosca.entity.Root
331     description: The TOSCA root Interface Type all other TOSCA base Interface Types derive from
332
333 #from 5.8.4
334   tosca.interfaces.node.lifecycle.Standard:
335     derived_from: tosca.interfaces.Root
336     create:
337       description: Standard lifecycle create operation.
338     configure:
339       description: Standard lifecycle configure operation.
340     start:
341       description: Standard lifecycle start operation.
342     stop:
343       description: Standard lifecycle stop operation.
344     delete:
345       description: Standard lifecycle delete operation.
346
347 #from 5.8.5
348   tosca.interfaces.relationship.Configure:
349     derived_from: tosca.interfaces.Root
350     pre_configure_source:
351       description: Operation to pre-configure the source endpoint.
352     pre_configure_target:
353       description: Operation to pre-configure the target endpoint.
354     post_configure_source:
355       description: Operation to post-configure the source endpoint.
356     post_configure_target:
357       description: Operation to post-configure the target endpoint.
358     add_target:
359       description: Operation to notify the source node of a target node being added via a relationship.
360     add_source:
361       description: Operation to notify the target node of a source node which is now available via a relationship.
362     target_changed:
363       description: Operation to notify source some property or attribute of the target changed
364     remove_target:
365       description: Operation to remove a target node. 
366
367
368 node_types:
369
370 #from 5.9.1
371   tosca.nodes.Root:
372     description: The TOSCA Node Type all other TOSCA base Node Types derive from
373     attributes:
374       tosca_id:
375         type: string
376       tosca_name:
377         type: string
378       state:
379         type: string
380     capabilities:
381       feature:
382         type: tosca.capabilities.Node
383     requirements:
384       - dependency:
385           capability: tosca.capabilities.Node
386           node: tosca.nodes.Root
387           relationship: tosca.relationships.DependsOn
388           occurrences: [ 0, UNBOUNDED ]
389     interfaces:
390       Standard:
391         type: tosca.interfaces.node.lifecycle.Standard
392
393 #from 5.9.2
394   tosca.nodes.Compute:
395     derived_from: tosca.nodes.Root
396     attributes:
397       private_address:
398         type: string
399       public_address:
400         type: string
401       networks:
402         type: map
403 #entry schema for attribute has a string value as per A.5.9 .. 
404 #the standard document defines it as a map similar to the property definition ..
405         entry_schema: tosca.datatypes.network.NetworkInfo
406       ports:
407         type: map
408         entry_schema: tosca.datatypes.network.PortInfo
409     requirements:
410       - local_storage:
411           capability: tosca.capabilities.Attachment
412           node: tosca.nodes.BlockStorage
413           relationship: tosca.relationships.AttachesTo
414           occurrences: [0, UNBOUNDED]
415     capabilities:
416       host:
417         type: tosca.capabilities.compute.Container
418         valid_source_types: [tosca.nodes.SoftwareComponent]
419       endpoint:
420         type: tosca.capabilities.Endpoint.Admin
421       os:
422         type: tosca.capabilities.OperatingSystem
423       scalable:
424         type: tosca.capabilities.Scalable
425       binding:
426         type: tosca.capabilities.network.Bindable
427
428 #from 5.9.3
429   tosca.nodes.SoftwareComponent:
430     derived_from: tosca.nodes.Root
431     properties:
432       # domain-specific software component version
433       component_version:
434         type: version
435         required: false
436       admin_credential:
437         type: tosca.datatypes.Credential
438         required: false
439     requirements:
440       - host:
441           capability: tosca.capabilities.compute.Container
442           node: tosca.nodes.Compute
443           relationship: tosca.relationships.HostedOn
444
445 #from 5.9.4
446   tosca.nodes.WebServer:
447     derived_from: tosca.nodes.SoftwareComponent
448     capabilities:
449     # Private, layer 4 endpoints
450       data_endpoint: tosca.capabilities.Endpoint
451       admin_endpoint: tosca.capabilities.Endpoint.Admin
452       host:
453         type: tosca.capabilities.compute.Container
454         valid_source_types: [ tosca.nodes.WebApplication ]
455
456 #from 5.9.5
457   tosca.nodes.WebApplication:
458     derived_from: tosca.nodes.Root
459     properties:
460       context_root:
461         type: string
462     capabilities:
463       app_endpoint:
464         type: tosca.capabilities.Endpoint
465     requirements:
466       - host:
467           capability: tosca.capabilities.compute.Container
468           node: tosca.nodes.WebServer
469           relationship: tosca.relationships.HostedOn
470
471 #from 5.9.6
472   tosca.nodes.DBMS:
473     derived_from: tosca.nodes.SoftwareComponent
474     properties:
475       root_password:
476         type: string
477         required: false
478         description: the optional root password for the DBMS service
479       port:
480         type: integer
481         required: false
482         description: the port the DBMS service will listen to for data and requests
483     capabilities:
484       host:
485         type: tosca.capabilities.compute.Container
486         valid_source_types: [ tosca.nodes.Database ]
487
488 #from 5.9.7
489   tosca.nodes.Database:
490     derived_from: tosca.nodes.Root
491     properties:
492       name:
493         type: string
494         description: the logical name of the database
495       port:
496         type: integer
497         description: the port the underlying database service will listen to for data
498       user:
499         type: string
500         description: the optional user account name for DB administration
501         required: false
502       password:
503         type: string
504         description: the optional password for the DB user account
505         required: false
506     requirements:
507       - host:
508           capability: tosca.capabilities.compute.Container
509           node: tosca.nodes.DBMS
510           relationship: tosca.relationships.HostedOn
511     capabilities:
512       database_endpoint:
513         type: tosca.capabilities.Endpoint.Database
514
515 #from 5.9.8
516   tosca.nodes.ObjectStorage:
517     derived_from: tosca.nodes.Root
518     properties:
519       name:
520         type: string
521       size:
522         type: scalar-unit.size
523         constraints:
524           - greater_or_equal: 0 GB
525       maxsize:
526         type: scalar-unit.size
527         constraints:
528           - greater_or_equal: 0 GB
529     capabilities:
530       storage_endpoint:
531         type: tosca.capabilities.Endpoint
532
533 #from 5.9.9
534   tosca.nodes.BlockStorage:
535     derived_from: tosca.nodes.Root
536     properties:
537       size:
538         type: scalar-unit.size
539         constraints:
540           - greater_or_equal: 1 MB
541       volume_id:
542         type: string
543         required: false
544       snapshot_id:
545         type: string
546         required: false
547     capabilities:
548       attachment:
549         type: tosca.capabilities.Attachment
550
551 #from 5.9.10
552   tosca.nodes.Container.Runtime:
553     derived_from: tosca.nodes.SoftwareComponent
554     capabilities:
555       host:
556         type: tosca.capabilities.compute.Container
557       scalable:
558         type: tosca.capabilities.Scalable
559
560 #from 5.9.11
561   tosca.nodes.Container.Application:
562     derived_from: tosca.nodes.Root
563     requirements:
564       - host:
565           capability: tosca.capabilities.compute.Container
566      #          node: tosca.nodes.Container !invalid node reference!
567           relationship: tosca.relationships.HostedOn
568
569 #from 5.9.12
570   tosca.nodes.LoadBalancer:
571     derived_from: tosca.nodes.Root
572     properties:
573       # TBD
574       algorithm:
575         type: string
576         required: false
577         status: experimental
578     capabilities:
579       client:
580         type: tosca.capabilities.Endpoint.Public
581         occurrences: [0, UNBOUNDED]
582         description: the Floating (IP) clients on the public network can connect to
583     requirements:
584       - application:
585           capability: tosca.capabilities.Endpoint
586           relationship: tosca.relationships.RoutesTo
587           occurrences: [0, UNBOUNDED]
588 # correction by jora: requirement defintion does not allow for a description entry
589 #          description: Connection to one or more load balanced applications
590
591 artifact_types:
592
593 #from 5.4.1
594   tosca.artifacts.Root:
595     description: The TOSCA Artifact Type all other TOSCA Artifact Types derive from
596
597 #from 5.4.2
598   tosca.artifacts.File:
599     derived_from: tosca.artifacts.Root
600
601 #from 5.4.3
602   tosca.artifacts.Deployment:
603     derived_from: tosca.artifacts.Root
604     description: TOSCA base type for deployment artifacts
605
606 #from 5.4.3.3
607   tosca.artifacts.Deployment.Image:
608     derived_from: tosca.artifacts.Deployment
609
610 #from 5.4.3.4
611   tosca.artifacts.Deployment.Image.VM:
612     derived_from: tosca.artifacts.Deployment.Image
613     description: Virtual Machine (VM) Image
614
615 #from 5.4.4
616   tosca.artifacts.Implementation:
617     derived_from: tosca.artifacts.Root
618     description: TOSCA base type for implementation artifacts
619
620 #from 5.4.4.3
621   tosca.artifacts.Implementation.Bash:
622     derived_from: tosca.artifacts.Implementation
623     description: Script artifact for the Unix Bash shell
624     mime_type: application/x-sh
625     file_ext: [ sh ]
626
627 #from 5.4.4.4
628   tosca.artifacts.Implementation.Python:
629     derived_from: tosca.artifacts.Implementation
630     description: Artifact for the interpreted Python language
631     mime_type: application/x-python
632     file_ext: [ py ]
633
634
635 #from 5.9
636 group_types:
637
638   tosca.groups.Root:
639     description: The TOSCA Group Type all other TOSCA Group Types derive from
640     interfaces:
641       Standard:
642         type: tosca.interfaces.node.lifecycle.Standard
643
644 #from 5.10
645 policy_types:
646
647   tosca.policies.Root:
648     description: The TOSCA Policy Type all other TOSCA Policy Types derive from
649
650   tosca.policies.Placement:
651     derived_from: tosca.policies.Root
652     description: The TOSCA Policy Type definition that is used to govern placement of TOSCA nodes or groups of nodes. 
653
654   tosca.policies.Scaling:
655     derived_from: tosca.policies.Root
656     description: The TOSCA Policy Type definition that is used to govern scaling of TOSCA nodes or groups of nodes. 
657
658   tosca.policies.Update:
659     derived_from: tosca.policies.Root
660     description: The TOSCA Policy Type definition that is used to govern update of TOSCA nodes or groups of nodes.
661
662   tosca.policies.Performance:
663     derived_from: tosca.policies.Root
664     description: The TOSCA Policy Type definition that is used to declare performance requirements for TOSCA nodes or groups of nodes. 
665