Add kafka support in K8s CSIT
[policy/docker.git] / csit / resources / tests / data / acelement-usecase.yaml
1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2023 Nordix Foundation.
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 #
16 # SPDX-License-Identifier: Apache-2.0
17 # ============LICENSE_END=========================================================
18 tosca_definitions_version: tosca_simple_yaml_1_3
19 data_types:
20   onap.datatypes.ToscaConceptIdentifier:
21     derived_from: tosca.datatypes.Root
22     properties:
23       name:
24         type: string
25         required: true
26       version:
27         type: string
28         required: true
29
30   onap.datatypes.native.apex.EngineService:
31     derived_from: tosca.datatypes.Root
32     properties:
33       name:
34         type: string
35         description: Specifies the engine name
36         required: false
37         default: "ApexEngineService"
38       version:
39         type: string
40         description: Specifies the engine version in double dotted format
41         required: false
42         default: "1.0.0"
43       id:
44         type: integer
45         description: Specifies the engine id
46         required: true
47       instance_count:
48         type: integer
49         description: Specifies the number of engine threads that should be run
50         required: true
51       deployment_port:
52         type: integer
53         description: Specifies the port to connect to for engine administration
54         required: false
55         default: 1
56       policy_model_file_name:
57         type: string
58         description: The name of the file from which to read the APEX policy model
59         required: false
60       policy_type_impl:
61         type: string
62         description: The policy type implementation from which to read the APEX policy model
63         required: false
64       periodic_event_period:
65         type: string
66         description: The time interval in milliseconds for the periodic scanning event, 0 means don't scan
67         required: false
68       engine:
69         type: onap.datatypes.native.apex.engineservice.Engine
70         description: The parameters for all engines in the APEX engine service
71         required: true
72   onap.datatypes.native.apex.EventHandler:
73     derived_from: tosca.datatypes.Root
74     properties:
75       name:
76         type: string
77         description: Specifies the event handler name, if not specified this is set to the key name
78         required: false
79       carrier_technology:
80         type: onap.datatypes.native.apex.CarrierTechnology
81         description: Specifies the carrier technology of the event handler (such as REST/Web Socket/Kafka)
82         required: true
83       event_protocol:
84         type: onap.datatypes.native.apex.EventProtocol
85         description: Specifies the event protocol of events for the event handler (such as Yaml/JSON/XML/POJO)
86         required: true
87       event_name:
88         type: string
89         description: Specifies the event name for events on this event handler, if not specified, the event name is read from or written to the event being received or sent
90         required: false
91       event_name_filter:
92         type: string
93         description: Specifies a filter as a regular expression, events that do not match the filter are dropped, the default is to let all events through
94         required: false
95       synchronous_mode:
96         type: boolean
97         description: Specifies the event handler is syncronous (receive event and send response)
98         required: false
99         default: false
100       synchronous_peer:
101         type: string
102         description: The peer event handler (output for input or input for output) of this event handler in synchronous mode, this parameter is mandatory if the event handler is in synchronous mode
103         required: false
104       synchronous_timeout:
105         type: integer
106         description: The timeout in milliseconds for responses to be issued by APEX torequests, this parameter is mandatory if the event handler is in synchronous mode
107         required: false
108       requestor_mode:
109         type: boolean
110         description: Specifies the event handler is in requestor mode (send event and wait for response mode)
111         required: false
112         default: false
113       requestor_peer:
114         type: string
115         description: The peer event handler (output for input or input for output) of this event handler in requestor mode, this parameter is mandatory if the event handler is in requestor mode
116         required: false
117       requestor_timeout:
118         type: integer
119         description: The timeout in milliseconds for wait for responses to requests, this parameter is mandatory if the event handler is in requestor mode
120         required: false
121   onap.datatypes.native.apex.CarrierTechnology:
122     derived_from: tosca.datatypes.Root
123     properties:
124       label:
125         type: string
126         description: The label (name) of the carrier technology (such as REST, Kafka, WebSocket)
127         required: true
128       plugin_parameter_class_name:
129         type: string
130         description: The class name of the class that overrides default handling of event input or output for this carrier technology, defaults to the supplied input or output class
131         required: false
132   onap.datatypes.native.apex.EventProtocol:
133     derived_from: tosca.datatypes.Root
134     properties:
135       label:
136         type: string
137         description: The label (name) of the event protocol (such as Yaml, JSON, XML, or POJO)
138         required: true
139       event_protocol_plugin_class:
140         type: string
141         description: The class name of the class that overrides default handling of the event protocol for this carrier technology, defaults to the supplied event protocol class
142         required: false
143   onap.datatypes.native.apex.Environment:
144     derived_from: tosca.datatypes.Root
145     properties:
146       name:
147         type: string
148         description: The name of the environment variable
149         required: true
150       value:
151         type: string
152         description: The value of the environment variable
153         required: true
154   onap.datatypes.native.apex.engineservice.Engine:
155     derived_from: tosca.datatypes.Root
156     properties:
157       context:
158         type: onap.datatypes.native.apex.engineservice.engine.Context
159         description: The properties for handling context in APEX engines, defaults to using Java maps for context
160         required: false
161       executors:
162         type: map
163         description: The plugins for policy executors used in engines such as javascript, MVEL, Jython
164         required: true
165         entry_schema:
166           description: The plugin class path for this policy executor
167           type: string
168   onap.datatypes.native.apex.engineservice.engine.Context:
169     derived_from: tosca.datatypes.Root
170     properties:
171       distributor:
172         type: onap.datatypes.native.apex.Plugin
173         description: The plugin to be used for distributing context between APEX PDPs at runtime
174         required: false
175       schemas:
176         type: map
177         description: The plugins for context schemas available in APEX PDPs such as Java and Avro
178         required: false
179         entry_schema:
180           type: onap.datatypes.native.apex.Plugin
181       locking:
182         type: onap.datatypes.native.apex.Plugin
183         description: The plugin to be used for locking context in and between APEX PDPs at runtime
184         required: false
185       persistence:
186         type: onap.datatypes.native.apex.Plugin
187         description: The plugin to be used for persisting context for APEX PDPs at runtime
188         required: false
189   onap.datatypes.native.apex.Plugin:
190     derived_from: tosca.datatypes.Root
191     properties:
192       name:
193         type: string
194         description: The name of the executor such as Javascript, Jython or MVEL
195         required: true
196       plugin_class_name:
197         type: string
198         description: The class path of the plugin class for this executor
199
200   org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest:
201     version: 1.0.0
202     derived_from: tosca.datatypes.Root
203     properties:
204       restRequestId:
205         type: onap.datatypes.ToscaConceptIdentifier
206         required: true
207         description: The name and version of a REST request to be sent to a REST endpoint
208       httpMethod:
209         type: string
210         required: true
211         constraints:
212           - valid_values:
213               - POST
214               - PUT
215               - GET
216               - DELETE
217         description: The REST method to use
218       path:
219         type: string
220         required: true
221         description: The path of the REST request relative to the base URL
222       body:
223         type: string
224         required: false
225         description: The body of the REST request for PUT and POST requests
226       expectedResponse:
227         type: integer
228         required: true
229         constraints: []
230         description: THe expected HTTP status code for the REST request
231   org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity:
232     version: 1.0.0
233     derived_from: tosca.datatypes.Root
234     properties:
235       configurationEntityId:
236         type: onap.datatypes.ToscaConceptIdentifier
237         required: true
238         description: The name and version of a Configuration Entity to be handled
239           by the HTTP Automation Composition Element
240       restSequence:
241         type: list
242         entry_schema:
243           type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest
244           type_version: 1.0.0
245         description: A sequence of REST commands to send to the REST endpoint
246
247 policy_types:
248   onap.policies.Native:
249     derived_from: tosca.policies.Root
250     description: a base policy type for all native PDP policies
251     version: 1.0.0
252     name: onap.policies.Native
253   onap.policies.native.Apex:
254     derived_from: onap.policies.Native
255     description: a policy type for native apex policies
256     version: 1.0.0
257     name: onap.policies.native.Apex
258     properties:
259       engine_service:
260         type: onap.datatypes.native.apex.EngineService
261         description: APEX Engine Service Parameters
262       inputs:
263         type: map
264         description: Inputs for handling events coming into the APEX engine
265         entry_schema:
266           type: onap.datatypes.native.apex.EventHandler
267       outputs:
268         type: map
269         description: Outputs for handling events going out of the APEX engine
270         entry_schema:
271           type: onap.datatypes.native.apex.EventHandler
272       environment:
273         type: list
274         description: Envioronmental parameters for the APEX engine
275         entry_schema:
276           type: onap.datatypes.native.apex.Environment
277
278 node_types:
279   org.onap.policy.clamp.acm.Participant:
280     version: 1.0.1
281     derived_from: tosca.nodetypes.Root
282     properties:
283       provider:
284         type: string
285         required: false
286   org.onap.policy.clamp.acm.AutomationCompositionElement:
287     version: 1.0.1
288     derived_from: tosca.nodetypes.Root
289     properties:
290       provider:
291         type: string
292         required: false
293         metadata:
294           common: true
295         description: Specifies the organization that provides the automation composition element
296       startPhase:
297         type: integer
298         required: false
299         constraints:
300           - greater_or_equal: 0
301         metadata:
302           common: true
303         description: A value indicating the start phase in which this automation composition element will be started, the
304           first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped
305           in reverse start phase order. Automation Composition Elements with the same start phase are started and
306           stopped simultaneously
307       uninitializedToPassiveTimeout:
308         type: integer
309         required: false
310         constraints:
311           - greater_or_equal: 0
312         default: 60
313         metadata:
314           common: true
315         description: The maximum time in seconds to wait for a state chage from uninitialized to passive
316       passiveToRunningTimeout:
317         type: integer
318         required: false
319         constraints:
320           - greater_or_equal: 0
321         default: 60
322         metadata:
323           common: true
324         description: The maximum time in seconds to wait for a state chage from passive to running
325       runningToPassiveTimeout:
326         type: integer
327         required: false
328         constraints:
329           - greater_or_equal: 0
330         default: 60
331         metadata:
332           common: true
333         description: The maximum time in seconds to wait for a state chage from running to passive
334       passiveToUninitializedTimeout:
335         type: integer
336         required: false
337         constraints:
338           - greater_or_equal: 0
339         default: 60
340         metadata:
341           common: true
342         description: The maximum time in seconds to wait for a state chage from passive to uninitialized
343   org.onap.policy.clamp.acm.AutomationComposition:
344     version: 1.0.1
345     derived_from: tosca.nodetypes.Root
346     properties:
347       provider:
348         type: string
349         required: false
350         metadata:
351           common: true
352         description: Specifies the organization that provides the automation composition element
353       elements:
354         type: list
355         required: true
356         metadata:
357           common: true
358         entry_schema:
359           type: onap.datatypes.ToscaConceptIdentifier
360         description: Specifies a list of automation composition element definitions that make up this automation composition definition
361   org.onap.policy.clamp.acm.PolicyAutomationCompositionElement:
362     version: 1.0.0
363     derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
364     properties:
365       policy_type_id:
366         type: onap.datatypes.ToscaConceptIdentifier
367         required: true
368       policy_id:
369         type: onap.datatypes.ToscaConceptIdentifier
370         required: false
371   org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement:
372     version: 1.0.0
373     derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
374     properties:
375       chart:
376         type: string
377         required: true
378       configs:
379         type: list
380         required: false
381       requirements:
382         type: string
383         required: false
384       templates:
385         type: list
386         required: false
387         entry_schema:
388       values:
389         type: string
390         required: true
391   org.onap.policy.clamp.acm.HttpAutomationCompositionElement:
392     version: 1.0.0
393     derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
394     properties:
395       baseUrl:
396         type: string
397         required: true
398         description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
399       httpHeaders:
400         type: map
401         required: false
402         entry_schema:
403           type: string
404         description: HTTP headers to send on REST requests
405       configurationEntities:
406         type: map
407         required: true
408         entry_schema:
409           type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity
410           type_version: 1.0.0
411         description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests
412
413 topology_template:
414   inputs:
415     acm_element_policy:
416       type: onap.datatypes.ToscaConceptIdentifier
417       description: The ID of the operational policy to use
418       default:
419         name: onap.policies.native.apex.ac.element
420         version: 1.0.0
421   node_templates:
422     org.onap.policy.clamp.acm.PolicyParticipant:
423       version: 2.3.1
424       type: org.onap.policy.clamp.acm.Participant
425       type_version: 1.0.1
426       description: Participant for Policy microservices
427       properties:
428         provider: ONAP
429     onap.policy.clamp.ac.element.Policy_AutomationCompositionElement:
430       version: 1.2.3
431       type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement
432       type_version: 1.0.0
433       description: Automation composition element for the operational policy for Performance Management Subscription Handling
434       properties:
435         provider: Ericsson
436         startPhase: 0
437
438     org.onap.k8s.acm.K8SAutomationCompositionParticipant:
439       version: 2.3.4
440       type: org.onap.policy.clamp.acm.Participant
441       type_version: 1.0.1
442       description: Participant for K8S
443       properties:
444         provider: ONAP
445     onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement:
446       # Chart from any chart repository configured on helm client.
447       version: 1.2.3
448       type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
449       type_version: 1.0.0
450       description: Automation composition element for the K8S microservice for AC Element Starter
451       properties:
452         provider: ONAP
453         startPhase: 0
454         uninitializedToPassiveTimeout: 300
455         podStatusCheckInterval: 30
456     onap.policy.clamp.ac.element.K8S_BridgeAutomationCompositionElement:
457       # Chart from any chart repository configured on helm client.
458       version: 1.2.3
459       type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
460       type_version: 1.0.0
461       description: Automation composition element for the K8S microservice for AC Element Bridge
462       properties:
463         provider: ONAP
464         startPhase: 0
465         uninitializedToPassiveTimeout: 300
466         podStatusCheckInterval: 30
467     onap.policy.clamp.ac.element.K8S_SinkAutomationCompositionElement:
468       # Chart from any chart repository configured on helm client.
469       version: 1.2.3
470       type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
471       type_version: 1.0.0
472       description: Automation composition element for the K8S microservice for AC Element Sink
473       properties:
474         provider: ONAP
475         startPhase: 0
476         uninitializedToPassiveTimeout: 300
477         podStatusCheckInterval: 30
478
479     org.onap.policy.clamp.acm.HttpParticipant:
480       version: 2.3.4
481       type: org.onap.policy.clamp.acm.Participant
482       type_version: 1.0.1
483       description: Participant for Http requests
484       properties:
485         provider: ONAP
486     onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement:
487       # Http config for AC Element Starter.
488       version: 1.2.3
489       type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
490       type_version: 1.0.0
491       description: Automation composition element for the http requests of AC Element Starter microservice
492       properties:
493         provider: ONAP
494         uninitializedToPassiveTimeout: 300
495         startPhase: 1
496     onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement:
497       # Http config for AC Element Bridge.
498       version: 1.2.3
499       type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
500       type_version: 1.0.0
501       description: Automation composition element for the http requests of AC Element Bridge microservice
502       properties:
503         provider: ONAP
504         uninitializedToPassiveTimeout: 300
505         startPhase: 1
506     onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement:
507       # Http config for AC Element Sink.
508       version: 1.2.3
509       type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
510       type_version: 1.0.0
511       description: Automation composition element for the http requests of AC Element Sink microservice
512       properties:
513         provider: ONAP
514         uninitializedToPassiveTimeout: 300
515         startPhase: 1
516
517     onap.policy.clamp.ac.element.AutomationCompositionDefinition:
518       version: 1.2.3
519       type: org.onap.policy.clamp.acm.AutomationComposition
520       type_version: 1.0.1
521       description: Automation composition for Demo
522       properties:
523         provider: ONAP
524         elements:
525           - name: onap.policy.clamp.ac.element.Policy_AutomationCompositionElement
526             version: 1.2.3
527           - name: onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement
528             version: 1.2.3
529           - name: onap.policy.clamp.ac.element.K8S_BridgeAutomationCompositionElement
530             version: 1.2.3
531           - name: onap.policy.clamp.ac.element.K8S_SinkAutomationCompositionElement
532             version: 1.2.3
533           - name: onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement
534             version: 1.2.3
535           - name: onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement
536             version: 1.2.3
537           - name: onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement
538             version: 1.2.3
539
540   policies:
541     - onap.policies.native.apex.ac.element:
542         type: onap.policies.native.Apex
543         type_version: 1.0.0
544         properties:
545           engineServiceParameters:
546             name: MyApexEngine
547             version: 0.0.1
548             id: 45
549             instanceCount: 2
550             deploymentPort: 12561
551             engineParameters:
552               executorParameters:
553                 JAVASCRIPT:
554                   parameterClassName: org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters
555               contextParameters:
556                 parameterClassName: org.onap.policy.apex.context.parameters.ContextParameters
557                 schemaParameters:
558                   Json:
559                     parameterClassName: org.onap.policy.apex.plugins.context.schema.json.JsonSchemaHelperParameters
560             policy_type_impl:
561               policies:
562                 key:
563                   name: APEXacElementPolicy_Policies
564                   version: 0.0.1
565                 policyMap:
566                   entry:
567                     - key:
568                         name: ReceiveEventPolicy
569                         version: 0.0.1
570                       value:
571                         policyKey:
572                           name: ReceiveEventPolicy
573                           version: 0.0.1
574                         template: Freestyle
575                         state:
576                           entry:
577                             - key: DecideForwardingState
578                               value:
579                                 stateKey:
580                                   parentKeyName: ReceiveEventPolicy
581                                   parentKeyVersion: 0.0.1
582                                   parentLocalName: 'NULL'
583                                   localName: DecideForwardingState
584                                 trigger:
585                                   name: AcElementEvent
586                                   version: 0.0.1
587                                 stateOutputs:
588                                   entry:
589                                     - key: CreateForwardPayload
590                                       value:
591                                         key:
592                                           parentKeyName: ReceiveEventPolicy
593                                           parentKeyVersion: 0.0.1
594                                           parentLocalName: DecideForwardingState
595                                           localName: CreateForwardPayload
596                                         outgoingEvent:
597                                           name: DmaapResponseStatusEvent
598                                           version: 0.0.1
599                                         outgoingEventReference:
600                                           - name: DmaapResponseStatusEvent
601                                             version: 0.0.1
602                                         nextState:
603                                           parentKeyName: 'NULL'
604                                           parentKeyVersion: 0.0.0
605                                           parentLocalName: 'NULL'
606                                           localName: 'NULL'
607                                 contextAlbumReference: []
608                                 taskSelectionLogic:
609                                   key:
610                                     parentKeyName: 'NULL'
611                                     parentKeyVersion: 0.0.0
612                                     parentLocalName: 'NULL'
613                                     localName: 'NULL'
614                                   logicFlavour: UNDEFINED
615                                   logic: ''
616                                 stateFinalizerLogicMap:
617                                   entry: []
618                                 defaultTask:
619                                   name: ForwardPayloadTask
620                                   version: 0.0.1
621                                 taskReferences:
622                                   entry:
623                                     - key:
624                                         name: ForwardPayloadTask
625                                         version: 0.0.1
626                                       value:
627                                         key:
628                                           parentKeyName: ReceiveEventPolicy
629                                           parentKeyVersion: 0.0.1
630                                           parentLocalName: DecideForwardingState
631                                           localName: ReceiveEventPolicy
632                                         outputType: DIRECT
633                                         output:
634                                           parentKeyName: ReceiveEventPolicy
635                                           parentKeyVersion: 0.0.1
636                                           parentLocalName: DecideForwardingState
637                                           localName: CreateForwardPayload
638                         firstState: DecideForwardingState
639               tasks:
640                 key:
641                   name: APEXacElementPolicy_Tasks
642                   version: 0.0.1
643                 taskMap:
644                   entry:
645                     - key:
646                         name: ForwardPayloadTask
647                         version: 0.0.1
648                       value:
649                         key:
650                           name: ForwardPayloadTask
651                           version: 0.0.1
652                         inputEvent:
653                           key:
654                             name: AcElementEvent
655                             version: 0.0.1
656                           nameSpace: org.onap.policy.apex.ac.element
657                           source: Dmaap
658                           target: APEX
659                           parameter:
660                             entry:
661                               - key: DmaapResponseEvent
662                                 value:
663                                   key:
664                                     parentKeyName: AcElementEvent
665                                     parentKeyVersion: 0.0.1
666                                     parentLocalName: 'NULL'
667                                     localName: DmaapResponseEvent
668                                   fieldSchemaKey:
669                                     name: ACEventType
670                                     version: 0.0.1
671                                   optional: false
672                           toscaPolicyState: ENTRY
673                         outputEvents:
674                           entry:
675                             - key: DmaapResponseStatusEvent
676                               value:
677                                 key:
678                                   name: DmaapResponseStatusEvent
679                                   version: 0.0.1
680                                 nameSpace: org.onap.policy.apex.ac.element
681                                 source: APEX
682                                 target: Dmaap
683                                 parameter:
684                                   entry:
685                                     - key: DmaapResponseStatusEvent
686                                       value:
687                                         key:
688                                           parentKeyName: DmaapResponseStatusEvent
689                                           parentKeyVersion: 0.0.1
690                                           parentLocalName: 'NULL'
691                                           localName: DmaapResponseStatusEvent
692                                         fieldSchemaKey:
693                                           name: ACEventType
694                                           version: 0.0.1
695                                         optional: false
696                                 toscaPolicyState: ''
697                         taskParameters:
698                           entry: []
699                         contextAlbumReference:
700                           - name: ACElementAlbum
701                             version: 0.0.1
702                         taskLogic:
703                           key:
704                             parentKeyName: ForwardPayloadTask
705                             parentKeyVersion: 0.0.1
706                             parentLocalName: 'NULL'
707                             localName: TaskLogic
708                           logicFlavour: JAVASCRIPT
709                           logic: "/*\n * ============LICENSE_START=======================================================\n\
710                         \ *  Copyright (C) 2022 Nordix. All rights reserved.\n * ================================================================================\n\
711                         \ * Licensed under the Apache License, Version 2.0 (the 'License');\n\
712                         \ * you may not use this file except in compliance with the\
713                         \ License.\n * You may obtain a copy of the License at\n *\n\
714                         \ *      http://www.apache.org/licenses/LICENSE-2.0\n *\n\
715                         \ * Unless required by applicable law or agreed to in writing,\
716                         \ software\n * distributed under the License is distributed\
717                         \ on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS\
718                         \ OF ANY KIND, either express or implied.\n * See the License\
719                         \ for the specific language governing permissions and\n *\
720                         \ limitations under the License.\n *\n * SPDX-License-Identifier:\
721                         \ Apache-2.0\n * ============LICENSE_END=========================================================\n\
722                         \ */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\
723                         \nvar msgResponse = executor.inFields.get('DmaapResponseEvent');\n\
724                         executor.logger.info('Task in progress with mesages: ' + msgResponse);\n\
725                         \nvar elementId = msgResponse.get('elementId').get('name');\n\
726                         \nif (msgResponse.get('messageType') == 'STATUS' &&\n    (elementId\
727                         \ == 'onap.policy.clamp.ac.startertobridge'\n    || elementId\
728                         \ == 'onap.policy.clamp.ac.bridgetosink')) {\n\n    var receiverId\
729                         \ = '';\n    if (elementId == 'onap.policy.clamp.ac.startertobridge')\
730                         \ {\n        receiverId = 'onap.policy.clamp.ac.bridge';\n\
731                         \    } else {\n        receiverId = 'onap.policy.clamp.ac.sink';\n\
732                         \    }\n\n    var elementIdResponse = new java.util.HashMap();\n\
733                         \    elementIdResponse.put('name', receiverId);\n    elementIdResponse.put('version',\
734                         \ msgResponse.get('elementId').get('version'));\n\n    var\
735                         \ dmaapResponse = new java.util.HashMap();\n    dmaapResponse.put('elementId',\
736                         \ elementIdResponse);\n\n    var message = msgResponse.get('message')\
737                         \ + ' trace added from policy';\n    dmaapResponse.put('message',\
738                         \ message);\n    dmaapResponse.put('messageType', 'STATUS');\n\
739                         \    dmaapResponse.put('messageId', msgResponse.get('messageId'));\n\
740                         \    dmaapResponse.put('timestamp', msgResponse.get('timestamp'));\n\
741                         \n    executor.logger.info('Sending forwarding Event to Ac\
742                         \ element: ' + dmaapResponse);\n\n    executor.outFields.put('DmaapResponseStatusEvent',\
743                         \ dmaapResponse);\n}\n\ntrue;"
744               events:
745                 key:
746                   name: APEXacElementPolicy_Events
747                   version: 0.0.1
748                 eventMap:
749                   entry:
750                     - key:
751                         name: AcElementEvent
752                         version: 0.0.1
753                       value:
754                         key:
755                           name: AcElementEvent
756                           version: 0.0.1
757                         nameSpace: org.onap.policy.apex.ac.element
758                         source: Dmaap
759                         target: APEX
760                         parameter:
761                           entry:
762                             - key: DmaapResponseEvent
763                               value:
764                                 key:
765                                   parentKeyName: AcElementEvent
766                                   parentKeyVersion: 0.0.1
767                                   parentLocalName: 'NULL'
768                                   localName: DmaapResponseEvent
769                                 fieldSchemaKey:
770                                   name: ACEventType
771                                   version: 0.0.1
772                                 optional: false
773                         toscaPolicyState: ENTRY
774                     - key:
775                         name: DmaapResponseStatusEvent
776                         version: 0.0.1
777                       value:
778                         key:
779                           name: DmaapResponseStatusEvent
780                           version: 0.0.1
781                         nameSpace: org.onap.policy.apex.ac.element
782                         source: APEX
783                         target: Dmaap
784                         parameter:
785                           entry:
786                             - key: DmaapResponseStatusEvent
787                               value:
788                                 key:
789                                   parentKeyName: DmaapResponseStatusEvent
790                                   parentKeyVersion: 0.0.1
791                                   parentLocalName: 'NULL'
792                                   localName: DmaapResponseStatusEvent
793                                 fieldSchemaKey:
794                                   name: ACEventType
795                                   version: 0.0.1
796                                 optional: false
797                         toscaPolicyState: ''
798                     - key:
799                         name: LogEvent
800                         version: 0.0.1
801                       value:
802                         key:
803                           name: LogEvent
804                           version: 0.0.1
805                         nameSpace: org.onap.policy.apex.ac.element
806                         source: APEX
807                         target: file
808                         parameter:
809                           entry:
810                             - key: final_status
811                               value:
812                                 key:
813                                   parentKeyName: LogEvent
814                                   parentKeyVersion: 0.0.1
815                                   parentLocalName: 'NULL'
816                                   localName: final_status
817                                 fieldSchemaKey:
818                                   name: SimpleStringType
819                                   version: 0.0.1
820                                 optional: false
821                             - key: message
822                               value:
823                                 key:
824                                   parentKeyName: LogEvent
825                                   parentKeyVersion: 0.0.1
826                                   parentLocalName: 'NULL'
827                                   localName: message
828                                 fieldSchemaKey:
829                                   name: SimpleStringType
830                                   version: 0.0.1
831                                 optional: false
832                         toscaPolicyState: ''
833               albums:
834                 key:
835                   name: APEXacElementPolicy_Albums
836                   version: 0.0.1
837                 albums:
838                   entry:
839                     - key:
840                         name: ACElementAlbum
841                         version: 0.0.1
842                       value:
843                         key:
844                           name: ACElementAlbum
845                           version: 0.0.1
846                         scope: policy
847                         isWritable: true
848                         itemSchema:
849                           name: ACEventType
850                           version: 0.0.1
851               schemas:
852                 key:
853                   name: APEXacElementPolicy_Schemas
854                   version: 0.0.1
855                 schemas:
856                   entry:
857                     - key:
858                         name: ACEventType
859                         version: 0.0.1
860                       value:
861                         key:
862                           name: ACEventType
863                           version: 0.0.1
864                         schemaFlavour: Json
865                         schemaDefinition: "{\n    \"$schema\": \"http://json-schema.org/draft-04/schema#\"\
866                       ,\n    \"type\": \"object\",\n    \"properties\": {\n      \
867                       \  \"elementId\": {\n            \"type\": \"object\",\n   \
868                       \         \"properties\": {\n                \"name\": {\n \
869                       \                   \"type\": \"string\"\n                },\n\
870                       \                \"version\": {\n                    \"type\"\
871                       : \"string\"\n                }\n            },\n          \
872                       \  \"required\": [\n                \"name\",\n            \
873                       \    \"version\"\n            ]\n        },\n        \"message\"\
874                       : {\n            \"type\": \"string\"\n        },\n        \"\
875                       messageType\": {\n            \"type\": \"string\"\n       \
876                       \ }\n    },\n    \"required\": [\n        \"elementId\",\n \
877                       \       \"message\",\n        \"messageType\"\n    ]\n}"
878                     - key:
879                         name: SimpleIntType
880                         version: 0.0.1
881                       value:
882                         key:
883                           name: SimpleIntType
884                           version: 0.0.1
885                         schemaFlavour: Java
886                         schemaDefinition: java.lang.Integer
887                     - key:
888                         name: SimpleStringType
889                         version: 0.0.1
890                       value:
891                         key:
892                           name: SimpleStringType
893                           version: 0.0.1
894                         schemaFlavour: Java
895                         schemaDefinition: java.lang.String
896                     - key:
897                         name: UUIDType
898                         version: 0.0.1
899                       value:
900                         key:
901                           name: UUIDType
902                           version: 0.0.1
903                         schemaFlavour: Java
904                         schemaDefinition: java.util.UUID
905               key:
906                 name: APEXacElementPolicy
907                 version: 0.0.1
908               keyInformation:
909                 key:
910                   name: APEXacElementPolicy_KeyInfo
911                   version: 0.0.1
912                 keyInfoMap:
913                   entry:
914                     - key:
915                         name: ACElementAlbum
916                         version: 0.0.1
917                       value:
918                         key:
919                           name: ACElementAlbum
920                           version: 0.0.1
921                         UUID: 7cddfab8-6d3f-3f7f-8ac3-e2eb5979c900
922                         description: Generated description for concept referred to by
923                           key "ACElementAlbum:0.0.1"
924                     - key:
925                         name: ACEventType
926                         version: 0.0.1
927                       value:
928                         key:
929                           name: ACEventType
930                           version: 0.0.1
931                         UUID: dab78794-b666-3929-a75b-70d634b04fe5
932                         description: Generated description for concept referred to by
933                           key "ACEventType:0.0.1"
934                     - key:
935                         name: APEXacElementPolicy
936                         version: 0.0.1
937                       value:
938                         key:
939                           name: APEXacElementPolicy
940                           version: 0.0.1
941                         UUID: da478611-7d77-3c46-b4be-be968769ba4e
942                         description: Generated description for concept referred to by
943                           key "APEXacElementPolicy:0.0.1"
944                     - key:
945                         name: APEXacElementPolicy_Albums
946                         version: 0.0.1
947                       value:
948                         key:
949                           name: APEXacElementPolicy_Albums
950                           version: 0.0.1
951                         UUID: fa8dc15e-8c8d-3de3-a0f8-585b76511175
952                         description: Generated description for concept referred to by
953                           key "APEXacElementPolicy_Albums:0.0.1"
954                     - key:
955                         name: APEXacElementPolicy_Events
956                         version: 0.0.1
957                       value:
958                         key:
959                           name: APEXacElementPolicy_Events
960                           version: 0.0.1
961                         UUID: 8508cd65-8dd2-342d-a5c6-1570810dbe2b
962                         description: Generated description for concept referred to by
963                           key "APEXacElementPolicy_Events:0.0.1"
964                     - key:
965                         name: APEXacElementPolicy_KeyInfo
966                         version: 0.0.1
967                       value:
968                         key:
969                           name: APEXacElementPolicy_KeyInfo
970                           version: 0.0.1
971                         UUID: 09e6927d-c5ac-3779-919f-9333994eed22
972                         description: Generated description for concept referred to by
973                           key "APEXacElementPolicy_KeyInfo:0.0.1"
974                     - key:
975                         name: APEXacElementPolicy_Policies
976                         version: 0.0.1
977                       value:
978                         key:
979                           name: APEXacElementPolicy_Policies
980                           version: 0.0.1
981                         UUID: cade3c9a-1600-3642-a6f4-315612187f46
982                         description: Generated description for concept referred to by
983                           key "APEXacElementPolicy_Policies:0.0.1"
984                     - key:
985                         name: APEXacElementPolicy_Schemas
986                         version: 0.0.1
987                       value:
988                         key:
989                           name: APEXacElementPolicy_Schemas
990                           version: 0.0.1
991                         UUID: 5bb4a8e9-35fa-37db-9a49-48ef036a7ba9
992                         description: Generated description for concept referred to by
993                           key "APEXacElementPolicy_Schemas:0.0.1"
994                     - key:
995                         name: APEXacElementPolicy_Tasks
996                         version: 0.0.1
997                       value:
998                         key:
999                           name: APEXacElementPolicy_Tasks
1000                           version: 0.0.1
1001                         UUID: 2527eeec-0d1f-3094-ad3f-212622b12836
1002                         description: Generated description for concept referred to by
1003                           key "APEXacElementPolicy_Tasks:0.0.1"
1004                     - key:
1005                         name: AcElementEvent
1006                         version: 0.0.1
1007                       value:
1008                         key:
1009                           name: AcElementEvent
1010                           version: 0.0.1
1011                         UUID: 32c013e2-2740-3986-a626-cbdf665b63e9
1012                         description: Generated description for concept referred to by
1013                           key "AcElementEvent:0.0.1"
1014                     - key:
1015                         name: DmaapResponseStatusEvent
1016                         version: 0.0.1
1017                       value:
1018                         key:
1019                           name: DmaapResponseStatusEvent
1020                           version: 0.0.1
1021                         UUID: 2715cb6c-2778-3461-8b69-871e79f95935
1022                         description: Generated description for concept referred to by
1023                           key "DmaapResponseStatusEvent:0.0.1"
1024                     - key:
1025                         name: ForwardPayloadTask
1026                         version: 0.0.1
1027                       value:
1028                         key:
1029                           name: ForwardPayloadTask
1030                           version: 0.0.1
1031                         UUID: 51defa03-1ecf-3314-bf34-2a652bce57fa
1032                         description: Generated description for concept referred to by
1033                           key "ForwardPayloadTask:0.0.1"
1034                     - key:
1035                         name: LogEvent
1036                         version: 0.0.1
1037                       value:
1038                         key:
1039                           name: LogEvent
1040                           version: 0.0.1
1041                         UUID: c540f048-96af-35e3-a36e-e9c29377cba7
1042                         description: Generated description for concept referred to by
1043                           key "LogEvent:0.0.1"
1044                     - key:
1045                         name: ReceiveEventPolicy
1046                         version: 0.0.1
1047                       value:
1048                         key:
1049                           name: ReceiveEventPolicy
1050                           version: 0.0.1
1051                         UUID: 568b7345-9de1-36d3-b6a3-9b857e6809a1
1052                         description: Generated description for concept referred to by
1053                           key "ReceiveEventPolicy:0.0.1"
1054                     - key:
1055                         name: SimpleIntType
1056                         version: 0.0.1
1057                       value:
1058                         key:
1059                           name: SimpleIntType
1060                           version: 0.0.1
1061                         UUID: 153791fd-ae0a-36a7-88a5-309a7936415d
1062                         description: Generated description for concept referred to by
1063                           key "SimpleIntType:0.0.1"
1064                     - key:
1065                         name: SimpleStringType
1066                         version: 0.0.1
1067                       value:
1068                         key:
1069                           name: SimpleStringType
1070                           version: 0.0.1
1071                         UUID: 8a4957cf-9493-3a76-8c22-a208e23259af
1072                         description: Generated description for concept referred to by
1073                           key "SimpleStringType:0.0.1"
1074                     - key:
1075                         name: UUIDType
1076                         version: 0.0.1
1077                       value:
1078                         key:
1079                           name: UUIDType
1080                           version: 0.0.1
1081                         UUID: 6a8cc68e-dfc8-3403-9c6d-071c886b319c
1082                         description: Generated description for concept referred to by
1083                           key "UUIDType:0.0.1"
1084           eventInputParameters:
1085             DmaapConsumer:
1086               carrierTechnologyParameters:
1087                 carrierTechnology: KAFKA
1088                 parameterClassName: org.onap.policy.apex.plugins.event.carrier.kafka.KafkaCarrierTechnologyParameters
1089                 parameters:
1090                   bootstrapServers: kafka:9092
1091                   groupId: clamp-grp
1092                   enableAutoCommit: true
1093                   autoCommitTime: 1000
1094                   sessionTimeout: 30000
1095                   consumerPollTime: 100
1096                   consumerTopicList:
1097                     - ac_element_msg
1098                   keyDeserializer: org.apache.kafka.common.serialization.StringDeserializer
1099                   valueDeserializer: org.apache.kafka.common.serialization.StringDeserializer
1100                   kafkaProperties: [ ]
1101               eventProtocolParameters:
1102                   eventProtocol: JSON
1103                   parameters:
1104                     pojoField: DmaapResponseEvent
1105               eventName: AcElementEvent
1106               eventNameFilter: AcElementEvent
1107           eventOutputParameters:
1108             logOutputter:
1109               carrierTechnologyParameters:
1110                 carrierTechnology: FILE
1111                 parameters:
1112                   fileName: outputevents.log
1113               eventProtocolParameters:
1114                 eventProtocol: JSON
1115             DmaapReplyProducer:
1116               carrierTechnologyParameters:
1117                 carrierTechnology: KAFKA
1118                 parameterClassName: org.onap.policy.apex.plugins.event.carrier.kafka.KafkaCarrierTechnologyParameters
1119                 parameters:
1120                   bootstrapServers: kafka:9092
1121                   acks: all
1122                   retries: 0
1123                   batchSize: 16384
1124                   lingerTime: 1
1125                   bufferMemory: 33554432
1126                   producerTopic: policy_update_msg
1127                   keySerializer: org.apache.kafka.common.serialization.StringSerializer
1128                   valueSerializer: org.apache.kafka.common.serialization.StringSerializer
1129                   kafkaProperties: [ ]
1130               eventProtocolParameters:
1131                   eventProtocol: JSON
1132                   parameters:
1133                     pojoField: DmaapResponseStatusEvent
1134               eventNameFilter: LogEvent|DmaapResponseStatusEvent
1135         name: onap.policies.native.apex.ac.element
1136         version: 1.0.0