R10 tag/path update
[dcaegen2/platform/plugins.git] / relationships / relationshipplugin_types.yaml
1 # ================================================================================
2 # Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
3 # ================================================================================
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 # ============LICENSE_END=========================================================
16 #
17 tosca_definitions_version: cloudify_dsl_1_3
18
19 imports:
20     - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
21
22 plugins:
23   relationships:
24     executor: 'central_deployment_agent'
25     package_name: relationshipplugin
26     package_version: 1.1.0
27
28 relationships:
29     # The relationship type here is to be used between service component nodes. What is achieved here is
30     # functionality in providing this relationship information to the service components so that they can
31     # do service discovery.
32     #
33     # This function will create/add to the rels list for components. So going from a "collector node -> analytics node"
34     # for example, this is kind of the edge and will add:
35     # 
36     # ```
37     # "collector_name:rel": ["analytics_name"]
38     # ```
39     #
40     # To the key value store.
41     #
42     dcae.relationships.component_connected_to:
43         derived_from: cloudify.relationships.connected_to
44         # These operations are for adding and removing relationships from Consul
45         # http://getcloudify.org/guide/3.1/reference-builtin-workflows.html
46         target_interfaces:
47             cloudify.interfaces.relationship_lifecycle:
48                 preconfigure:
49                     # Adds target to the source relationship list
50                     implementation: relationships.relationshipplugin.add_relationship
51                 unlink:
52                     # Removes target from the source relationship list
53                     implementation: relationships.relationshipplugin.remove_relationship
54
55     dcae.relationships.component_contained_in:
56         derived_from: cloudify.relationships.contained_in
57         target_interfaces:
58             cloudify.interfaces.relationship_lifecycle:
59                 preconfigure:
60                     implementation: relationships.relationshipplugin.forward_destination_info
61                 # TODO: Is there a need for "unlink"?
62
63     dcae.relationships.component_registered_to:
64         #Operates on a relationship A -> B and makes the following assumptions:
65         derived_from: cloudify.relationships.connected_to
66         target_interfaces:
67             cloudify.interfaces.relationship_lifecycle:
68                 preconfigure:
69                     implementation: relationships.relationshipplugin.tasks.registered_to
70                     inputs:
71                        address_to_register:
72                            type: string
73                        port_to_register:
74                            type: string
75                        name_to_register:
76                            type: string
77                 unlink:
78                     implementation: relationships.relationshipplugin.tasks.registered_to_delete
79
80
81