fix tosca template bugs
[modeling/etsicatalog.git] / catalog / pub / utils / toscaparser / testdata / ns / service-vims / Definitions / 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 tosca_definitions_version: tosca_simple_yaml_1_1
15 imports:
16 - capabilities.yml
17 - data.yml
18 - interfaces.yml
19 relationship_types:
20   tosca.relationships.Root:
21     description: This is the default (root) TOSCA Relationship Type definition that all other TOSCA Relationship Types derive from.
22     attributes:
23       tosca_id:
24         description: A unique identifier of the realized instance of a Relationship Template that derives from any TOSCA normative type.
25         type: string
26       tosca_name:
27         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.
28         type: string
29       state:
30         description: The state of the relationship instance.
31         type: string
32         default: initial
33     interfaces:
34       Configure:
35         type: tosca.interfaces.relationship.Configure
36   tosca.relationships.RoutesTo:
37     derived_from: tosca.relationships.ConnectsTo
38     description: This type represents an intentional network routing between two Endpoints in different networks.
39     valid_target_types:
40     - tosca.capabilities.Endpoint
41   tosca.relationships.network.LinksTo:
42     derived_from: tosca.relationships.DependsOn
43     description: This relationship type represents an association relationship between Port and Network node types.
44     valid_target_types:
45     - tosca.capabilities.network.Linkable
46   tosca.relationships.AttachesTo:
47     derived_from: tosca.relationships.Root
48     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.
49     valid_target_types:
50     - tosca.capabilities.Attachment
51     properties:
52       location:
53         description: 'The relative location (e.g., path on the file system), which
54           provides the root location to address an attached node. e.g., a mount point
55           / path such as ''/usr/data''. Note: The user must provide it and it cannot
56           be "root".'
57         type: string
58         constraints:
59         - min_length: 1
60       device:
61         description: The logical device name which for the attached device (which is represented by the target node in the model). e.g., '/dev/hda1'.
62         type: string
63         required: false
64     attributes:
65       device:
66         description: 'The logical name of the device as exposed to the instance. Note:
67           A runtime property that gets set when the model gets instantiated by the
68           orchestrator.'
69         type: string
70   tosca.relationships.network.BindsTo:
71     derived_from: tosca.relationships.DependsOn
72     description: This type represents a network association relationship between Port and Compute node types.
73     valid_target_types:
74     - tosca.capabilities.network.Bindable
75   tosca.relationships.HostedOn:
76     derived_from: tosca.relationships.Root
77     description: This type represents a hosting relationship between two nodes.
78     valid_target_types:
79     - tosca.capabilities.Container
80   tosca.relationships.DependsOn:
81     derived_from: tosca.relationships.Root
82     description: This type represents a general dependency relationship between two nodes.
83     valid_target_types:
84     - tosca.capabilities.Node
85   tosca.relationships.ConnectsTo:
86     derived_from: tosca.relationships.Root
87     description: This type represents a network connection relationship between two nodes.
88     valid_target_types:
89     - tosca.capabilities.Endpoint
90     properties:
91       credential:
92         type: tosca.datatypes.Credential
93         required: false
94   org.openecomp.relationships.VolumeAttachesTo:
95     derived_from: org.openecomp.relationships.AttachesTo
96     description: This type represents an attachment relationship for associating volume
97     properties:
98       volume_id:
99         description: The ID of the volume to be attached
100         type: string
101         status: SUPPORTED
102         required: true
103       instance_uuid:
104         description: The ID of the server to which the volume attaches
105         type: string
106         status: SUPPORTED
107         required: true
108     attributes:
109       show:
110         description: Detailed information about resource
111         type: string
112         status: SUPPORTED
113   org.openecomp.relationships.AttachesTo:
114     derived_from: tosca.relationships.AttachesTo
115     description: This type represents an attachment relationship
116     properties:
117       location:
118         description: The relative location (e.g., path on the file system), which provides the root location to address an attached node.
119         type: string
120         status: SUPPORTED
121         required: false
122   org.openecomp.relationships.ForwardsTo:
123     derived_from: tosca.relationships.Root
124     valid_target_types:
125     - org.openecomp.capabilities.Forwarder