[20190513]: add input attributes to dmaap plugin blueprints
[dcaegen2/platform/blueprints.git] / blueprints / reference_templates / test_mr_multipub.yaml-template
1 # ================================================================================ 
2 # Copyright (c) 2019 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     - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.4.13/k8splugin_types.yaml
22     - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dmaap/dmaap.yaml
23
24 inputs:
25     topic00_name:
26         type: string
27         default: "topic00"
28     topic01_name:
29         type: string
30         default: "topic01"
31     topic02_name:
32         type: string
33         default: "topic02"
34     topic03_name:
35         type: string
36         default: "topic03"
37     topic04_name:
38         type: string
39         default: "topic04"
40     topic05_name:
41         type: string
42         default: "topic05"
43     topic06_name:
44         type: string
45         default: "topic06"
46     location:
47         type: string
48         default: "san-francisco"
49
50 node_templates:
51
52     topic00:
53         type: ccsdk.nodes.Topic
54         properties:
55             topic_name: { get_input: topic00_name }
56
57     topic01:
58         type: ccsdk.nodes.Topic
59         properties:
60             topic_name: { get_input: topic01_name }
61
62     topic02:
63         type: ccsdk.nodes.Topic
64         properties:
65             topic_name: { get_input: topic02_name }
66
67     topic03:
68         type: ccsdk.nodes.Topic
69         properties:
70             topic_name: { get_input: topic03_name }
71
72     topic04:
73         type: ccsdk.nodes.Topic
74         properties:
75             topic_name: { get_input: topic04_name }
76
77     topic05:
78         type: ccsdk.nodes.Topic
79         properties:
80             topic_name: { get_input: topic05_name }
81
82     topic06:
83         type: ccsdk.nodes.Topic
84         properties:
85             topic_name: { get_input: topic06_name }
86
87     client00:
88         type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
89
90         properties:
91             service_component_type: 'nginx-web'
92             image: nginx
93             docker_config:
94                 healthcheck:
95                     type: "http"
96                     endpoint: "/"
97             streams_publishes:
98               - name: topic00
99                 location: { get_input: location }
100                 client_role: org.onap.dcae.pnfPublisher
101                 type: message_router
102               - name: topic01
103                 location: { get_input: location }
104                 client_role: org.onap.dcae.pnfPublisher
105                 type: message_router
106               - name: topic02
107                 location: { get_input: location }
108                 client_role: org.onap.dcae.pnfPublisher
109                 type: message_router
110               - name: topic03
111                 location: { get_input: location }
112                 client_role: org.onap.dcae.pnfPublisher
113                 type: message_router
114               - name: topic04
115                 location: { get_input: location }
116                 client_role: org.onap.dcae.pnfPublisher
117                 type: message_router
118               - name: topic05
119                 location: { get_input: location }
120                 client_role: org.onap.dcae.pnfPublisher
121                 type: message_router
122               - name: topic06
123                 location: { get_input: location }
124                 client_role: org.onap.dcae.pnfPublisher
125                 type: message_router
126
127         relationships:
128             - type: ccsdk.relationships.publish_events
129               target: topic00
130             - type: ccsdk.relationships.publish_events
131               target: topic01
132             - type: ccsdk.relationships.publish_events
133               target: topic02
134             - type: ccsdk.relationships.publish_events
135               target: topic03
136             - type: ccsdk.relationships.publish_events
137               target: topic04
138             - type: ccsdk.relationships.publish_events
139               target: topic05
140             - type: ccsdk.relationships.publish_events
141               target: topic06
142
143         interfaces:
144           cloudify.interfaces.lifecycle:
145             start:
146               inputs:
147                 ports:
148                   - '80:0'
149
150 outputs:
151     topic00_data:
152         description: "Topic 00 data on client00"
153         value: { get_attribute: [client00, topic00]}
154
155     topic01_data:
156         description: "Topic 01 data on client00"
157         value: { get_attribute: [client00, topic01]}
158
159     topic02_data:
160         description: "Topic 02 data on client00"
161         value: { get_attribute: [client00, topic02]}
162
163     topic03_data:
164         description: "Topic 03 data on client00"
165         value: { get_attribute: [client00, topic03]}
166
167     topic04_data:
168         description: "Topic 04 data on client00"
169         value: { get_attribute: [client00, topic04]}
170
171     topic05_data:
172         description: "Topic 05 data on client00"
173         value: { get_attribute: [client00, topic05]}
174
175     topic06_data:
176         description: "Topic 06 data on client00"
177         value: { get_attribute: [client00, topic06]}
178