Merge "Update ACM design arch docs"
[policy/parent.git] / docs / development / devtools / tosca / pairwise-testing.yml
1 tosca_definitions_version: tosca_simple_yaml_1_3
2 data_types:
3   onap.datatypes.ToscaConceptIdentifier:
4     derived_from: tosca.datatypes.Root
5     properties:
6       name:
7         type: string
8         required: true
9       version:
10         type: string
11         required: true
12   onap.datatype.controlloop.Target:
13     derived_from: tosca.datatypes.Root
14     description: Definition for a entity in A&AI to perform a control loop operation
15       on
16     properties:
17       targetType:
18         type: string
19         description: Category for the target type
20         required: true
21         constraints:
22           - valid_values:
23               - VNF
24               - VM
25               - VFMODULE
26               - PNF
27       entityIds:
28         type: map
29         description: |
30           Map of values that identify the resource. If none are provided, it is assumed that the
31           entity that generated the ONSET event will be the target.
32         required: false
33         metadata:
34           clamp_possible_values: ClampExecution:CSAR_RESOURCES
35         entry_schema:
36           type: string
37   onap.datatype.controlloop.Actor:
38     derived_from: tosca.datatypes.Root
39     description: An actor/operation/target definition
40     properties:
41       actor:
42         type: string
43         description: The actor performing the operation.
44         required: true
45         metadata:
46           clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor
47       operation:
48         type: string
49         description: The operation the actor is performing.
50         metadata:
51           clamp_possible_values: Dictionary:DefaultOperations,ClampExecution:CDS/operation
52         required: true
53       target:
54         type: onap.datatype.controlloop.Target
55         description: The resource the operation should be performed on.
56         required: true
57       payload:
58         type: map
59         description: Name/value pairs of payload information passed by Policy to the
60           actor
61         required: false
62         metadata:
63           clamp_possible_values: ClampExecution:CDS/payload
64         entry_schema:
65           type: string
66   onap.datatype.controlloop.Operation:
67     derived_from: tosca.datatypes.Root
68     description: An operation supported by an actor
69     properties:
70       id:
71         type: string
72         description: Unique identifier for the operation
73         required: true
74       description:
75         type: string
76         description: A user-friendly description of the intent for the operation
77         required: false
78       operation:
79         type: onap.datatype.controlloop.Actor
80         description: The definition of the operation to be performed.
81         required: true
82       timeout:
83         type: integer
84         description: The amount of time for the actor to perform the operation.
85         required: true
86       retries:
87         type: integer
88         description: The number of retries the actor should attempt to perform the
89           operation.
90         required: true
91         default: 0
92       success:
93         type: string
94         description: Points to the operation to invoke on success. A value of "final_success"
95           indicates and end to the operation.
96         required: false
97         default: final_success
98       failure:
99         type: string
100         description: Points to the operation to invoke on Actor operation failure.
101         required: false
102         default: final_failure
103       failure_timeout:
104         type: string
105         description: Points to the operation to invoke when the time out for the operation
106           occurs.
107         required: false
108         default: final_failure_timeout
109       failure_retries:
110         type: string
111         description: Points to the operation to invoke when the current operation
112           has exceeded its max retries.
113         required: false
114         default: final_failure_retries
115       failure_exception:
116         type: string
117         description: Points to the operation to invoke when the current operation
118           causes an exception.
119         required: false
120         default: final_failure_exception
121       failure_guard:
122         type: string
123         description: Points to the operation to invoke when the current operation
124           is blocked due to guard policy enforcement.
125         required: false
126         default: final_failure_guard
127   org.onap.datatypes.policy.clamp.acm.httpControlLoopElement.RestRequest:
128     version: 1.0.0
129     derived_from: tosca.datatypes.Root
130     properties:
131       restRequestId:
132         type: onap.datatypes.ToscaConceptIdentifier
133         type_version: 0.0.0
134         required: true
135         description: The name and version of a REST request to be sent to a REST endpoint
136       httpMethod:
137         type: string
138         required: true
139         constraints:
140           - valid_values:
141               - POST
142               - PUT
143               - GET
144               - DELETE
145         description: The REST method to use
146       path:
147         type: string
148         required: true
149         description: The path of the REST request relative to the base URL
150       body:
151         type: string
152         required: false
153         description: The body of the REST request for PUT and POST requests
154       expectedResponse:
155         type: integer
156         required: true
157         constraints: []
158         description: THe expected HTTP status code for the REST request
159   org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity:
160     version: 1.0.0
161     derived_from: tosca.datatypes.Root
162     properties:
163       configurationEntityId:
164         type: onap.datatypes.ToscaConceptIdentifier
165         type_version: 0.0.0
166         required: true
167         description: The name and version of a Configuration Entity to be handled
168           by the HTTP Automation Composition Element
169       restSequence:
170         type: list
171         entry_schema:
172           type: org.onap.datatypes.policy.clamp.acm.httpControlLoopElement.RestRequest
173           type_version: 1.0.0
174         description: A sequence of REST commands to send to the REST endpoint
175 policy_types:
176   onap.policies.Monitoring:
177     derived_from: tosca.policies.Root
178     description: a base policy type for all policies that govern monitoring provisioning
179     version: 1.0.0
180     name: onap.policies.Monitoring
181   onap.policies.customPolicyType:
182     derived_from: tosca.policies.Root
183     description: a base policy type for all policies that govern monitoring provisioning
184     version: 1.0.0
185     name: onap.policies.customPolicyType
186   onap.policies.controlloop.operational.Common:
187     derived_from: tosca.policies.Root
188     version: 1.0.0
189     name: onap.policies.controlloop.operational.Common
190     description: |
191       Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant
192       Policy Types. This does NOT support the legacy Policy YAML policy type.
193     properties:
194       id:
195         type: string
196         description: The unique control loop id.
197         required: true
198       timeout:
199         type: integer
200         description: |
201           Overall timeout for executing all the operations. This timeout should equal or exceed the total
202           timeout for each operation listed.
203         required: true
204       abatement:
205         type: boolean
206         description: Whether an abatement event message will be expected for the control
207           loop from DCAE.
208         required: true
209         default: false
210       trigger:
211         type: string
212         description: Initial operation to execute upon receiving an Onset event message
213           for the Control Loop.
214         required: true
215       operations:
216         type: list
217         description: List of operations to be performed when Control Loop is triggered.
218         required: true
219         entry_schema:
220           type: onap.datatype.controlloop.Operation
221   onap.policies.controlloop.operational.common.Apex:
222     derived_from: onap.policies.controlloop.operational.Common
223     type_version: 1.0.0
224     version: 1.0.0
225     name: onap.policies.controlloop.operational.common.Apex
226     description: Operational policies for Apex PDP
227     properties:
228       engineServiceParameters:
229         type: string
230         description: The engine parameters like name, instanceCount, policy implementation,
231           parameters etc.
232         required: true
233       eventInputParameters:
234         type: string
235         description: The event input parameters.
236         required: true
237       eventOutputParameters:
238         type: string
239         description: The event output parameters.
240         required: true
241       javaProperties:
242         type: string
243         description: Name/value pairs of properties to be set for APEX if needed.
244         required: false
245
246 node_types:
247   org.onap.policy.clamp.acm.Participant:
248     version: 1.0.1
249     derived_from: tosca.nodetypes.Root
250     properties:
251       provider:
252         type: string
253         required: false
254   org.onap.policy.clamp.acm.AutomationCompositionElement:
255     version: 1.0.1
256     derived_from: tosca.nodetypes.Root
257     properties:
258       provider:
259         type: string
260         required: false
261         metadata:
262           common: true
263         description: Specifies the organization that provides the automation composition element
264       participant_id:
265         type: onap.datatypes.ToscaConceptIdentifier
266         required: true
267         metadata:
268           common: true
269       participantType:
270         type: onap.datatypes.ToscaConceptIdentifier
271         required: true
272         metadata:
273           common: true
274         description: The identity of the participant type that hosts this type of Automation Composition Element
275       startPhase:
276         type: integer
277         required: false
278         constraints:
279           - greater_or_equal: 0
280         metadata:
281           common: true
282         description: A value indicating the start phase in which this automation composition element will be started, the
283           first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped
284           in reverse start phase order. Automation Composition Elements with the same start phase are started and
285           stopped simultaneously
286       uninitializedToPassiveTimeout:
287         type: integer
288         required: false
289         constraints:
290           - greater_or_equal: 0
291         default: 60
292         metadata:
293           common: true
294         description: The maximum time in seconds to wait for a state chage from uninitialized to passive
295       passiveToRunningTimeout:
296         type: integer
297         required: false
298         constraints:
299           - greater_or_equal: 0
300         default: 60
301         metadata:
302           common: true
303         description: The maximum time in seconds to wait for a state chage from passive to running
304       runningToPassiveTimeout:
305         type: integer
306         required: false
307         constraints:
308           - greater_or_equal: 0
309         default: 60
310         metadata:
311           common: true
312         description: The maximum time in seconds to wait for a state chage from running to passive
313       passiveToUninitializedTimeout:
314         type: integer
315         required: false
316         constraints:
317           - greater_or_equal: 0
318         default: 60
319         metadata:
320           common: true
321         description: The maximum time in seconds to wait for a state chage from passive to uninitialized
322   org.onap.policy.clamp.acm.AutomationComposition:
323     version: 1.0.1
324     derived_from: tosca.nodetypes.Root
325     properties:
326       provider:
327         type: string
328         required: false
329         metadata:
330           common: true
331         description: Specifies the organization that provides the automation composition element
332       elements:
333         type: list
334         required: true
335         metadata:
336           common: true
337         entry_schema:
338           type: onap.datatypes.ToscaConceptIdentifier
339         description: Specifies a list of automation composition element definitions that make up this automation composition definition
340   org.onap.policy.clamp.acm.PolicyAutomationCompositionElement:
341     version: 1.0.1
342     derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
343     properties:
344       policy_type_id:
345         type: onap.datatypes.ToscaConceptIdentifier
346         required: true
347       policy_id:
348         type: onap.datatypes.ToscaConceptIdentifier
349         required: false
350   org.onap.policy.clamp.acm.CDSAutomationCompositionElement:
351     version: 1.0.1
352     derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
353     properties:
354       cds_blueprint_id:
355         type: onap.datatypes.ToscaConceptIdentifier
356         required: true
357   org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement:
358     version: 1.0.1
359     derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
360     properties:
361       chart:
362         type: string
363         required: true
364       configs:
365         type: list
366         required: false
367       requirements:
368         type: string
369         required: false
370       templates:
371         type: list
372         required: false
373         entry_schema:
374       values:
375         type: string
376         required: true
377   org.onap.policy.clamp.acm.HttpAutomationCompositionElement:
378     version: 1.0.1
379     derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
380     properties:
381       baseUrl:
382         type: string
383         required: true
384         description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
385       httpHeaders:
386         type: map
387         required: false
388         entry_schema:
389           type: string
390         description: HTTP headers to send on REST requests
391       configurationEntities:
392         type: map
393         required: true
394         entry_schema:
395           type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity
396           type_version: 1.0.0
397         description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests
398
399 topology_template:
400   inputs:
401     pmsh_operational_policy:
402       type: onap.datatypes.ToscaConceptIdentifier
403       description: The ID of the PMSH operational policy to use
404       default:
405         name: operational.apex.pmcontrol
406         version: 1.0.0
407   node_templates:
408     org.onap.policy.clamp.acm.PolicyParticipant:
409       version: 2.3.1
410       type: org.onap.policy.clamp.acm.Participant
411       type_version: 1.0.1
412       description: Participant for DCAE microservices
413       properties:
414         provider: ONAP
415     org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement:
416       version: 1.2.3
417       type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement
418       type_version: 1.0.1
419       description: Automation composition element for the operational policy for Performance Management Subscription Handling
420       properties:
421         provider: Ericsson
422         participant_id:
423           name: org.onap.PM_Policy
424           version: 1.0.0
425         participantType:
426           name: org.onap.policy.clamp.acm.PolicyParticipant
427           version: 2.3.1
428         policy_type_id:
429           name: onap.policies.operational.pm-subscription-handler
430           version: 1.0.0
431         policy_id:
432           get_input: pmsh_operational_policy
433
434
435     org.onap.policy.clamp.acm.KubernetesParticipant:
436       version: 2.3.4
437       type: org.onap.policy.clamp.acm.Participant
438       type_version: 1.0.1
439       description: Participant for K8S
440       properties:
441         provider: ONAP
442     org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement:
443       # Chart from new repository
444       version: 1.2.3
445       type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
446       type_version: 1.0.1
447       description: Automation composition element for the K8S microservice for PMSH
448       properties:
449         provider: ONAP
450         participant_id:
451           name: K8sParticipant0
452           version: 1.0.0
453         participantType:
454           name: org.onap.policy.clamp.acm.KubernetesParticipant
455           version: 2.3.4
456         chart:
457           chartId:
458             name: dcae-pmsh
459             version: 10.0.0
460           namespace: onap
461           releaseName: onap-dcae-pmsh
462           repository:
463             repoName: chartmuseum
464             address: http://chart-museum:80
465             userName: onapinitializer
466             password: demo123456!
467           overrideParams:
468             global.masterPassword: test
469     org.onap.policy.clamp.acm.HttpParticipant:
470       version: 2.3.4
471       type: org.onap.policy.clamp.acm.Participant
472       type_version: 1.0.1
473       description: Participant for Http requests
474       properties:
475         provider: ONAP
476     org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement:
477       # Consul http config for PMSH.
478       version: 1.2.3
479       type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
480       type_version: 1.0.1
481       description: Automation composition element for the http requests of PMSH microservice
482       properties:
483         provider: ONAP
484         participant_id:
485           name: HttpParticipant0
486           version: 1.0.0
487         participantType:
488           name: org.onap.policy.clamp.acm.HttpParticipant
489           version: 2.3.4
490         uninitializedToPassiveTimeout: 180
491         startPhase: 1
492         baseUrl: https://dcae-pmsh:8443
493         httpHeaders:
494           Content-Type: application/json
495         configurationEntities:
496           - configurationEntityId:
497               name: entity1
498               version: 1.0.1
499             restSequence:
500               - restRequestId:
501                   name: request1
502                   version: 1.0.1
503                 httpMethod: POST
504                 path: subscription
505                 body: '{
506                          "subscription":{
507                          "subscriptionName":"new_sub_01",
508                          "operationalPolicyName":"pmsh-operational-policy",
509                          "controlLoopName":"controlLoop-name",
510                          "nfFilter":{
511                          "nfNames":[
512                                 "^pnf*"
513                          ],
514                          "modelInvariantIDs":[
515                             "7129e420-d396-4efb-af02-6b83499b12f5"
516                          ],
517                             "modelVersionIDs":[
518                          "e80a6ae3-cafd-4d24-850d-e14c084a5ca7"
519                          ],
520                         "modelNames":[
521                         "pnf_134"
522                         ]
523                         },
524                         "measurementGroups":[
525                         {
526                             "measurementGroup":{
527                             "measurementGroupName":"msgroup_01",
528                             "administrativeState":"UNLOCKED",
529                             "fileBasedGP":15,
530                             "fileLocation":"/pm/pm.xml",
531                             "measurementTypes":[
532                             {
533                             "measurementType":"EutranCell.*"
534                             },
535                             {
536                             "measurementType":"EutranCellRelation.pmCounter1"
537                             },
538                             {
539                             "measurementType":"EutranCellRelation.pmCounter2"
540                             }
541                         ],
542                         "managedObjectDNsBasic":[
543                         {
544                         "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1"
545                         },
546                         {
547                         "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter2"
548                         },
549                         {
550                         "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter3"
551                         }
552                         ]
553                         }
554                             }
555                         ]
556                         }
557                 }'
558                 expectedResponse: 201
559
560
561     org.onap.domain.sample.GenericK8s_AutomationCompositionDefinition:
562       version: 1.2.3
563       type: org.onap.policy.clamp.acm.AutomationComposition
564       type_version: 1.0.1
565       description: Automation composition for Hello World
566       properties:
567         provider: ONAP
568         elements:
569           - name: org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement
570             version: 1.2.3
571           - name: org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement
572             version: 1.2.3
573           - name: org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement
574             version: 1.2.3
575   policies:
576     - operational.apex.pmcontrol:
577         type: onap.policies.controlloop.operational.common.Apex
578         type_version: 1.0.0
579         version: 1.0.0
580         properties:
581           engineServiceParameters:
582             name: MyApexEngine
583             version: 0.0.1
584             id: 45
585             instanceCount: 2
586             deploymentPort: 12561
587             engineParameters:
588               executorParameters:
589                 JAVASCRIPT:
590                   parameterClassName: org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters
591               contextParameters:
592                 parameterClassName: org.onap.policy.apex.context.parameters.ContextParameters
593                 schemaParameters:
594                   Avro:
595                     parameterClassName: org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters
596                   Java:
597                     parameterClassName: org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters
598                     jsonAdapters:
599                       Instant:
600                         adaptedClass: java.time.Instant
601                         adaptorClass: org.onap.policy.common.gson.InstantAsMillisTypeAdapter
602             policy_type_impl:
603               apexPolicyModel:
604                 key:
605                   name: PMControlPolicy
606                   version: 0.0.1
607                 keyInformation:
608                   key:
609                     name: PMControlPolicy_KeyInfo
610                     version: 0.0.1
611                   keyInfoMap:
612                     entry:
613                       - key:
614                           name: CDSActionIdentifiersType
615                           version: 0.0.1
616                         value:
617                           key:
618                             name: CDSActionIdentifiersType
619                             version: 0.0.1
620                           UUID: 6e5fa19b-14df-37e3-a4ae-8c537e861a82
621                           description: Generated description for concept referred to by
622                             key "CDSActionIdentifiersType:0.0.1"
623                       - key:
624                           name: CDSCreateResponseEvent
625                           version: 0.0.1
626                         value:
627                           key:
628                             name: CDSCreateResponseEvent
629                             version: 0.0.1
630                           UUID: 14b29e38-ac75-3273-aa4e-8583c0aa7dad
631                           description: Generated description for concept referred to by
632                             key "CDSCreateResponseEvent:0.0.1"
633                       - key:
634                           name: CDSCreateResponsePayloadType
635                           version: 0.0.1
636                         value:
637                           key:
638                             name: CDSCreateResponsePayloadType
639                             version: 0.0.1
640                           UUID: 04573f8f-e772-30a5-b1d9-d7318d4a1e13
641                           description: Generated description for concept referred to by
642                             key "CDSCreateResponsePayloadType:0.0.1"
643                       - key:
644                           name: CDSCreateResponsePolicy
645                           version: 0.0.1
646                         value:
647                           key:
648                             name: CDSCreateResponsePolicy
649                             version: 0.0.1
650                           UUID: e126c965-fc09-3bfe-8f55-70f380a4a49c
651                           description: Generated description for concept referred to by
652                             key "CDSCreateResponsePolicy:0.0.1"
653                       - key:
654                           name: CDSCreateResponseTask
655                           version: 0.0.1
656                         value:
657                           key:
658                             name: CDSCreateResponseTask
659                             version: 0.0.1
660                           UUID: 6165ee82-afd2-3aab-a517-f00b3f2461d2
661                           description: Generated description for concept referred to by
662                             key "CDSCreateResponseTask:0.0.1"
663                       - key:
664                           name: CDSCreateSubscriptionPayloadType
665                           version: 0.0.1
666                         value:
667                           key:
668                             name: CDSCreateSubscriptionPayloadType
669                             version: 0.0.1
670                           UUID: 8350ac5e-c157-38b9-9614-a0f93a830e60
671                           description: Generated description for concept referred to by
672                             key "CDSCreateSubscriptionPayloadType:0.0.1"
673                       - key:
674                           name: CDSCreateSubscriptionRequestEvent
675                           version: 0.0.1
676                         value:
677                           key:
678                             name: CDSCreateSubscriptionRequestEvent
679                             version: 0.0.1
680                           UUID: cfa325ba-226b-3a31-9183-ec43e2b6e9a2
681                           description: Generated description for concept referred to by
682                             key "CDSCreateSubscriptionRequestEvent:0.0.1"
683                       - key:
684                           name: CDSDeleteResponseEvent
685                           version: 0.0.1
686                         value:
687                           key:
688                             name: CDSDeleteResponseEvent
689                             version: 0.0.1
690                           UUID: 8be9c0fa-7437-3841-aff2-b3cec6ae3bd8
691                           description: Generated description for concept referred to by
692                             key "CDSDeleteResponseEvent:0.0.1"
693                       - key:
694                           name: CDSDeleteResponsePayloadType
695                           version: 0.0.1
696                         value:
697                           key:
698                             name: CDSDeleteResponsePayloadType
699                             version: 0.0.1
700                           UUID: 3fbfe0c9-152e-34d3-a504-09cd13c058d0
701                           description: Generated description for concept referred to by
702                             key "CDSDeleteResponsePayloadType:0.0.1"
703                       - key:
704                           name: CDSDeleteResponsePolicy
705                           version: 0.0.1
706                         value:
707                           key:
708                             name: CDSDeleteResponsePolicy
709                             version: 0.0.1
710                           UUID: a780251c-edd5-3132-b865-04313246b43c
711                           description: Generated description for concept referred to by
712                             key "CDSDeleteResponsePolicy:0.0.1"
713                       - key:
714                           name: CDSDeleteResponseTask
715                           version: 0.0.1
716                         value:
717                           key:
718                             name: CDSDeleteResponseTask
719                             version: 0.0.1
720                           UUID: afce4555-3aa3-3521-a7d8-ee8cdf0d3efc
721                           description: Generated description for concept referred to by
722                             key "CDSDeleteResponseTask:0.0.1"
723                       - key:
724                           name: CDSDeleteSubscriptionPayloadType
725                           version: 0.0.1
726                         value:
727                           key:
728                             name: CDSDeleteSubscriptionPayloadType
729                             version: 0.0.1
730                           UUID: 12658406-9147-3c9d-a38c-5ad5e30b092b
731                           description: Generated description for concept referred to by
732                             key "CDSDeleteSubscriptionPayloadType:0.0.1"
733                       - key:
734                           name: CDSDeleteSubscriptionRequestEvent
735                           version: 0.0.1
736                         value:
737                           key:
738                             name: CDSDeleteSubscriptionRequestEvent
739                             version: 0.0.1
740                           UUID: 24380c95-9289-36e6-8cbf-0edefa15ccd9
741                           description: Generated description for concept referred to by
742                             key "CDSDeleteSubscriptionRequestEvent:0.0.1"
743                       - key:
744                           name: CDSRequestCommonHeaderType
745                           version: 0.0.1
746                         value:
747                           key:
748                             name: CDSRequestCommonHeaderType
749                             version: 0.0.1
750                           UUID: 35590ac0-062c-39f1-8786-b4ff716e30b1
751                           description: Generated description for concept referred to by
752                             key "CDSRequestCommonHeaderType:0.0.1"
753                       - key:
754                           name: CDSResponseCommonHeaderType
755                           version: 0.0.1
756                         value:
757                           key:
758                             name: CDSResponseCommonHeaderType
759                             version: 0.0.1
760                           UUID: dd7e1805-885a-350b-aaf9-ed541321ae3c
761                           description: Generated description for concept referred to by
762                             key "CDSResponseCommonHeaderType:0.0.1"
763                       - key:
764                           name: CDSResponseStatusEvent
765                           version: 0.0.1
766                         value:
767                           key:
768                             name: CDSResponseStatusEvent
769                             version: 0.0.1
770                           UUID: 7986e21b-32f7-302e-9554-31f21b673493
771                           description: Generated description for concept referred to by
772                             key "CDSResponseStatusEvent:0.0.1"
773                       - key:
774                           name: CDSResponseStatusType
775                           version: 0.0.1
776                         value:
777                           key:
778                             name: CDSResponseStatusType
779                             version: 0.0.1
780                           UUID: 92b8a2cf-344e-3ce1-8cc0-2b7d3cb695fa
781                           description: Generated description for concept referred to by
782                             key "CDSResponseStatusType:0.0.1"
783                       - key:
784                           name: CreateSubscriptionPayloadEvent
785                           version: 0.0.1
786                         value:
787                           key:
788                             name: CreateSubscriptionPayloadEvent
789                             version: 0.0.1
790                           UUID: 92162397-1a8e-3a3f-a469-d2af7700af4a
791                           description: Generated description for concept referred to by
792                             key "CreateSubscriptionPayloadEvent:0.0.1"
793                       - key:
794                           name: CreateSubscriptionPayloadTask
795                           version: 0.0.1
796                         value:
797                           key:
798                             name: CreateSubscriptionPayloadTask
799                             version: 0.0.1
800                           UUID: bc0c69f0-52ed-38ea-b468-ae4a6fd1730d
801                           description: Generated description for concept referred to by
802                             key "CreateSubscriptionPayloadTask:0.0.1"
803                       - key:
804                           name: CreateSubscriptionRequestTask
805                           version: 0.0.1
806                         value:
807                           key:
808                             name: CreateSubscriptionRequestTask
809                             version: 0.0.1
810                           UUID: 89cb75e9-f06c-30d3-b4ff-698d45f63869
811                           description: Generated description for concept referred to by
812                             key "CreateSubscriptionRequestTask:0.0.1"
813                       - key:
814                           name: DeleteSubscriptionPayloadEvent
815                           version: 0.0.1
816                         value:
817                           key:
818                             name: DeleteSubscriptionPayloadEvent
819                             version: 0.0.1
820                           UUID: 994fa441-04ab-33bb-832d-1cd12ab5d074
821                           description: Generated description for concept referred to by
822                             key "DeleteSubscriptionPayloadEvent:0.0.1"
823                       - key:
824                           name: DeleteSubscriptionPayloadTask
825                           version: 0.0.1
826                         value:
827                           key:
828                             name: DeleteSubscriptionPayloadTask
829                             version: 0.0.1
830                           UUID: 0f519117-5fea-3e4b-941f-8f778100465f
831                           description: Generated description for concept referred to by
832                             key "DeleteSubscriptionPayloadTask:0.0.1"
833                       - key:
834                           name: DeleteSubscriptionRequestTask
835                           version: 0.0.1
836                         value:
837                           key:
838                             name: DeleteSubscriptionRequestTask
839                             version: 0.0.1
840                           UUID: acb772fe-d442-39e3-98f9-b1080caf4150
841                           description: Generated description for concept referred to by
842                             key "DeleteSubscriptionRequestTask:0.0.1"
843                       - key:
844                           name: MRResponseEvent
845                           version: 0.0.1
846                         value:
847                           key:
848                             name: MRResponseEvent
849                             version: 0.0.1
850                           UUID: 13c747a3-6bae-3bcf-9c80-b152e01dc194
851                           description: Generated description for concept referred to by
852                             key "MRResponseEvent:0.0.1"
853                       - key:
854                           name: PMControlPolicy
855                           version: 0.0.1
856                         value:
857                           key:
858                             name: PMControlPolicy
859                             version: 0.0.1
860                           UUID: acf1e55c-7bc5-3bd5-975a-0ca54afcd8a4
861                           description: Generated description for concept referred to by
862                             key "PMControlPolicy:0.0.1"
863                       - key:
864                           name: PMControlPolicy_Albums
865                           version: 0.0.1
866                         value:
867                           key:
868                             name: PMControlPolicy_Albums
869                             version: 0.0.1
870                           UUID: b38ad204-c2c8-32f4-9b5a-dda0aeb0145b
871                           description: Generated description for concept referred to by
872                             key "PMControlPolicy_Albums:0.0.1"
873                       - key:
874                           name: PMControlPolicy_Events
875                           version: 0.0.1
876                         value:
877                           key:
878                             name: PMControlPolicy_Events
879                             version: 0.0.1
880                           UUID: be3871a0-c42a-3113-a066-82d192840eca
881                           description: Generated description for concept referred to by
882                             key "PMControlPolicy_Events:0.0.1"
883                       - key:
884                           name: PMControlPolicy_KeyInfo
885                           version: 0.0.1
886                         value:
887                           key:
888                             name: PMControlPolicy_KeyInfo
889                             version: 0.0.1
890                           UUID: ced37634-28a4-3178-b7f6-2980794927b0
891                           description: Generated description for concept referred to by
892                             key "PMControlPolicy_KeyInfo:0.0.1"
893                       - key:
894                           name: PMControlPolicy_Policies
895                           version: 0.0.1
896                         value:
897                           key:
898                             name: PMControlPolicy_Policies
899                             version: 0.0.1
900                           UUID: be3d180d-ef9c-3a75-8e9c-84271a038bed
901                           description: Generated description for concept referred to by
902                             key "PMControlPolicy_Policies:0.0.1"
903                       - key:
904                           name: PMControlPolicy_Schemas
905                           version: 0.0.1
906                         value:
907                           key:
908                             name: PMControlPolicy_Schemas
909                             version: 0.0.1
910                           UUID: e61973f1-189c-39e5-82f6-0d3afe298a20
911                           description: Generated description for concept referred to by
912                             key "PMControlPolicy_Schemas:0.0.1"
913                       - key:
914                           name: PMControlPolicy_Tasks
915                           version: 0.0.1
916                         value:
917                           key:
918                             name: PMControlPolicy_Tasks
919                             version: 0.0.1
920                           UUID: 5658adb3-2962-30a3-a241-fae75bb8eb4a
921                           description: Generated description for concept referred to by
922                             key "PMControlPolicy_Tasks:0.0.1"
923                       - key:
924                           name: PMSubscriptionAlbum
925                           version: 0.0.1
926                         value:
927                           key:
928                             name: PMSubscriptionAlbum
929                             version: 0.0.1
930                           UUID: c2bd6f0d-6854-317a-9be2-97c08338428c
931                           description: Generated description for concept referred to by
932                             key "PMSubscriptionAlbum:0.0.1"
933                       - key:
934                           name: PMSubscriptionOutputEvent
935                           version: 0.0.1
936                         value:
937                           key:
938                             name: PMSubscriptionOutputEvent
939                             version: 0.0.1
940                           UUID: 992b7819-9f69-3aa0-bb0f-6e45ea15ce05
941                           description: Generated description for concept referred to by
942                             key "PMSubscriptionOutputEvent:0.0.1"
943                       - key:
944                           name: PMSubscriptionType
945                           version: 0.0.1
946                         value:
947                           key:
948                             name: PMSubscriptionType
949                             version: 0.0.1
950                           UUID: 73c1c397-4fc3-357f-93b6-a8ad707fbaae
951                           description: Generated description for concept referred to by
952                             key "PMSubscriptionType:0.0.1"
953                       - key:
954                           name: ReceiveEventPolicy
955                           version: 0.0.1
956                         value:
957                           key:
958                             name: ReceiveEventPolicy
959                             version: 0.0.1
960                           UUID: 568b7345-9de1-36d3-b6a3-9b857e6809a1
961                           description: Generated description for concept referred to by
962                             key "ReceiveEventPolicy:0.0.1"
963                       - key:
964                           name: ReceiveSubscriptionTask
965                           version: 0.0.1
966                         value:
967                           key:
968                             name: ReceiveSubscriptionTask
969                             version: 0.0.1
970                           UUID: f596afc8-100c-35eb-92c8-352355ea457d
971                           description: Generated description for concept referred to by
972                             key "ReceiveSubscriptionTask:0.0.1"
973                       - key:
974                           name: SimpleIntType
975                           version: 0.0.1
976                         value:
977                           key:
978                             name: SimpleIntType
979                             version: 0.0.1
980                           UUID: 153791fd-ae0a-36a7-88a5-309a7936415d
981                           description: Generated description for concept referred to by
982                             key "SimpleIntType:0.0.1"
983                       - key:
984                           name: SimpleStringType
985                           version: 0.0.1
986                         value:
987                           key:
988                             name: SimpleStringType
989                             version: 0.0.1
990                           UUID: 8a4957cf-9493-3a76-8c22-a208e23259af
991                           description: Generated description for concept referred to by
992                             key "SimpleStringType:0.0.1"
993                       - key:
994                           name: SubscriptionStatusType
995                           version: 0.0.1
996                         value:
997                           key:
998                             name: SubscriptionStatusType
999                             version: 0.0.1
1000                           UUID: 597643b1-9db1-31ce-85d0-e1c63c43b30b
1001                           description: Generated description for concept referred to by
1002                             key "SubscriptionStatusType:0.0.1"
1003                       - key:
1004                           name: SubscriptionType
1005                           version: 0.0.1
1006                         value:
1007                           key:
1008                             name: SubscriptionType
1009                             version: 0.0.1
1010                           UUID: 184547bb-7d64-3cb2-a273-d7185102c5ce
1011                           description: Generated description for concept referred to by
1012                             key "SubscriptionType:0.0.1"
1013                       - key:
1014                           name: UUIDType
1015                           version: 0.0.1
1016                         value:
1017                           key:
1018                             name: UUIDType
1019                             version: 0.0.1
1020                           UUID: 6a8cc68e-dfc8-3403-9c6d-071c886b319c
1021                           description: Generated description for concept referred to by
1022                             key "UUIDType:0.0.1"
1023                       - key:
1024                           name: pmsh-operational-policy
1025                           version: 0.0.1
1026                         value:
1027                           key:
1028                             name: pmsh-operational-policy
1029                             version: 0.0.1
1030                           UUID: fdf2c9ff-6422-3ea6-b6b6-49b12116265d
1031                           description: Generated description for concept referred to by
1032                             key "pmsh-operational-policy:0.0.1"
1033                 policies:
1034                   key:
1035                     name: PMControlPolicy_Policies
1036                     version: 0.0.1
1037                   policyMap:
1038                     entry:
1039                       - key:
1040                           name: CDSCreateResponsePolicy
1041                           version: 0.0.1
1042                         value:
1043                           policyKey:
1044                             name: CDSCreateResponsePolicy
1045                             version: 0.0.1
1046                           template: Freestyle
1047                           state:
1048                             entry:
1049                               - key: CDSCreateResponseState
1050                                 value:
1051                                   stateKey:
1052                                     parentKeyName: CDSCreateResponsePolicy
1053                                     parentKeyVersion: 0.0.1
1054                                     parentLocalName: 'NULL'
1055                                     localName: CDSCreateResponseState
1056                                   trigger:
1057                                     name: CDSCreateResponseEvent
1058                                     version: 0.0.1
1059                                   stateOutputs:
1060                                     entry:
1061                                       - key: ResponseOutput
1062                                         value:
1063                                           key:
1064                                             parentKeyName: CDSCreateResponsePolicy
1065                                             parentKeyVersion: 0.0.1
1066                                             parentLocalName: CDSCreateResponseState
1067                                             localName: ResponseOutput
1068                                           outgoingEvent:
1069                                             name: CDSResponseStatusEvent
1070                                             version: 0.0.1
1071                                           outgoingEventReference:
1072                                             - name: CDSResponseStatusEvent
1073                                               version: 0.0.1
1074                                           nextState:
1075                                             parentKeyName: 'NULL'
1076                                             parentKeyVersion: 0.0.0
1077                                             parentLocalName: 'NULL'
1078                                             localName: 'NULL'
1079                                   contextAlbumReference: [ ]
1080                                   taskSelectionLogic:
1081                                     key: 'NULL'
1082                                     logicFlavour: UNDEFINED
1083                                     logic: ''
1084                                   stateFinalizerLogicMap:
1085                                     entry: [ ]
1086                                   defaultTask:
1087                                     name: CDSCreateResponseTask
1088                                     version: 0.0.1
1089                                   taskReferences:
1090                                     entry:
1091                                       - key:
1092                                           name: CDSCreateResponseTask
1093                                           version: 0.0.1
1094                                         value:
1095                                           key:
1096                                             parentKeyName: CDSCreateResponsePolicy
1097                                             parentKeyVersion: 0.0.1
1098                                             parentLocalName: CDSCreateResponseState
1099                                             localName: CDSCreateResponsePolicy
1100                                           outputType: DIRECT
1101                                           output:
1102                                             parentKeyName: CDSCreateResponsePolicy
1103                                             parentKeyVersion: 0.0.1
1104                                             parentLocalName: CDSCreateResponseState
1105                                             localName: ResponseOutput
1106                           firstState: CDSCreateResponseState
1107                       - key:
1108                           name: CDSDeleteResponsePolicy
1109                           version: 0.0.1
1110                         value:
1111                           policyKey:
1112                             name: CDSDeleteResponsePolicy
1113                             version: 0.0.1
1114                           template: Freestyle
1115                           state:
1116                             entry:
1117                               - key: CDSDeleteResponseState
1118                                 value:
1119                                   stateKey:
1120                                     parentKeyName: CDSDeleteResponsePolicy
1121                                     parentKeyVersion: 0.0.1
1122                                     parentLocalName: 'NULL'
1123                                     localName: CDSDeleteResponseState
1124                                   trigger:
1125                                     name: CDSDeleteResponseEvent
1126                                     version: 0.0.1
1127                                   stateOutputs:
1128                                     entry:
1129                                       - key: ResponseOutput
1130                                         value:
1131                                           key:
1132                                             parentKeyName: CDSDeleteResponsePolicy
1133                                             parentKeyVersion: 0.0.1
1134                                             parentLocalName: CDSDeleteResponseState
1135                                             localName: ResponseOutput
1136                                           outgoingEvent:
1137                                             name: CDSResponseStatusEvent
1138                                             version: 0.0.1
1139                                           outgoingEventReference:
1140                                             - name: CDSResponseStatusEvent
1141                                               version: 0.0.1
1142                                           nextState:
1143                                             parentKeyName: 'NULL'
1144                                             parentKeyVersion: 0.0.0
1145                                             parentLocalName: 'NULL'
1146                                             localName: 'NULL'
1147                                   contextAlbumReference: [ ]
1148                                   taskSelectionLogic:
1149                                     key: 'NULL'
1150                                     logicFlavour: UNDEFINED
1151                                     logic: ''
1152                                   stateFinalizerLogicMap:
1153                                     entry: [ ]
1154                                   defaultTask:
1155                                     name: CDSDeleteResponseTask
1156                                     version: 0.0.1
1157                                   taskReferences:
1158                                     entry:
1159                                       - key:
1160                                           name: CDSDeleteResponseTask
1161                                           version: 0.0.1
1162                                         value:
1163                                           key:
1164                                             parentKeyName: CDSDeleteResponsePolicy
1165                                             parentKeyVersion: 0.0.1
1166                                             parentLocalName: CDSDeleteResponseState
1167                                             localName: CDSDeleteResponsePolicy
1168                                           outputType: DIRECT
1169                                           output:
1170                                             parentKeyName: CDSDeleteResponsePolicy
1171                                             parentKeyVersion: 0.0.1
1172                                             parentLocalName: CDSDeleteResponseState
1173                                             localName: ResponseOutput
1174                           firstState: CDSDeleteResponseState
1175                       - key:
1176                           name: ReceiveEventPolicy
1177                           version: 0.0.1
1178                         value:
1179                           policyKey:
1180                             name: ReceiveEventPolicy
1181                             version: 0.0.1
1182                           template: Freestyle
1183                           state:
1184                             entry:
1185                               - key: CreateOrDeleteState
1186                                 value:
1187                                   stateKey:
1188                                     parentKeyName: ReceiveEventPolicy
1189                                     parentKeyVersion: 0.0.1
1190                                     parentLocalName: 'NULL'
1191                                     localName: CreateOrDeleteState
1192                                   trigger:
1193                                     name: PMSubscriptionOutputEvent
1194                                     version: 0.0.1
1195                                   stateOutputs:
1196                                     entry:
1197                                       - key: CreateSubscriptionPayload
1198                                         value:
1199                                           key:
1200                                             parentKeyName: ReceiveEventPolicy
1201                                             parentKeyVersion: 0.0.1
1202                                             parentLocalName: CreateOrDeleteState
1203                                             localName: CreateSubscriptionPayload
1204                                           outgoingEvent:
1205                                             name: CreateSubscriptionPayloadEvent
1206                                             version: 0.0.1
1207                                           outgoingEventReference:
1208                                             - name: CreateSubscriptionPayloadEvent
1209                                               version: 0.0.1
1210                                           nextState:
1211                                             parentKeyName: ReceiveEventPolicy
1212                                             parentKeyVersion: 0.0.1
1213                                             parentLocalName: 'NULL'
1214                                             localName: CreateSubscription
1215                                       - key: DeleteSubscriptionPayload
1216                                         value:
1217                                           key:
1218                                             parentKeyName: ReceiveEventPolicy
1219                                             parentKeyVersion: 0.0.1
1220                                             parentLocalName: CreateOrDeleteState
1221                                             localName: DeleteSubscriptionPayload
1222                                           outgoingEvent:
1223                                             name: DeleteSubscriptionPayloadEvent
1224                                             version: 0.0.1
1225                                           outgoingEventReference:
1226                                             - name: DeleteSubscriptionPayloadEvent
1227                                               version: 0.0.1
1228                                           nextState:
1229                                             parentKeyName: ReceiveEventPolicy
1230                                             parentKeyVersion: 0.0.1
1231                                             parentLocalName: 'NULL'
1232                                             localName: DeleteSubscription
1233                                   contextAlbumReference:
1234                                     - name: PMSubscriptionAlbum
1235                                       version: 0.0.1
1236                                   taskSelectionLogic:
1237                                     key: TaskSelectionLogic
1238                                     logicFlavour: JAVASCRIPT
1239                                     logic: |-
1240                                       /*
1241                                        * ============LICENSE_START=======================================================
1242                                        *  Copyright (C) 2020 Nordix. All rights reserved.
1243                                        * ================================================================================
1244                                        * Licensed under the Apache License, Version 2.0 (the "License");
1245                                        * you may not use this file except in compliance with the License.
1246                                        * You may obtain a copy of the License at
1247                                        *
1248                                        *      http://www.apache.org/licenses/LICENSE-2.0
1249                                        *
1250                                        * Unless required by applicable law or agreed to in writing, software
1251                                        * distributed under the License is distributed on an "AS IS" BASIS,
1252                                        * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1253                                        * See the License for the specific language governing permissions and
1254                                        * limitations under the License.
1255                                        *
1256                                        * SPDX-License-Identifier: Apache-2.0
1257                                        * ============LICENSE_END=========================================================
1258                                        */
1259                                       executor.logger.info(executor.subject.id);
1260                                       var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString())
1261                                       var changeType = pmSubscriptionInfo.get("changeType").toString()
1262                                       executor.logger.info("Change Type is " + changeType)
1263                                       if ("CREATE".equals(changeType)) {
1264                                           executor.logger.info("Choosing to create a subscription")
1265                                           executor.subject.getTaskKey("CreateSubscriptionPayloadTask").copyTo(executor.selectedTask);
1266                                       }
1267                                       else if ("DELETE".equals(changeType)) {
1268                                           executor.logger.info("Choosing to delete a subscription")
1269                                           executor.subject.getTaskKey("DeleteSubscriptionPayloadTask").copyTo(executor.selectedTask);
1270                                       }
1271                                       returnValue = executor.isTrue;
1272                                       true;
1273                                   stateFinalizerLogicMap:
1274                                     entry: [ ]
1275                                   defaultTask:
1276                                     name: CreateSubscriptionPayloadTask
1277                                     version: 0.0.1
1278                                   taskReferences:
1279                                     entry:
1280                                       - key:
1281                                           name: CreateSubscriptionPayloadTask
1282                                           version: 0.0.1
1283                                         value:
1284                                           key:
1285                                             parentKeyName: ReceiveEventPolicy
1286                                             parentKeyVersion: 0.0.1
1287                                             parentLocalName: CreateOrDeleteState
1288                                             localName: ReceiveEventPolicy
1289                                           outputType: DIRECT
1290                                           output:
1291                                             parentKeyName: ReceiveEventPolicy
1292                                             parentKeyVersion: 0.0.1
1293                                             parentLocalName: CreateOrDeleteState
1294                                             localName: CreateSubscriptionPayload
1295                                       - key:
1296                                           name: DeleteSubscriptionPayloadTask
1297                                           version: 0.0.1
1298                                         value:
1299                                           key:
1300                                             parentKeyName: ReceiveEventPolicy
1301                                             parentKeyVersion: 0.0.1
1302                                             parentLocalName: CreateOrDeleteState
1303                                             localName: ReceiveEventPolicy
1304                                           outputType: DIRECT
1305                                           output:
1306                                             parentKeyName: ReceiveEventPolicy
1307                                             parentKeyVersion: 0.0.1
1308                                             parentLocalName: CreateOrDeleteState
1309                                             localName: DeleteSubscriptionPayload
1310                               - key: CreateSubscription
1311                                 value:
1312                                   stateKey:
1313                                     parentKeyName: ReceiveEventPolicy
1314                                     parentKeyVersion: 0.0.1
1315                                     parentLocalName: 'NULL'
1316                                     localName: CreateSubscription
1317                                   trigger:
1318                                     name: CreateSubscriptionPayloadEvent
1319                                     version: 0.0.1
1320                                   stateOutputs:
1321                                     entry:
1322                                       - key: IssueCreateSubscriptionRequestOutput
1323                                         value:
1324                                           key:
1325                                             parentKeyName: ReceiveEventPolicy
1326                                             parentKeyVersion: 0.0.1
1327                                             parentLocalName: CreateSubscription
1328                                             localName: IssueCreateSubscriptionRequestOutput
1329                                           outgoingEvent:
1330                                             name: CDSCreateSubscriptionRequestEvent
1331                                             version: 0.0.1
1332                                           outgoingEventReference:
1333                                             - name: CDSCreateSubscriptionRequestEvent
1334                                               version: 0.0.1
1335                                           nextState:
1336                                             parentKeyName: 'NULL'
1337                                             parentKeyVersion: 0.0.0
1338                                             parentLocalName: 'NULL'
1339                                             localName: 'NULL'
1340                                   contextAlbumReference:
1341                                     - name: PMSubscriptionAlbum
1342                                       version: 0.0.1
1343                                   taskSelectionLogic:
1344                                     key: 'NULL'
1345                                     logicFlavour: UNDEFINED
1346                                     logic: ''
1347                                   stateFinalizerLogicMap:
1348                                     entry: [ ]
1349                                   defaultTask:
1350                                     name: CreateSubscriptionRequestTask
1351                                     version: 0.0.1
1352                                   taskReferences:
1353                                     entry:
1354                                       - key:
1355                                           name: CreateSubscriptionRequestTask
1356                                           version: 0.0.1
1357                                         value:
1358                                           key:
1359                                             parentKeyName: ReceiveEventPolicy
1360                                             parentKeyVersion: 0.0.1
1361                                             parentLocalName: CreateSubscription
1362                                             localName: ReceiveEventPolicy
1363                                           outputType: DIRECT
1364                                           output:
1365                                             parentKeyName: ReceiveEventPolicy
1366                                             parentKeyVersion: 0.0.1
1367                                             parentLocalName: CreateSubscription
1368                                             localName: IssueCreateSubscriptionRequestOutput
1369                               - key: DeleteSubscription
1370                                 value:
1371                                   stateKey:
1372                                     parentKeyName: ReceiveEventPolicy
1373                                     parentKeyVersion: 0.0.1
1374                                     parentLocalName: 'NULL'
1375                                     localName: DeleteSubscription
1376                                   trigger:
1377                                     name: DeleteSubscriptionPayloadEvent
1378                                     version: 0.0.1
1379                                   stateOutputs:
1380                                     entry:
1381                                       - key: IssueDeleteSubscriptionRequestOutput
1382                                         value:
1383                                           key:
1384                                             parentKeyName: ReceiveEventPolicy
1385                                             parentKeyVersion: 0.0.1
1386                                             parentLocalName: DeleteSubscription
1387                                             localName: IssueDeleteSubscriptionRequestOutput
1388                                           outgoingEvent:
1389                                             name: CDSDeleteSubscriptionRequestEvent
1390                                             version: 0.0.1
1391                                           outgoingEventReference:
1392                                             - name: CDSDeleteSubscriptionRequestEvent
1393                                               version: 0.0.1
1394                                           nextState:
1395                                             parentKeyName: 'NULL'
1396                                             parentKeyVersion: 0.0.0
1397                                             parentLocalName: 'NULL'
1398                                             localName: 'NULL'
1399                                   contextAlbumReference:
1400                                     - name: PMSubscriptionAlbum
1401                                       version: 0.0.1
1402                                   taskSelectionLogic:
1403                                     key: 'NULL'
1404                                     logicFlavour: UNDEFINED
1405                                     logic: ''
1406                                   stateFinalizerLogicMap:
1407                                     entry: [ ]
1408                                   defaultTask:
1409                                     name: DeleteSubscriptionRequestTask
1410                                     version: 0.0.1
1411                                   taskReferences:
1412                                     entry:
1413                                       - key:
1414                                           name: DeleteSubscriptionRequestTask
1415                                           version: 0.0.1
1416                                         value:
1417                                           key:
1418                                             parentKeyName: ReceiveEventPolicy
1419                                             parentKeyVersion: 0.0.1
1420                                             parentLocalName: DeleteSubscription
1421                                             localName: ReceiveEventPolicy
1422                                           outputType: DIRECT
1423                                           output:
1424                                             parentKeyName: ReceiveEventPolicy
1425                                             parentKeyVersion: 0.0.1
1426                                             parentLocalName: DeleteSubscription
1427                                             localName: IssueDeleteSubscriptionRequestOutput
1428                               - key: ReceiveSubscriptionState
1429                                 value:
1430                                   stateKey:
1431                                     parentKeyName: ReceiveEventPolicy
1432                                     parentKeyVersion: 0.0.1
1433                                     parentLocalName: 'NULL'
1434                                     localName: ReceiveSubscriptionState
1435                                   trigger:
1436                                     name: pmsh-operational-policy
1437                                     version: 0.0.1
1438                                   stateOutputs:
1439                                     entry:
1440                                       - key: ReceivePMSubscriptionOutput
1441                                         value:
1442                                           key:
1443                                             parentKeyName: ReceiveEventPolicy
1444                                             parentKeyVersion: 0.0.1
1445                                             parentLocalName: ReceiveSubscriptionState
1446                                             localName: ReceivePMSubscriptionOutput
1447                                           outgoingEvent:
1448                                             name: PMSubscriptionOutputEvent
1449                                             version: 0.0.1
1450                                           outgoingEventReference:
1451                                             - name: PMSubscriptionOutputEvent
1452                                               version: 0.0.1
1453                                           nextState:
1454                                             parentKeyName: ReceiveEventPolicy
1455                                             parentKeyVersion: 0.0.1
1456                                             parentLocalName: 'NULL'
1457                                             localName: CreateOrDeleteState
1458                                   contextAlbumReference:
1459                                     - name: PMSubscriptionAlbum
1460                                       version: 0.0.1
1461                                   taskSelectionLogic:
1462                                     key: 'NULL'
1463                                     logicFlavour: UNDEFINED
1464                                     logic: ''
1465                                   stateFinalizerLogicMap:
1466                                     entry: [ ]
1467                                   defaultTask:
1468                                     name: ReceiveSubscriptionTask
1469                                     version: 0.0.1
1470                                   taskReferences:
1471                                     entry:
1472                                       - key:
1473                                           name: ReceiveSubscriptionTask
1474                                           version: 0.0.1
1475                                         value:
1476                                           key:
1477                                             parentKeyName: ReceiveEventPolicy
1478                                             parentKeyVersion: 0.0.1
1479                                             parentLocalName: ReceiveSubscriptionState
1480                                             localName: ReceiveEventPolicy
1481                                           outputType: DIRECT
1482                                           output:
1483                                             parentKeyName: ReceiveEventPolicy
1484                                             parentKeyVersion: 0.0.1
1485                                             parentLocalName: ReceiveSubscriptionState
1486                                             localName: ReceivePMSubscriptionOutput
1487                           firstState: ReceiveSubscriptionState
1488                 tasks:
1489                   key:
1490                     name: PMControlPolicy_Tasks
1491                     version: 0.0.1
1492                   taskMap:
1493                     entry:
1494                       - key:
1495                           name: CDSCreateResponseTask
1496                           version: 0.0.1
1497                         value:
1498                           key:
1499                             name: CDSCreateResponseTask
1500                             version: 0.0.1
1501                           inputEvent:
1502                             key:
1503                               name: CDSCreateResponseEvent
1504                               version: 0.0.1
1505                             nameSpace: org.onap.policy.apex.onap.pmcontrol
1506                             source: CDS
1507                             target: APEX
1508                             parameter:
1509                               entry:
1510                                 - key: actionIdentifiers
1511                                   value:
1512                                     key: actionIdentifiers
1513                                     fieldSchemaKey:
1514                                       name: CDSActionIdentifiersType
1515                                       version: 0.0.1
1516                                     optional: false
1517                                 - key: commonHeader
1518                                   value:
1519                                     key: commonHeader
1520                                     fieldSchemaKey:
1521                                       name: CDSResponseCommonHeaderType
1522                                       version: 0.0.1
1523                                     optional: false
1524                                 - key: payload
1525                                   value:
1526                                     key: payload
1527                                     fieldSchemaKey:
1528                                       name: CDSCreateResponsePayloadType
1529                                       version: 0.0.1
1530                                     optional: false
1531                                 - key: status
1532                                   value:
1533                                     key: status
1534                                     fieldSchemaKey:
1535                                       name: CDSResponseStatusType
1536                                       version: 0.0.1
1537                                     optional: false
1538                           outputEvents:
1539                             entry:
1540                               - key: CDSResponseStatusEvent
1541                                 value:
1542                                   key:
1543                                     name: CDSResponseStatusEvent
1544                                     version: 0.0.1
1545                                   nameSpace: org.onap.policy.apex.onap.pmcontrol
1546                                   source: APEX
1547                                   target: DCAE
1548                                   parameter:
1549                                     entry:
1550                                       - key: status
1551                                         value:
1552                                           key: status
1553                                           fieldSchemaKey:
1554                                             name: SubscriptionStatusType
1555                                             version: 0.0.1
1556                                           optional: false
1557                           taskParameters:
1558                             entry: [ ]
1559                           contextAlbumReference:
1560                             - name: PMSubscriptionAlbum
1561                               version: 0.0.1
1562                           taskLogic:
1563                             key: TaskLogic
1564                             logicFlavour: JAVASCRIPT
1565                             logic: |-
1566                               /*
1567                                * ============LICENSE_START=======================================================
1568                                *  Copyright (C) 2020 Nordix. All rights reserved.
1569                                * ================================================================================
1570                                * Licensed under the Apache License, Version 2.0 (the "License");
1571                                * you may not use this file except in compliance with the License.
1572                                * You may obtain a copy of the License at
1573                                *
1574                                *      http://www.apache.org/licenses/LICENSE-2.0
1575                                *
1576                                * Unless required by applicable law or agreed to in writing, software
1577                                * distributed under the License is distributed on an "AS IS" BASIS,
1578                                * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1579                                * See the License for the specific language governing permissions and
1580                                * limitations under the License.
1581                                *
1582                                * SPDX-License-Identifier: Apache-2.0
1583                                * ============LICENSE_END=========================================================
1584                                */
1585                               executor.logger.info(executor.subject.id);
1586                               var commonHeader = executor.inFields.get("commonHeader")
1587                               var response = executor.inFields.get("payload")
1588                               var albumID = commonHeader.get("requestId")
1589                               var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(albumID.toString());
1590                               var responseStatus = executor.subject.getOutFieldSchemaHelper("status").createNewInstance();
1591                               var changeType = pmSubscriptionInfo.get("changeType").toUpperCase()
1592                               responseStatus.put("nfName", pmSubscriptionInfo.get("nfName"))
1593                               responseStatus.put("changeType", pmSubscriptionInfo.get("changeType"))
1594                               if ("CREATE".equals(changeType)) {
1595                                   responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName"))
1596                                   responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("subscription").get("measurementGroup").get("measurementGroupName"))
1597                               }
1598                               else if ("DELETE".equals(changeType)) {
1599                                   responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName"))
1600                                   responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName"))
1601                               }
1602                               var status = response.get(pmSubscriptionInfo.get("changeType").toLowerCase() + "_DasH_subscription_DasH_response").get("odl_DasH_response").get("status")
1603                               executor.logger.info("RESPONSE STATUS = " + status)
1604                               if(status == "success") {
1605                                   responseStatus.put("message", "success")
1606                               } else {
1607                                   responseStatus.put("message", "failed")
1608                               }
1609                               executor.outFields.put("status", responseStatus)
1610                               returnValue = executor.isTrue;
1611                               true;
1612                       - key:
1613                           name: CDSDeleteResponseTask
1614                           version: 0.0.1
1615                         value:
1616                           key:
1617                             name: CDSDeleteResponseTask
1618                             version: 0.0.1
1619                           inputEvent:
1620                             key:
1621                               name: CDSDeleteResponseEvent
1622                               version: 0.0.1
1623                             nameSpace: org.onap.policy.apex.onap.pmcontrol
1624                             source: CDS
1625                             target: APEX
1626                             parameter:
1627                               entry:
1628                                 - key: actionIdentifiers
1629                                   value:
1630                                     key: actionIdentifiers
1631                                     fieldSchemaKey:
1632                                       name: CDSActionIdentifiersType
1633                                       version: 0.0.1
1634                                     optional: false
1635                                 - key: commonHeader
1636                                   value:
1637                                     key: commonHeader
1638                                     fieldSchemaKey:
1639                                       name: CDSResponseCommonHeaderType
1640                                       version: 0.0.1
1641                                     optional: false
1642                                 - key: payload
1643                                   value:
1644                                     key: payload
1645                                     fieldSchemaKey:
1646                                       name: CDSDeleteResponsePayloadType
1647                                       version: 0.0.1
1648                                     optional: false
1649                                 - key: status
1650                                   value:
1651                                     key: status
1652                                     fieldSchemaKey:
1653                                       name: CDSResponseStatusType
1654                                       version: 0.0.1
1655                                     optional: false
1656                           outputEvents:
1657                             entry:
1658                               - key: CDSResponseStatusEvent
1659                                 value:
1660                                   key:
1661                                     name: CDSResponseStatusEvent
1662                                     version: 0.0.1
1663                                   nameSpace: org.onap.policy.apex.onap.pmcontrol
1664                                   source: APEX
1665                                   target: DCAE
1666                                   parameter:
1667                                     entry:
1668                                       - key: status
1669                                         value:
1670                                           key: status
1671                                           fieldSchemaKey:
1672                                             name: SubscriptionStatusType
1673                                             version: 0.0.1
1674                                           optional: false
1675                           taskParameters:
1676                             entry: [ ]
1677                           contextAlbumReference:
1678                             - name: PMSubscriptionAlbum
1679                               version: 0.0.1
1680                           taskLogic:
1681                             key: TaskLogic
1682                             logicFlavour: JAVASCRIPT
1683                             logic: |-
1684                               /*
1685                                * ============LICENSE_START=======================================================
1686                                *  Copyright (C) 2020 Nordix. All rights reserved.
1687                                * ================================================================================
1688                                * Licensed under the Apache License, Version 2.0 (the "License");
1689                                * you may not use this file except in compliance with the License.
1690                                * You may obtain a copy of the License at
1691                                *
1692                                *      http://www.apache.org/licenses/LICENSE-2.0
1693                                *
1694                                * Unless required by applicable law or agreed to in writing, software
1695                                * distributed under the License is distributed on an "AS IS" BASIS,
1696                                * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1697                                * See the License for the specific language governing permissions and
1698                                * limitations under the License.
1699                                *
1700                                * SPDX-License-Identifier: Apache-2.0
1701                                * ============LICENSE_END=========================================================
1702                                */
1703                               executor.logger.info(executor.subject.id);
1704                               var commonHeader = executor.inFields.get("commonHeader")
1705                               var response = executor.inFields.get("payload")
1706                               var albumID = commonHeader.get("requestId")
1707                               var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(albumID.toString());
1708                               var responseStatus = executor.subject.getOutFieldSchemaHelper("status").createNewInstance();
1709                               var changeType = pmSubscriptionInfo.get("changeType").toUpperCase()
1710                               responseStatus.put("nfName", pmSubscriptionInfo.get("nfName"))
1711                               responseStatus.put("changeType", pmSubscriptionInfo.get("changeType"))
1712                               if ("CREATE".equals(changeType)) {
1713                                   responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName"))
1714                                   responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("subscription").get("measurementGroup").get("measurementGroupName"))
1715                               }
1716                               else if ("DELETE".equals(changeType)) {
1717                                   responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName"))
1718                                   responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName"))
1719                               }
1720                               var status = response.get(pmSubscriptionInfo.get("changeType").toLowerCase() + "_DasH_subscription_DasH_response").get("odl_DasH_response").get("status")
1721                               executor.logger.info("RESPONSE STATUS = " + status)
1722                               if(status == "success") {
1723                                   responseStatus.put("message", "success")
1724                               } else {
1725                                   responseStatus.put("message", "failed")
1726                               }
1727                               executor.outFields.put("status", responseStatus)
1728                               returnValue = executor.isTrue;
1729                               true;
1730                       - key:
1731                           name: CreateSubscriptionPayloadTask
1732                           version: 0.0.1
1733                         value:
1734                           key:
1735                             name: CreateSubscriptionPayloadTask
1736                             version: 0.0.1
1737                           inputEvent:
1738                             key:
1739                               name: PMSubscriptionOutputEvent
1740                               version: 0.0.1
1741                             nameSpace: org.onap.policy.apex.onap.pmcontrol
1742                             source: APEX
1743                             target: APEX
1744                             parameter:
1745                               entry:
1746                                 - key: albumID
1747                                   value:
1748                                     key: albumID
1749                                     fieldSchemaKey:
1750                                       name: UUIDType
1751                                       version: 0.0.1
1752                                     optional: false
1753                           outputEvents:
1754                             entry:
1755                               - key: CreateSubscriptionPayloadEvent
1756                                 value:
1757                                   key:
1758                                     name: CreateSubscriptionPayloadEvent
1759                                     version: 0.0.1
1760                                   nameSpace: org.onap.policy.apex.onap.pmcontrol
1761                                   source: APEX
1762                                   target: APEX
1763                                   parameter:
1764                                     entry:
1765                                       - key: albumID
1766                                         value:
1767                                           key: albumID
1768                                           fieldSchemaKey:
1769                                             name: UUIDType
1770                                             version: 0.0.1
1771                                           optional: false
1772                                       - key: payload
1773                                         value:
1774                                           key: payload
1775                                           fieldSchemaKey:
1776                                             name: CDSCreateSubscriptionPayloadType
1777                                             version: 0.0.1
1778                                           optional: false
1779                           taskParameters:
1780                             entry: [ ]
1781                           contextAlbumReference:
1782                             - name: PMSubscriptionAlbum
1783                               version: 0.0.1
1784                           taskLogic:
1785                             key: TaskLogic
1786                             logicFlavour: JAVASCRIPT
1787                             logic: |-
1788                               /*
1789                                * ============LICENSE_START=======================================================
1790                                *  Copyright (C) 2020 Nordix. All rights reserved.
1791                                * ================================================================================
1792                                * Licensed under the Apache License, Version 2.0 (the "License");
1793                                * you may not use this file except in compliance with the License.
1794                                * You may obtain a copy of the License at
1795                                *
1796                                *      http://www.apache.org/licenses/LICENSE-2.0
1797                                *
1798                                * Unless required by applicable law or agreed to in writing, software
1799                                * distributed under the License is distributed on an "AS IS" BASIS,
1800                                * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1801                                * See the License for the specific language governing permissions and
1802                                * limitations under the License.
1803                                *
1804                                * SPDX-License-Identifier: Apache-2.0
1805                                * ============LICENSE_END=========================================================
1806                                */
1807                               executor.logger.info(executor.subject.id);
1808                               var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString())
1809                               var changeType = pmSubscriptionInfo.get("changeType").toLowerCase()
1810                               var payloadProperties = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance(changeType + "_DasH_subscription_DasH_properties_record");
1811                               payloadProperties.put("nfName",  pmSubscriptionInfo.get("nfName"))
1812                               payloadProperties.put("ipAddress", pmSubscriptionInfo.get("ipAddress"))
1813                               if ("create".equals(changeType)) {
1814                                   payloadProperties.put("subscriptionName",  pmSubscriptionInfo.get("subscription").get("subscriptionName"))
1815                                   payloadProperties.put("fileBasedGP",  pmSubscriptionInfo.get("subscription").get("fileBasedGP").toString())
1816                                   payloadProperties.put("fileLocation", pmSubscriptionInfo.get("subscription").get("fileLocation"))
1817                                   payloadProperties.put("measurementGroup", pmSubscriptionInfo.get("subscription").get("measurementGroup"))
1818                               }
1819                               else if ("delete".equals(changeType)) {
1820                                   payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName"))
1821                                   payloadProperties.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName"))
1822                               }
1823                               var payloadEntry = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance("CDSRequestPayloadEntry");
1824                               payloadEntry.put(changeType + "_DasH_subscription_DasH_properties", payloadProperties)
1825                               var payload = executor.subject.getOutFieldSchemaHelper("payload").createNewInstance();
1826                               payload.put(changeType + "_DasH_subscription_DasH_request", payloadEntry);
1827                               executor.outFields.put("albumID", executor.inFields.get("albumID"))
1828                               executor.outFields.put("payload", payload);
1829                               returnValue = executor.isTrue;
1830                               true;
1831                       - key:
1832                           name: CreateSubscriptionRequestTask
1833                           version: 0.0.1
1834                         value:
1835                           key:
1836                             name: CreateSubscriptionRequestTask
1837                             version: 0.0.1
1838                           inputEvent:
1839                             key:
1840                               name: CreateSubscriptionPayloadEvent
1841                               version: 0.0.1
1842                             nameSpace: org.onap.policy.apex.onap.pmcontrol
1843                             source: APEX
1844                             target: APEX
1845                             parameter:
1846                               entry:
1847                                 - key: albumID
1848                                   value:
1849                                     key: albumID
1850                                     fieldSchemaKey:
1851                                       name: UUIDType
1852                                       version: 0.0.1
1853                                     optional: false
1854                                 - key: payload
1855                                   value:
1856                                     key: payload
1857                                     fieldSchemaKey:
1858                                       name: CDSCreateSubscriptionPayloadType
1859                                       version: 0.0.1
1860                                     optional: false
1861                           outputEvents:
1862                             entry:
1863                               - key: CDSCreateSubscriptionRequestEvent
1864                                 value:
1865                                   key:
1866                                     name: CDSCreateSubscriptionRequestEvent
1867                                     version: 0.0.1
1868                                   nameSpace: org.onap.policy.apex.onap.pmcontrol
1869                                   source: APEX
1870                                   target: APEX
1871                                   parameter:
1872                                     entry:
1873                                       - key: actionIdentifiers
1874                                         value:
1875                                           key: actionIdentifiers
1876                                           fieldSchemaKey:
1877                                             name: CDSActionIdentifiersType
1878                                             version: 0.0.1
1879                                           optional: false
1880                                       - key: commonHeader
1881                                         value:
1882                                           key: commonHeader
1883                                           fieldSchemaKey:
1884                                             name: CDSRequestCommonHeaderType
1885                                             version: 0.0.1
1886                                           optional: false
1887                                       - key: payload
1888                                         value:
1889                                           key: payload
1890                                           fieldSchemaKey:
1891                                             name: CDSCreateSubscriptionPayloadType
1892                                             version: 0.0.1
1893                                           optional: false
1894                           taskParameters:
1895                             entry: [ ]
1896                           contextAlbumReference:
1897                             - name: PMSubscriptionAlbum
1898                               version: 0.0.1
1899                           taskLogic:
1900                             key: TaskLogic
1901                             logicFlavour: JAVASCRIPT
1902                             logic: |-
1903                               /*
1904                                * ============LICENSE_START=======================================================
1905                                *  Copyright (C) 2020 Nordix. All rights reserved.
1906                                * ================================================================================
1907                                * Licensed under the Apache License, Version 2.0 (the "License");
1908                                * you may not use this file except in compliance with the License.
1909                                * You may obtain a copy of the License at
1910                                *
1911                                *      http://www.apache.org/licenses/LICENSE-2.0
1912                                *
1913                                * Unless required by applicable law or agreed to in writing, software
1914                                * distributed under the License is distributed on an "AS IS" BASIS,
1915                                * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1916                                * See the License for the specific language governing permissions and
1917                                * limitations under the License.
1918                                *
1919                                * SPDX-License-Identifier: Apache-2.0
1920                                * ============LICENSE_END=========================================================
1921                                */
1922                               executor.logger.info(executor.subject.id);
1923                               var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString())
1924                               executor.logger.info(pmSubscriptionInfo)
1925                               var changeType = pmSubscriptionInfo.get("changeType").toLowerCase()
1926                               var blueprintName = pmSubscriptionInfo.get("blueprintName").toLowerCase()
1927                               var blueprintVersion = pmSubscriptionInfo.get("blueprintVersion").toLowerCase()
1928                               var payload = executor.inFields.get("payload")
1929                               var actionName = changeType + "-subscription"
1930                               var commonHeader = executor.subject.getOutFieldSchemaHelper("commonHeader").createNewInstance();
1931                               commonHeader.put("originatorId", "sdnc");
1932                               commonHeader.put("requestId", executor.inFields.get("albumID").toString());
1933                               commonHeader.put("subRequestId", "sub-123456-1000");
1934                               var actionIdentifiers = executor.subject.getOutFieldSchemaHelper("actionIdentifiers").createNewInstance();
1935                               actionIdentifiers.put("actionName", actionName);
1936                               actionIdentifiers.put("blueprintName", blueprintName);
1937                               actionIdentifiers.put("blueprintVersion", blueprintVersion);
1938                               actionIdentifiers.put("mode", "sync");
1939                               executor.outFields.put("commonHeader", commonHeader);
1940                               executor.outFields.put("actionIdentifiers", actionIdentifiers);
1941                               executor.outFields.put("payload", payload);
1942                               returnValue = executor.isTrue;
1943                               true;
1944                       - key:
1945                           name: DeleteSubscriptionPayloadTask
1946                           version: 0.0.1
1947                         value:
1948                           key:
1949                             name: DeleteSubscriptionPayloadTask
1950                             version: 0.0.1
1951                           inputEvent:
1952                             key:
1953                               name: PMSubscriptionOutputEvent
1954                               version: 0.0.1
1955                             nameSpace: org.onap.policy.apex.onap.pmcontrol
1956                             source: APEX
1957                             target: APEX
1958                             parameter:
1959                               entry:
1960                                 - key: albumID
1961                                   value:
1962                                     key: albumID
1963                                     fieldSchemaKey:
1964                                       name: UUIDType
1965                                       version: 0.0.1
1966                                     optional: false
1967                           outputEvents:
1968                             entry:
1969                               - key: DeleteSubscriptionPayloadEvent
1970                                 value:
1971                                   key:
1972                                     name: DeleteSubscriptionPayloadEvent
1973                                     version: 0.0.1
1974                                   nameSpace: org.onap.policy.apex.onap.pmcontrol
1975                                   source: APEX
1976                                   target: APEX
1977                                   parameter:
1978                                     entry:
1979                                       - key: albumID
1980                                         value:
1981                                           key: albumID
1982                                           fieldSchemaKey:
1983                                             name: UUIDType
1984                                             version: 0.0.1
1985                                           optional: false
1986                                       - key: payload
1987                                         value:
1988                                           key: payload
1989                                           fieldSchemaKey:
1990                                             name: CDSDeleteSubscriptionPayloadType
1991                                             version: 0.0.1
1992                                           optional: false
1993                           taskParameters:
1994                             entry: [ ]
1995                           contextAlbumReference:
1996                             - name: PMSubscriptionAlbum
1997                               version: 0.0.1
1998                           taskLogic:
1999                             key: TaskLogic
2000                             logicFlavour: JAVASCRIPT
2001                             logic: |-
2002                               /*
2003                                * ============LICENSE_START=======================================================
2004                                *  Copyright (C) 2020 Nordix. All rights reserved.
2005                                * ================================================================================
2006                                * Licensed under the Apache License, Version 2.0 (the "License");
2007                                * you may not use this file except in compliance with the License.
2008                                * You may obtain a copy of the License at
2009                                *
2010                                *      http://www.apache.org/licenses/LICENSE-2.0
2011                                *
2012                                * Unless required by applicable law or agreed to in writing, software
2013                                * distributed under the License is distributed on an "AS IS" BASIS,
2014                                * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2015                                * See the License for the specific language governing permissions and
2016                                * limitations under the License.
2017                                *
2018                                * SPDX-License-Identifier: Apache-2.0
2019                                * ============LICENSE_END=========================================================
2020                                */
2021                               executor.logger.info(executor.subject.id);
2022                               var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString())
2023                               var changeType = pmSubscriptionInfo.get("changeType").toLowerCase()
2024                               var payloadProperties = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance(changeType + "_DasH_subscription_DasH_properties_record");
2025                               payloadProperties.put("nfName",  pmSubscriptionInfo.get("nfName"))
2026                               payloadProperties.put("ipAddress", pmSubscriptionInfo.get("ipAddress"))
2027                               if ("create".equals(changeType)) {
2028                                   payloadProperties.put("subscriptionName",  pmSubscriptionInfo.get("subscription").get("subscriptionName"))
2029                                   payloadProperties.put("fileBasedGP",  pmSubscriptionInfo.get("subscription").get("fileBasedGP").toString())
2030                                   payloadProperties.put("fileLocation", pmSubscriptionInfo.get("subscription").get("fileLocation"))
2031                                   payloadProperties.put("measurementGroup", pmSubscriptionInfo.get("subscription").get("measurementGroup"))
2032                               }
2033                               else if ("delete".equals(changeType)) {
2034                                   payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName"))
2035                                   payloadProperties.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName"))
2036                               }
2037                               var payloadEntry = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance("CDSRequestPayloadEntry");
2038                               payloadEntry.put(changeType + "_DasH_subscription_DasH_properties", payloadProperties)
2039                               var payload = executor.subject.getOutFieldSchemaHelper("payload").createNewInstance();
2040                               payload.put(changeType + "_DasH_subscription_DasH_request", payloadEntry);
2041                               executor.outFields.put("albumID", executor.inFields.get("albumID"))
2042                               executor.outFields.put("payload", payload);
2043                               returnValue = executor.isTrue;
2044                               true;
2045                       - key:
2046                           name: DeleteSubscriptionRequestTask
2047                           version: 0.0.1
2048                         value:
2049                           key:
2050                             name: DeleteSubscriptionRequestTask
2051                             version: 0.0.1
2052                           inputEvent:
2053                             key:
2054                               name: DeleteSubscriptionPayloadEvent
2055                               version: 0.0.1
2056                             nameSpace: org.onap.policy.apex.onap.pmcontrol
2057                             source: APEX
2058                             target: APEX
2059                             parameter:
2060                               entry:
2061                                 - key: albumID
2062                                   value:
2063                                     key: albumID
2064                                     fieldSchemaKey:
2065                                       name: UUIDType
2066                                       version: 0.0.1
2067                                     optional: false
2068                                 - key: payload
2069                                   value:
2070                                     key: payload
2071                                     fieldSchemaKey:
2072                                       name: CDSDeleteSubscriptionPayloadType
2073                                       version: 0.0.1
2074                                     optional: false
2075                           outputEvents:
2076                             entry:
2077                               - key: CDSDeleteSubscriptionRequestEvent
2078                                 value:
2079                                   key:
2080                                     name: CDSDeleteSubscriptionRequestEvent
2081                                     version: 0.0.1
2082                                   nameSpace: org.onap.policy.apex.onap.pmcontrol
2083                                   source: APEX
2084                                   target: APEX
2085                                   parameter:
2086                                     entry:
2087                                       - key: actionIdentifiers
2088                                         value:
2089                                           key: actionIdentifiers
2090                                           fieldSchemaKey:
2091                                             name: CDSActionIdentifiersType
2092                                             version: 0.0.1
2093                                           optional: false
2094                                       - key: commonHeader
2095                                         value:
2096                                           key: commonHeader
2097                                           fieldSchemaKey:
2098                                             name: CDSRequestCommonHeaderType
2099                                             version: 0.0.1
2100                                           optional: false
2101                                       - key: payload
2102                                         value:
2103                                           key: payload
2104                                           fieldSchemaKey:
2105                                             name: CDSDeleteSubscriptionPayloadType
2106                                             version: 0.0.1
2107                                           optional: false
2108                           taskParameters:
2109                             entry: [ ]
2110                           contextAlbumReference:
2111                             - name: PMSubscriptionAlbum
2112                               version: 0.0.1
2113                           taskLogic:
2114                             key: TaskLogic
2115                             logicFlavour: JAVASCRIPT
2116                             logic: |-
2117                               /*
2118                                * ============LICENSE_START=======================================================
2119                                *  Copyright (C) 2020 Nordix. All rights reserved.
2120                                * ================================================================================
2121                                * Licensed under the Apache License, Version 2.0 (the "License");
2122                                * you may not use this file except in compliance with the License.
2123                                * You may obtain a copy of the License at
2124                                *
2125                                *      http://www.apache.org/licenses/LICENSE-2.0
2126                                *
2127                                * Unless required by applicable law or agreed to in writing, software
2128                                * distributed under the License is distributed on an "AS IS" BASIS,
2129                                * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2130                                * See the License for the specific language governing permissions and
2131                                * limitations under the License.
2132                                *
2133                                * SPDX-License-Identifier: Apache-2.0
2134                                * ============LICENSE_END=========================================================
2135                                */
2136                               executor.logger.info(executor.subject.id);
2137                               var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString())
2138                               executor.logger.info(pmSubscriptionInfo)
2139                               var changeType = pmSubscriptionInfo.get("changeType").toLowerCase()
2140                               var blueprintName = pmSubscriptionInfo.get("blueprintName").toLowerCase()
2141                               var blueprintVersion = pmSubscriptionInfo.get("blueprintVersion").toLowerCase()
2142                               var payload = executor.inFields.get("payload")
2143                               var actionName = changeType + "-subscription"
2144                               var commonHeader = executor.subject.getOutFieldSchemaHelper("commonHeader").createNewInstance();
2145                               commonHeader.put("originatorId", "sdnc");
2146                               commonHeader.put("requestId", executor.inFields.get("albumID").toString());
2147                               commonHeader.put("subRequestId", "sub-123456-1000");
2148                               var actionIdentifiers = executor.subject.getOutFieldSchemaHelper("actionIdentifiers").createNewInstance();
2149                               actionIdentifiers.put("actionName", actionName);
2150                               actionIdentifiers.put("blueprintName", blueprintName);
2151                               actionIdentifiers.put("blueprintVersion", blueprintVersion);
2152                               actionIdentifiers.put("mode", "sync");
2153                               executor.outFields.put("commonHeader", commonHeader);
2154                               executor.outFields.put("actionIdentifiers", actionIdentifiers);
2155                               executor.outFields.put("payload", payload);
2156                               returnValue = executor.isTrue;
2157                               true;
2158                       - key:
2159                           name: ReceiveSubscriptionTask
2160                           version: 0.0.1
2161                         value:
2162                           key:
2163                             name: ReceiveSubscriptionTask
2164                             version: 0.0.1
2165                           inputEvent:
2166                             key:
2167                               name: pmsh-operational-policy
2168                               version: 0.0.1
2169                             nameSpace: org.onap.policy.apex.onap.pmcontrol
2170                             source: DCAE
2171                             target: APEX
2172                             parameter:
2173                               entry:
2174                                 - key: blueprintName
2175                                   value:
2176                                     key: blueprintName
2177                                     fieldSchemaKey:
2178                                       name: SimpleStringType
2179                                       version: 0.0.1
2180                                     optional: false
2181                                 - key: blueprintVersion
2182                                   value:
2183                                     key: blueprintVersion
2184                                     fieldSchemaKey:
2185                                       name: SimpleStringType
2186                                       version: 0.0.1
2187                                     optional: false
2188                                 - key: changeType
2189                                   value:
2190                                     key: changeType
2191                                     fieldSchemaKey:
2192                                       name: SimpleStringType
2193                                       version: 0.0.1
2194                                     optional: false
2195                                 - key: controlLoopName
2196                                   value:
2197                                     key: controlLoopName
2198                                     fieldSchemaKey:
2199                                       name: SimpleStringType
2200                                       version: 0.0.1
2201                                     optional: false
2202                                 - key: ipAddress
2203                                   value:
2204                                     key: ipAddress
2205                                     fieldSchemaKey:
2206                                       name: SimpleStringType
2207                                       version: 0.0.1
2208                                     optional: false
2209                                 - key: measurementGroupName
2210                                   value:
2211                                     key: measurementGroupName
2212                                     fieldSchemaKey:
2213                                       name: SimpleStringType
2214                                       version: 0.0.1
2215                                     optional: true
2216                                 - key: nfName
2217                                   value:
2218                                     key: nfName
2219                                     fieldSchemaKey:
2220                                       name: SimpleStringType
2221                                       version: 0.0.1
2222                                     optional: false
2223                                 - key: operationalPolicyName
2224                                   value:
2225                                     key: operationalPolicyName
2226                                     fieldSchemaKey:
2227                                       name: SimpleStringType
2228                                       version: 0.0.1
2229                                     optional: false
2230                                 - key: subscription
2231                                   value:
2232                                     key: subscription
2233                                     fieldSchemaKey:
2234                                       name: SubscriptionType
2235                                       version: 0.0.1
2236                                     optional: true
2237                                 - key: subscriptionName
2238                                   value:
2239                                     key: subscriptionName
2240                                     fieldSchemaKey:
2241                                       name: SimpleStringType
2242                                       version: 0.0.1
2243                                     optional: true
2244                           outputEvents:
2245                             entry:
2246                               - key: PMSubscriptionOutputEvent
2247                                 value:
2248                                   key:
2249                                     name: PMSubscriptionOutputEvent
2250                                     version: 0.0.1
2251                                   nameSpace: org.onap.policy.apex.onap.pmcontrol
2252                                   source: APEX
2253                                   target: APEX
2254                                   parameter:
2255                                     entry:
2256                                       - key: albumID
2257                                         value:
2258                                           key: albumID
2259                                           fieldSchemaKey:
2260                                             name: UUIDType
2261                                             version: 0.0.1
2262                                           optional: false
2263                           taskParameters:
2264                             entry: [ ]
2265                           contextAlbumReference:
2266                             - name: PMSubscriptionAlbum
2267                               version: 0.0.1
2268                           taskLogic:
2269                             key: TaskLogic
2270                             logicFlavour: JAVASCRIPT
2271                             logic: |-
2272                               /*
2273                                * ============LICENSE_START=======================================================
2274                                *  Copyright (C) 2020 Nordix. All rights reserved.
2275                                * ================================================================================
2276                                * Licensed under the Apache License, Version 2.0 (the "License");
2277                                * you may not use this file except in compliance with the License.
2278                                * You may obtain a copy of the License at
2279                                *
2280                                *      http://www.apache.org/licenses/LICENSE-2.0
2281                                *
2282                                * Unless required by applicable law or agreed to in writing, software
2283                                * distributed under the License is distributed on an "AS IS" BASIS,
2284                                * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2285                                * See the License for the specific language governing permissions and
2286                                * limitations under the License.
2287                                *
2288                                * SPDX-License-Identifier: Apache-2.0
2289                                * ============LICENSE_END=========================================================
2290                                */
2291                               var uuidType = java.util.UUID;
2292                               executor.logger.info(executor.subject.id);
2293                               //albumID will be used to fetch info from our album later
2294                               var albumID = uuidType.randomUUID();
2295                               var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").getSchemaHelper().createNewInstance();
2296                               var returnValue = true;
2297                               if(executor.inFields.get("operationalPolicyName") != null) {
2298                                   executor.logger.info("nfName in receive sub event " + executor.inFields.get("nfName"));
2299                                   var changeType = executor.inFields.get("changeType")
2300                                   var nfName = executor.inFields.get("nfName")
2301                                   var ipAddress = executor.inFields.get("ipAddress")
2302                                   var operationalPolicyName = executor.inFields.get("operationalPolicyName")
2303                                   var controlLoopName = executor.inFields.get("controlLoopName")
2304                                   var subscription = executor.inFields.get("subscription")
2305                                   var blueprintName = executor.inFields.get("blueprintName")
2306                                   var blueprintVersion = executor.inFields.get("blueprintVersion")
2307                                   pmSubscriptionInfo.put("nfName", executor.inFields.get("nfName"));
2308                                   pmSubscriptionInfo.put("ipAddress", executor.inFields.get("ipAddress"));
2309                                   pmSubscriptionInfo.put("changeType", executor.inFields.get("changeType"))
2310                                   pmSubscriptionInfo.put("operationalPolicyName", executor.inFields.get("operationalPolicyName"))
2311                                   pmSubscriptionInfo.put("controlLoopName", executor.inFields.get("controlLoopName"))
2312                                   pmSubscriptionInfo.put("subscription", subscription)
2313                                   pmSubscriptionInfo.put("blueprintName", blueprintName)
2314                                   pmSubscriptionInfo.put("blueprintVersion", blueprintVersion)
2315                                   if ("delete".equals(changeType.toLowerCase())) {
2316                                       pmSubscriptionInfo.put("subscriptionName",  executor.inFields.get("subscriptionName"))
2317                                       pmSubscriptionInfo.put("measurementGroupName",  executor.inFields.get("measurementGroupName"))
2318                                   }
2319                                   executor.getContextAlbum("PMSubscriptionAlbum").put(albumID.toString(), pmSubscriptionInfo);
2320                                   executor.outFields.put("albumID", albumID)
2321                               } else {
2322                                   executor.message = "Received invalid event"
2323                                   returnValue = false;
2324                               }
2325                               returnValue;
2326                 events:
2327                   key:
2328                     name: PMControlPolicy_Events
2329                     version: 0.0.1
2330                   eventMap:
2331                     entry:
2332                       - key:
2333                           name: CDSCreateResponseEvent
2334                           version: 0.0.1
2335                         value:
2336                           key:
2337                             name: CDSCreateResponseEvent
2338                             version: 0.0.1
2339                           nameSpace: org.onap.policy.apex.onap.pmcontrol
2340                           source: CDS
2341                           target: APEX
2342                           parameter:
2343                             entry:
2344                               - key: actionIdentifiers
2345                                 value:
2346                                   key: actionIdentifiers
2347                                   fieldSchemaKey:
2348                                     name: CDSActionIdentifiersType
2349                                     version: 0.0.1
2350                                   optional: false
2351                               - key: commonHeader
2352                                 value:
2353                                   key: commonHeader
2354                                   fieldSchemaKey:
2355                                     name: CDSResponseCommonHeaderType
2356                                     version: 0.0.1
2357                                   optional: false
2358                               - key: payload
2359                                 value:
2360                                   key: payload
2361                                   fieldSchemaKey:
2362                                     name: CDSCreateResponsePayloadType
2363                                     version: 0.0.1
2364                                   optional: false
2365                               - key: status
2366                                 value:
2367                                   key: status
2368                                   fieldSchemaKey:
2369                                     name: CDSResponseStatusType
2370                                     version: 0.0.1
2371                                   optional: false
2372                       - key:
2373                           name: CDSCreateSubscriptionRequestEvent
2374                           version: 0.0.1
2375                         value:
2376                           key:
2377                             name: CDSCreateSubscriptionRequestEvent
2378                             version: 0.0.1
2379                           nameSpace: org.onap.policy.apex.onap.pmcontrol
2380                           source: APEX
2381                           target: APEX
2382                           parameter:
2383                             entry:
2384                               - key: actionIdentifiers
2385                                 value:
2386                                   key: actionIdentifiers
2387                                   fieldSchemaKey:
2388                                     name: CDSActionIdentifiersType
2389                                     version: 0.0.1
2390                                   optional: false
2391                               - key: commonHeader
2392                                 value:
2393                                   key: commonHeader
2394                                   fieldSchemaKey:
2395                                     name: CDSRequestCommonHeaderType
2396                                     version: 0.0.1
2397                                   optional: false
2398                               - key: payload
2399                                 value:
2400                                   key: payload
2401                                   fieldSchemaKey:
2402                                     name: CDSCreateSubscriptionPayloadType
2403                                     version: 0.0.1
2404                                   optional: false
2405                       - key:
2406                           name: CDSDeleteResponseEvent
2407                           version: 0.0.1
2408                         value:
2409                           key:
2410                             name: CDSDeleteResponseEvent
2411                             version: 0.0.1
2412                           nameSpace: org.onap.policy.apex.onap.pmcontrol
2413                           source: CDS
2414                           target: APEX
2415                           parameter:
2416                             entry:
2417                               - key: actionIdentifiers
2418                                 value:
2419                                   key: actionIdentifiers
2420                                   fieldSchemaKey:
2421                                     name: CDSActionIdentifiersType
2422                                     version: 0.0.1
2423                                   optional: false
2424                               - key: commonHeader
2425                                 value:
2426                                   key: commonHeader
2427                                   fieldSchemaKey:
2428                                     name: CDSResponseCommonHeaderType
2429                                     version: 0.0.1
2430                                   optional: false
2431                               - key: payload
2432                                 value:
2433                                   key: payload
2434                                   fieldSchemaKey:
2435                                     name: CDSDeleteResponsePayloadType
2436                                     version: 0.0.1
2437                                   optional: false
2438                               - key: status
2439                                 value:
2440                                   key: status
2441                                   fieldSchemaKey:
2442                                     name: CDSResponseStatusType
2443                                     version: 0.0.1
2444                                   optional: false
2445                       - key:
2446                           name: CDSDeleteSubscriptionRequestEvent
2447                           version: 0.0.1
2448                         value:
2449                           key:
2450                             name: CDSDeleteSubscriptionRequestEvent
2451                             version: 0.0.1
2452                           nameSpace: org.onap.policy.apex.onap.pmcontrol
2453                           source: APEX
2454                           target: APEX
2455                           parameter:
2456                             entry:
2457                               - key: actionIdentifiers
2458                                 value:
2459                                   key: actionIdentifiers
2460                                   fieldSchemaKey:
2461                                     name: CDSActionIdentifiersType
2462                                     version: 0.0.1
2463                                   optional: false
2464                               - key: commonHeader
2465                                 value:
2466                                   key: commonHeader
2467                                   fieldSchemaKey:
2468                                     name: CDSRequestCommonHeaderType
2469                                     version: 0.0.1
2470                                   optional: false
2471                               - key: payload
2472                                 value:
2473                                   key: payload
2474                                   fieldSchemaKey:
2475                                     name: CDSDeleteSubscriptionPayloadType
2476                                     version: 0.0.1
2477                                   optional: false
2478                       - key:
2479                           name: CDSResponseStatusEvent
2480                           version: 0.0.1
2481                         value:
2482                           key:
2483                             name: CDSResponseStatusEvent
2484                             version: 0.0.1
2485                           nameSpace: org.onap.policy.apex.onap.pmcontrol
2486                           source: APEX
2487                           target: DCAE
2488                           parameter:
2489                             entry:
2490                               - key: status
2491                                 value:
2492                                   key: status
2493                                   fieldSchemaKey:
2494                                     name: SubscriptionStatusType
2495                                     version: 0.0.1
2496                                   optional: false
2497                       - key:
2498                           name: CreateSubscriptionPayloadEvent
2499                           version: 0.0.1
2500                         value:
2501                           key:
2502                             name: CreateSubscriptionPayloadEvent
2503                             version: 0.0.1
2504                           nameSpace: org.onap.policy.apex.onap.pmcontrol
2505                           source: APEX
2506                           target: APEX
2507                           parameter:
2508                             entry:
2509                               - key: albumID
2510                                 value:
2511                                   key: albumID
2512                                   fieldSchemaKey:
2513                                     name: UUIDType
2514                                     version: 0.0.1
2515                                   optional: false
2516                               - key: payload
2517                                 value:
2518                                   key: payload
2519                                   fieldSchemaKey:
2520                                     name: CDSCreateSubscriptionPayloadType
2521                                     version: 0.0.1
2522                                   optional: false
2523                       - key:
2524                           name: DeleteSubscriptionPayloadEvent
2525                           version: 0.0.1
2526                         value:
2527                           key:
2528                             name: DeleteSubscriptionPayloadEvent
2529                             version: 0.0.1
2530                           nameSpace: org.onap.policy.apex.onap.pmcontrol
2531                           source: APEX
2532                           target: APEX
2533                           parameter:
2534                             entry:
2535                               - key: albumID
2536                                 value:
2537                                   key: albumID
2538                                   fieldSchemaKey:
2539                                     name: UUIDType
2540                                     version: 0.0.1
2541                                   optional: false
2542                               - key: payload
2543                                 value:
2544                                   key: payload
2545                                   fieldSchemaKey:
2546                                     name: CDSDeleteSubscriptionPayloadType
2547                                     version: 0.0.1
2548                                   optional: false
2549                       - key:
2550                           name: MRResponseEvent
2551                           version: 0.0.1
2552                         value:
2553                           key:
2554                             name: MRResponseEvent
2555                             version: 0.0.1
2556                           nameSpace: org.onap.policy.apex.onap.pmcontrol
2557                           source: DCAE
2558                           target: APEX
2559                           parameter:
2560                             entry:
2561                               - key: count
2562                                 value:
2563                                   key: count
2564                                   fieldSchemaKey:
2565                                     name: SimpleIntType
2566                                     version: 0.0.1
2567                                   optional: false
2568                               - key: serverTimeMs
2569                                 value:
2570                                   key: serverTimeMs
2571                                   fieldSchemaKey:
2572                                     name: SimpleIntType
2573                                     version: 0.0.1
2574                                   optional: false
2575                       - key:
2576                           name: PMSubscriptionOutputEvent
2577                           version: 0.0.1
2578                         value:
2579                           key:
2580                             name: PMSubscriptionOutputEvent
2581                             version: 0.0.1
2582                           nameSpace: org.onap.policy.apex.onap.pmcontrol
2583                           source: APEX
2584                           target: APEX
2585                           parameter:
2586                             entry:
2587                               - key: albumID
2588                                 value:
2589                                   key: albumID
2590                                   fieldSchemaKey:
2591                                     name: UUIDType
2592                                     version: 0.0.1
2593                                   optional: false
2594                       - key:
2595                           name: pmsh-operational-policy
2596                           version: 0.0.1
2597                         value:
2598                           key:
2599                             name: pmsh-operational-policy
2600                             version: 0.0.1
2601                           nameSpace: org.onap.policy.apex.onap.pmcontrol
2602                           source: DCAE
2603                           target: APEX
2604                           parameter:
2605                             entry:
2606                               - key: blueprintName
2607                                 value:
2608                                   key: blueprintName
2609                                   fieldSchemaKey:
2610                                     name: SimpleStringType
2611                                     version: 0.0.1
2612                                   optional: false
2613                               - key: blueprintVersion
2614                                 value:
2615                                   key: blueprintVersion
2616                                   fieldSchemaKey:
2617                                     name: SimpleStringType
2618                                     version: 0.0.1
2619                                   optional: false
2620                               - key: changeType
2621                                 value:
2622                                   key: changeType
2623                                   fieldSchemaKey:
2624                                     name: SimpleStringType
2625                                     version: 0.0.1
2626                                   optional: false
2627                               - key: controlLoopName
2628                                 value:
2629                                   key: controlLoopName
2630                                   fieldSchemaKey:
2631                                     name: SimpleStringType
2632                                     version: 0.0.1
2633                                   optional: false
2634                               - key: ipAddress
2635                                 value:
2636                                   key: ipAddress
2637                                   fieldSchemaKey:
2638                                     name: SimpleStringType
2639                                     version: 0.0.1
2640                                   optional: false
2641                               - key: measurementGroupName
2642                                 value:
2643                                   key: measurementGroupName
2644                                   fieldSchemaKey:
2645                                     name: SimpleStringType
2646                                     version: 0.0.1
2647                                   optional: true
2648                               - key: nfName
2649                                 value:
2650                                   key: nfName
2651                                   fieldSchemaKey:
2652                                     name: SimpleStringType
2653                                     version: 0.0.1
2654                                   optional: false
2655                               - key: operationalPolicyName
2656                                 value:
2657                                   key: operationalPolicyName
2658                                   fieldSchemaKey:
2659                                     name: SimpleStringType
2660                                     version: 0.0.1
2661                                   optional: false
2662                               - key: subscription
2663                                 value:
2664                                   key: subscription
2665                                   fieldSchemaKey:
2666                                     name: SubscriptionType
2667                                     version: 0.0.1
2668                                   optional: true
2669                               - key: subscriptionName
2670                                 value:
2671                                   key: subscriptionName
2672                                   fieldSchemaKey:
2673                                     name: SimpleStringType
2674                                     version: 0.0.1
2675                                   optional: true
2676                 albums:
2677                   key:
2678                     name: PMControlPolicy_Albums
2679                     version: 0.0.1
2680                   albums:
2681                     entry:
2682                       - key:
2683                           name: PMSubscriptionAlbum
2684                           version: 0.0.1
2685                         value:
2686                           key:
2687                             name: PMSubscriptionAlbum
2688                             version: 0.0.1
2689                           scope: policy
2690                           isWritable: true
2691                           itemSchema:
2692                             name: PMSubscriptionType
2693                             version: 0.0.1
2694                 schemas:
2695                   key:
2696                     name: PMControlPolicy_Schemas
2697                     version: 0.0.1
2698                   schemas:
2699                     entry:
2700                       - key:
2701                           name: CDSActionIdentifiersType
2702                           version: 0.0.1
2703                         value:
2704                           key:
2705                             name: CDSActionIdentifiersType
2706                             version: 0.0.1
2707                           schemaFlavour: Avro
2708                           schemaDefinition: |-
2709                             {
2710                                 "type": "record",
2711                                 "name": "ActionIdentifiers_Type",
2712                                 "namespace": "org.onap.policy.apex.onap.helloworld",
2713                                 "fields": [
2714                                     {
2715                                         "name": "actionName",
2716                                         "type": "string"
2717                                     },
2718                                     {
2719                                         "name": "blueprintName",
2720                                         "type": "string"
2721                                     },
2722                                     {
2723                                         "name": "blueprintVersion",
2724                                         "type": "string"
2725                                     },
2726                                     {
2727                                         "name": "mode",
2728                                         "type": "string"
2729                                     }
2730                                 ]
2731                             }
2732                       - key:
2733                           name: CDSCreateResponsePayloadType
2734                           version: 0.0.1
2735                         value:
2736                           key:
2737                             name: CDSCreateResponsePayloadType
2738                             version: 0.0.1
2739                           schemaFlavour: Avro
2740                           schemaDefinition: |-
2741                             {
2742                               "name": "CreateResponsePayloadEntry",
2743                               "type": "record",
2744                               "namespace": "com.acme.avro",
2745                               "fields": [
2746                                 {
2747                                   "name": "create_DasH_subscription_DasH_response",
2748                                   "type": {
2749                                     "name": "create_DasH_subscription_DasH_response",
2750                                     "type": "record",
2751                                     "fields": [
2752                                       {
2753                                         "name": "odl_DasH_response",
2754                                         "type": {
2755                                           "name": "odl_DasH_response",
2756                                           "type": "record",
2757                                           "fields": [
2758                                               {
2759                                                 "name": "status",
2760                                                 "type": "string"
2761                                               }
2762                                           ]
2763                                         }
2764                                       }
2765                                     ]
2766                                   }
2767                                 }
2768                               ]
2769                             }
2770                       - key:
2771                           name: CDSCreateSubscriptionPayloadType
2772                           version: 0.0.1
2773                         value:
2774                           key:
2775                             name: CDSCreateSubscriptionPayloadType
2776                             version: 0.0.1
2777                           schemaFlavour: Avro
2778                           schemaDefinition: |-
2779                             {
2780                                "type":"map",
2781                                "values":{
2782                                   "type":"record",
2783                                   "name":"CDSRequestPayloadEntry",
2784                                   "fields":[
2785                                      {
2786                                         "name":"create_DasH_subscription_DasH_properties",
2787                                         "type":{
2788                                            "name":"create_DasH_subscription_DasH_properties_record",
2789                                            "type":"record",
2790                                            "fields":[
2791                                               {
2792                                                  "name":"nfName",
2793                                                  "type":"string"
2794                                               },
2795                                               {
2796                                                  "name":"ipAddress",
2797                                                  "type":"string"
2798                                               },
2799                                               {
2800                                                  "name":"subscriptionName",
2801                                                  "type":"string"
2802                                               },
2803                                               {
2804                                                  "name":"fileBasedGP",
2805                                                  "type":"string"
2806                                               },
2807                                               {
2808                                                  "name":"fileLocation",
2809                                                  "type":"string"
2810                                               },
2811                                               {
2812                                                  "name":"measurementGroup",
2813                                                  "type":{
2814                                                     "name":"Measurement_Group_Type",
2815                                                     "type":"record",
2816                                                     "fields":[
2817                                                        {
2818                                                           "name":"measurementGroupName",
2819                                                           "type":"string"
2820                                                        },
2821                                                        {
2822                                                           "name":"measurementTypes",
2823                                                           "type":{
2824                                                              "type":"array",
2825                                                              "items":{
2826                                                                 "name":"Measurement_Types_Type",
2827                                                                 "type":"record",
2828                                                                 "fields":[
2829                                                                    {
2830                                                                       "name":"measurementType",
2831                                                                       "type":"string"
2832                                                                    }
2833                                                                 ]
2834                                                              }
2835                                                           }
2836                                                        },
2837                                                        {
2838                                                           "name":"managedObjectDNsBasic",
2839                                                           "type":{
2840                                                              "type":"array",
2841                                                              "items":{
2842                                                                 "name":"Managed_Object_Dns_Basic_Type",
2843                                                                 "type":"record",
2844                                                                 "fields":[
2845                                                                    {
2846                                                                       "name":"DN",
2847                                                                       "type":"string"
2848                                                                    }
2849                                                                 ]
2850                                                              }
2851                                                           }
2852                                                        }
2853                                                     ]
2854                                                  }
2855                                               }
2856                                            ]
2857                                         }
2858                                      }
2859                                   ]
2860                                }
2861                             }
2862                       - key:
2863                           name: CDSDeleteResponsePayloadType
2864                           version: 0.0.1
2865                         value:
2866                           key:
2867                             name: CDSDeleteResponsePayloadType
2868                             version: 0.0.1
2869                           schemaFlavour: Avro
2870                           schemaDefinition: |-
2871                             {
2872                               "name": "DeleteResponsePayloadEntry",
2873                               "type": "record",
2874                               "namespace": "com.acme.avro",
2875                               "fields": [
2876                                 {
2877                                   "name": "delete_DasH_subscription_DasH_response",
2878                                   "type": {
2879                                     "name": "delete_DasH_subscription_DasH_response",
2880                                     "type": "record",
2881                                     "fields": [
2882                                       {
2883                                         "name": "odl_DasH_response",
2884                                         "type": {
2885                                           "name": "odl_DasH_response",
2886                                           "type": "record",
2887                                           "fields": [
2888                                               {
2889                                                 "name": "status",
2890                                                 "type": "string"
2891                                               }
2892                                           ]
2893                                         }
2894                                       }
2895                                     ]
2896                                   }
2897                                 }
2898                               ]
2899                             }
2900                       - key:
2901                           name: CDSDeleteSubscriptionPayloadType
2902                           version: 0.0.1
2903                         value:
2904                           key:
2905                             name: CDSDeleteSubscriptionPayloadType
2906                             version: 0.0.1
2907                           schemaFlavour: Avro
2908                           schemaDefinition: |-
2909                             {
2910                                "type":"map",
2911                                "values":{
2912                                   "type":"record",
2913                                   "name":"CDSRequestPayloadEntry",
2914                                   "fields":[
2915                                      {
2916                                         "name":"delete_DasH_subscription_DasH_properties",
2917                                         "type":{
2918                                            "name":"delete_DasH_subscription_DasH_properties_record",
2919                                            "type":"record",
2920                                            "fields":[
2921                                               {
2922                                                  "name":"nfName",
2923                                                  "type":"string"
2924                                               },
2925                                               {
2926                                                  "name":"ipAddress",
2927                                                  "type":"string"
2928                                               },
2929                                               {
2930                                                  "name":"subscriptionName",
2931                                                  "type":"string"
2932                                               },
2933                                               {
2934                                                  "name":"measurementGroupName",
2935                                                  "type":"string"
2936                                               }
2937                                            ]
2938                                         }
2939                                      }
2940                                   ]
2941                                }
2942                             }
2943                       - key:
2944                           name: CDSRequestCommonHeaderType
2945                           version: 0.0.1
2946                         value:
2947                           key:
2948                             name: CDSRequestCommonHeaderType
2949                             version: 0.0.1
2950                           schemaFlavour: Avro
2951                           schemaDefinition: |-
2952                             {
2953                                 "type": "record",
2954                                 "name": "RequestCommonHeader_Type",
2955                                 "namespace": "org.onap.policy.apex.onap.helloworld",
2956                                 "fields": [
2957                                     {
2958                                         "name": "originatorId",
2959                                         "type": "string"
2960                                     },
2961                                     {
2962                                         "name": "requestId",
2963                                         "type": "string"
2964                                     },
2965                                     {
2966                                         "name": "subRequestId",
2967                                         "type": "string"
2968                                     }
2969                                 ]
2970                             }
2971                       - key:
2972                           name: CDSResponseCommonHeaderType
2973                           version: 0.0.1
2974                         value:
2975                           key:
2976                             name: CDSResponseCommonHeaderType
2977                             version: 0.0.1
2978                           schemaFlavour: Avro
2979                           schemaDefinition: |-
2980                             {
2981                                 "type": "record",
2982                                 "name": "ResponseCommonHeader_Type",
2983                                 "namespace": "org.onap.policy.apex.onap.helloworld",
2984                                 "fields": [
2985                                     {
2986                                         "name": "originatorId",
2987                                         "type": "string"
2988                                     },
2989                                     {
2990                                         "name": "requestId",
2991                                         "type": "string"
2992                                     },
2993                                     {
2994                                         "name": "subRequestId",
2995                                         "type": "string"
2996                                     },
2997                                     {
2998                                         "name": "timestamp",
2999                                         "type": "string"
3000                                     },
3001                                     {
3002                                         "name": "flags",
3003                                         "type": ["null", "string"]
3004                                     }
3005                                 ]
3006                             }
3007                       - key:
3008                           name: CDSResponseStatusType
3009                           version: 0.0.1
3010                         value:
3011                           key:
3012                             name: CDSResponseStatusType
3013                             version: 0.0.1
3014                           schemaFlavour: Avro
3015                           schemaDefinition: |-
3016                             {
3017                                 "type": "record",
3018                                 "name": "ResponseStatus_Type",
3019                                 "namespace": "org.onap.policy.apex.onap.helloworld",
3020                                 "fields": [
3021                                     {
3022                                         "name": "code",
3023                                         "type": "int"
3024                                     },
3025                                     {
3026                                         "name": "eventType",
3027                                         "type": "string"
3028                                     },
3029                                     {
3030                                         "name": "timestamp",
3031                                         "type": "string"
3032                                     },
3033                                     {
3034                                         "name": "message",
3035                                         "type": "string"
3036                                     }
3037                                 ]
3038                             }
3039                       - key:
3040                           name: PMSubscriptionType
3041                           version: 0.0.1
3042                         value:
3043                           key:
3044                             name: PMSubscriptionType
3045                             version: 0.0.1
3046                           schemaFlavour: Avro
3047                           schemaDefinition: |-
3048                             {
3049                                 "name": "PMSubscription",
3050                                 "type": "record",
3051                                 "namespace": "org.onap.policy.apex.onap.pmcontrol",
3052                                 "fields": [
3053                                     {
3054                                         "name": "nfName",
3055                                         "type": "string"
3056                                     },
3057                                     {
3058                                         "name": "ipAddress",
3059                                         "type": "string"
3060                                     },
3061                                     {
3062                                         "name": "changeType",
3063                                         "type": "string"
3064                                     },
3065                                     {
3066                                         "name": "controlLoopName",
3067                                         "type": "string"
3068                                     },
3069                                     {
3070                                         "name": "operationalPolicyName",
3071                                         "type": "string"
3072                                     },
3073                                     {
3074                                         "name": "blueprintName",
3075                                         "type": "string"
3076                                     },
3077                                     {
3078                                         "name": "blueprintVersion",
3079                                         "type": "string"
3080                                     },
3081                                     {
3082                                         "name": "subscriptionName",
3083                                         "type": "string"
3084                                     },
3085                                     {
3086                                         "name": "measurementGroupName",
3087                                         "type": "string"
3088                                     },
3089                                     {
3090                                         "name": "subscription",
3091                                         "type": {
3092                                             "name": "subscription",
3093                                             "type": "record",
3094                                             "fields": [
3095                                                 {
3096                                                     "name": "subscriptionName",
3097                                                     "type": "string"
3098                                                 },
3099                                                 {
3100                                                     "name": "fileBasedGP",
3101                                                     "type": "int"
3102                                                 },
3103                                                 {
3104                                                     "name": "fileLocation",
3105                                                     "type": "string"
3106                                                 },
3107                                                 {
3108                                                     "name": "measurementGroup",
3109                                                     "type": {
3110                                                         "name": "Measurement_Group_Type",
3111                                                         "type": "record",
3112                                                         "fields": [
3113                                                             {
3114                                                                 "name": "measurementGroupName",
3115                                                                 "type": "string"
3116                                                             },
3117                                                             {
3118                                                                 "name": "measurementTypes",
3119                                                                 "type": {
3120                                                                     "type": "array",
3121                                                                     "items": {
3122                                                                         "name": "Measurement_Types_Type",
3123                                                                         "type": "record",
3124                                                                         "fields": [
3125                                                                             {
3126                                                                                 "name": "measurementType",
3127                                                                                 "type": "string"
3128                                                                             }
3129                                                                         ]
3130                                                                     }
3131                                                                 }
3132                                                             },
3133                                                             {
3134                                                                 "name": "managedObjectDNsBasic",
3135                                                                 "type": {
3136                                                                     "type": "array",
3137                                                                     "items": {
3138                                                                         "name": "Managed_Object_Dns_Basic_Type",
3139                                                                         "type": "record",
3140                                                                         "fields": [
3141                                                                             {
3142                                                                                 "name": "DN",
3143                                                                                 "type": "string"
3144                                                                             }
3145                                                                         ]
3146                                                                     }
3147                                                                 }
3148                                                             }
3149                                                         ]
3150                                                     }
3151                                                 }
3152                                             ]
3153                                         }
3154                                     }
3155                                 ]
3156                             }
3157                       - key:
3158                           name: SimpleIntType
3159                           version: 0.0.1
3160                         value:
3161                           key:
3162                             name: SimpleIntType
3163                             version: 0.0.1
3164                           schemaFlavour: Java
3165                           schemaDefinition: java.lang.Integer
3166                       - key:
3167                           name: SimpleStringType
3168                           version: 0.0.1
3169                         value:
3170                           key:
3171                             name: SimpleStringType
3172                             version: 0.0.1
3173                           schemaFlavour: Java
3174                           schemaDefinition: java.lang.String
3175                       - key:
3176                           name: SubscriptionStatusType
3177                           version: 0.0.1
3178                         value:
3179                           key:
3180                             name: SubscriptionStatusType
3181                             version: 0.0.1
3182                           schemaFlavour: Avro
3183                           schemaDefinition: |-
3184                             {
3185                                 "type": "record",
3186                                 "name": "ActivateSubscriptionStatus_Type",
3187                                 "namespace": "org.onap.policy.apex.onap.helloworld",
3188                                 "fields": [
3189                                     {
3190                                         "name": "subscriptionName",
3191                                         "type": "string"
3192                                     },
3193                                     {
3194                                         "name": "measurementGroupName",
3195                                         "type": "string"
3196                                     },
3197                                     {
3198                                         "name": "nfName",
3199                                         "type": "string"
3200                                     },
3201                                     {
3202                                         "name": "changeType",
3203                                         "type": "string"
3204                                     },
3205                                     {
3206                                         "name": "message",
3207                                         "type": "string"
3208                                     }
3209                                 ]
3210                             }
3211                       - key:
3212                           name: SubscriptionType
3213                           version: 0.0.1
3214                         value:
3215                           key:
3216                             name: SubscriptionType
3217                             version: 0.0.1
3218                           schemaFlavour: Avro
3219                           schemaDefinition: |-
3220                             {
3221                                 "name": "subscription",
3222                                 "type": "record",
3223                                 "default": "null",
3224                                 "fields": [
3225                                     {
3226                                         "name": "subscriptionName",
3227                                         "type": "string"
3228                                     },
3229                                     {
3230                                         "name": "fileBasedGP",
3231                                         "type": "int"
3232                                     },
3233                                     {
3234                                         "name": "fileLocation",
3235                                         "type": "string"
3236                                     },
3237                                     {
3238                                         "name": "measurementGroup",
3239                                         "type": {
3240                                             "name": "Measurement_Group_Type",
3241                                             "type": "record",
3242                                             "fields": [
3243                                                 {
3244                                                     "name": "measurementGroupName",
3245                                                     "type": "string"
3246                                                 },
3247                                                 {
3248                                                     "name": "measurementTypes",
3249                                                     "type": {
3250                                                         "type": "array",
3251                                                         "items": {
3252                                                             "name": "Measurement_Types_Type",
3253                                                             "type": "record",
3254                                                             "fields": [
3255                                                                 {
3256                                                                     "name": "measurementType",
3257                                                                     "type": "string"
3258                                                                 }
3259                                                             ]
3260                                                         }
3261                                                     }
3262                                                 },
3263                                                 {
3264                                                     "name": "managedObjectDNsBasic",
3265                                                     "type": {
3266                                                         "type": "array",
3267                                                         "items": {
3268                                                             "name": "Managed_Object_Dns_Basic_Type",
3269                                                             "type": "record",
3270                                                             "fields": [
3271                                                                 {
3272                                                                     "name": "DN",
3273                                                                     "type": "string"
3274                                                                 }
3275                                                             ]
3276                                                         }
3277                                                     }
3278                                                 }
3279                                             ]
3280                                         }
3281                                     }
3282                                 ]
3283                             }
3284                       - key:
3285                           name: UUIDType
3286                           version: 0.0.1
3287                         value:
3288                           key:
3289                             name: UUIDType
3290                             version: 0.0.1
3291                           schemaFlavour: Java
3292                           schemaDefinition: java.util.UUID
3293           eventInputParameters:
3294             DCAEConsumer:
3295               carrierTechnologyParameters:
3296                 carrierTechnology: RESTCLIENT
3297                 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
3298                 parameters:
3299                   consumerPollTime: '50'
3300                   url: https://message-router:3905/events/unauthenticated.DCAE_CL_OUTPUT/cg1/sg1
3301               eventProtocolParameters:
3302                 eventProtocol: JSON
3303                 parameters:
3304                   nameAlias: operationalPolicyName
3305               eventName: pmsh-operational-policy
3306               eventNameFilter: pmsh-operational-policy
3307             CDSRequestConsumer:
3308               carrierTechnologyParameters:
3309                 carrierTechnology: RESTREQUESTOR
3310                 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters
3311                 parameters:
3312                   url: http://cds-blueprints-processor-http:8080/api/v1/execution-service/process
3313                   httpMethod: POST
3314                   restRequestTimeout: 2000
3315                   httpHeaders:
3316                     - - Authorization
3317                       - Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
3318               eventProtocolParameters:
3319                 eventProtocol: JSON
3320               eventName: CDSCreateResponseEvent
3321               eventNameFilter: CDSCreateResponseEvent
3322               requestorMode: true
3323               requestorPeer: CDSRequestProducer
3324               requestorTimeout: 500
3325             CDSDeleteRequestConsumer:
3326               carrierTechnologyParameters:
3327                 carrierTechnology: RESTREQUESTOR
3328                 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters
3329                 parameters:
3330                   url: http://cds-blueprints-processor-http:8080/api/v1/execution-service/process
3331                   httpMethod: POST
3332                   restRequestTimeout: 2000
3333                   httpHeaders:
3334                     - - Authorization
3335                       - Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
3336               eventProtocolParameters:
3337                 eventProtocol: JSON
3338               eventName: CDSDeleteResponseEvent
3339               eventNameFilter: CDSDeleteResponseEvent
3340               requestorMode: true
3341               requestorPeer: CDSDeleteRequestProducer
3342               requestorTimeout: 500
3343           eventOutputParameters:
3344             logOutputter:
3345               carrierTechnologyParameters:
3346                 carrierTechnology: FILE
3347                 parameters:
3348                   standardIo: true
3349               eventProtocolParameters:
3350                 eventProtocol: JSON
3351             StdOutOutputter:
3352               carrierTechnologyParameters:
3353                 carrierTechnology: FILE
3354                 parameters:
3355                   standardIo: true
3356               eventProtocolParameters:
3357                 eventProtocol: JSON
3358             CDSRequestProducer:
3359               carrierTechnologyParameters:
3360                 carrierTechnology: RESTREQUESTOR
3361                 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters
3362               eventProtocolParameters:
3363                 eventProtocol: JSON
3364               eventNameFilter: CDSCreateSubscriptionRequestEvent
3365               requestorMode: true
3366               requestorPeer: CDSRequestConsumer
3367               requestorTimeout: 500
3368             CDSDeleteRequestProducer:
3369               carrierTechnologyParameters:
3370                 carrierTechnology: RESTREQUESTOR
3371                 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters
3372               eventProtocolParameters:
3373                 eventProtocol: JSON
3374               eventNameFilter: CDSDeleteSubscriptionRequestEvent
3375               requestorMode: true
3376               requestorPeer: CDSDeleteRequestConsumer
3377               requestorTimeout: 500
3378             CDSReplyProducer:
3379               carrierTechnologyParameters:
3380                 carrierTechnology: RESTCLIENT
3381                 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
3382                 parameters:
3383                   url: https://message-router:3905/events/unauthenticated.PMSH_CL_INPUT
3384                   httpMethod: POST
3385                   restRequestTimeout: 2000
3386               eventProtocolParameters:
3387                 eventProtocol: JSON
3388               eventNameFilter: CDSResponseStatusEvent