Rename packages from openecomp to onap.
[sdc.git] / common / onap-tosca-datatype / src / main / resources / globalTypes / tosca / relationships.yml
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at
5 #
6 #      http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13 #
14
15 tosca_definitions_version: tosca_simple_yaml_1_1
16
17 metadata:
18   filename: tosca/relationships.yml
19   version: '1.0'
20
21 imports:
22 - tosca_index:
23     file: _index.yml
24
25 relationship_types:
26   tosca.relationships.Root:
27     description: This is the default (root) TOSCA Relationship Type definition that all other TOSCA Relationship Types derive from.
28     attributes:
29       tosca_id:
30         description: A unique identifier of the realized instance of a Relationship Template that derives from any TOSCA normative type.
31         type: string
32       tosca_name:
33         description: This attribute reflects the name of the Relationship Template as defined in the TOSCA service template. This name is not unique to the realized instance model of corresponding deployed application as each template in the model can result in one or more instances (e.g., scaled) when orchestrated to a provider environment.
34         type: string
35       state:
36         description: The state of the relationship instance.
37         type: string
38         default: initial
39     interfaces:
40       Configure:
41         type: tosca.interfaces.relationship.Configure        
42
43   tosca.relationships.RoutesTo:
44     derived_from: tosca.relationships.ConnectsTo
45     description: This type represents an intentional network routing between two Endpoints in different networks.
46     valid_target_types:
47     - tosca.capabilities.Endpoint
48
49   tosca.relationships.network.LinksTo:
50     derived_from: tosca.relationships.DependsOn
51     description: This relationship type represents an association relationship between Port and Network node types.
52     valid_target_types:
53     - tosca.capabilities.network.Linkable
54
55   tosca.relationships.AttachesTo:
56     derived_from: tosca.relationships.Root
57     description: This type represents an attachment relationship between two nodes. For example, an AttachesTo relationship type would be used for attaching a storage node to a Compute node.
58     valid_target_types:
59     - tosca.capabilities.Attachment
60     properties:
61       location:
62         description: 'The relative location (e.g., path on the file system), which
63           provides the root location to address an attached node. e.g., a mount point
64           / path such as ''/usr/data''. Note: The user must provide it and it cannot
65           be "root".'
66         type: string
67         constraints:
68         - min_length: 1
69       device:
70         description: The logical device name which for the attached device (which is represented by the target node in the model). e.g., '/dev/hda1'.
71         type: string
72         required: false
73     attributes:
74       device:
75         description: 'The logical name of the device as exposed to the instance. Note:
76           A runtime property that gets set when the model gets instantiated by the
77           orchestrator.'
78         type: string
79
80   tosca.relationships.network.BindsTo:
81     derived_from: tosca.relationships.DependsOn
82     description: This type represents a network association relationship between Port and Compute node types.
83     valid_target_types:
84     - tosca.capabilities.network.Bindable
85
86   tosca.relationships.HostedOn:
87     derived_from: tosca.relationships.Root
88     description: This type represents a hosting relationship between two nodes.
89     valid_target_types:
90     - tosca.capabilities.Container
91
92   tosca.relationships.DependsOn:
93     derived_from: tosca.relationships.Root
94     description: This type represents a general dependency relationship between two nodes.
95     valid_target_types:
96     - tosca.capabilities.Node
97
98   tosca.relationships.ConnectsTo:
99     derived_from: tosca.relationships.Root
100     description: This type represents a network connection relationship between two nodes.
101     valid_target_types:
102     - tosca.capabilities.Endpoint
103     properties:
104       credential:
105         type: tosca.datatypes.Credential
106         required: false