1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2022 Nordix Foundation.
3 # ================================================================================
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 # SPDX-License-Identifier: Apache-2.0
17 # ============LICENSE_END=========================================================
18 tosca_definitions_version: tosca_simple_yaml_1_3
20 onap.datatypes.ToscaConceptIdentifier:
21 derived_from: tosca.datatypes.Root
29 onap.datatype.controlloop.Target:
30 derived_from: tosca.datatypes.Root
31 description: Definition for a entity in A&AI to perform a control loop operation
36 description: Category for the target type
47 Map of values that identify the resource. If none are provided, it is assumed that the
48 entity that generated the ONSET event will be the target.
51 clamp_possible_values: ClampExecution:CSAR_RESOURCES
54 onap.datatype.controlloop.Actor:
55 derived_from: tosca.datatypes.Root
56 description: An actor/operation/target definition
60 description: The actor performing the operation.
63 clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor
66 description: The operation the actor is performing.
68 clamp_possible_values: Dictionary:DefaultOperations,ClampExecution:CDS/operation
71 type: onap.datatype.controlloop.Target
72 description: The resource the operation should be performed on.
76 description: Name/value pairs of payload information passed by Policy to the
80 clamp_possible_values: ClampExecution:CDS/payload
83 onap.datatype.controlloop.Operation:
84 derived_from: tosca.datatypes.Root
85 description: An operation supported by an actor
89 description: Unique identifier for the operation
93 description: A user-friendly description of the intent for the operation
96 type: onap.datatype.controlloop.Actor
97 description: The definition of the operation to be performed.
101 description: The amount of time for the actor to perform the operation.
105 description: The number of retries the actor should attempt to perform the
111 description: Points to the operation to invoke on success. A value of "final_success"
112 indicates and end to the operation.
114 default: final_success
117 description: Points to the operation to invoke on Actor operation failure.
119 default: final_failure
122 description: Points to the operation to invoke when the time out for the operation
125 default: final_failure_timeout
128 description: Points to the operation to invoke when the current operation
129 has exceeded its max retries.
131 default: final_failure_retries
134 description: Points to the operation to invoke when the current operation
137 default: final_failure_exception
140 description: Points to the operation to invoke when the current operation
141 is blocked due to guard policy enforcement.
143 default: final_failure_guard
144 org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest:
146 derived_from: tosca.datatypes.Root
149 type: onap.datatypes.ToscaConceptIdentifier
151 description: The name and version of a REST request to be sent to a REST endpoint
161 description: The REST method to use
165 description: The path of the REST request relative to the base URL
169 description: The body of the REST request for PUT and POST requests
174 description: THe expected HTTP status code for the REST request
175 org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity:
177 derived_from: tosca.datatypes.Root
179 configurationEntityId:
180 type: onap.datatypes.ToscaConceptIdentifier
182 description: The name and version of a Configuration Entity to be handled
183 by the HTTP Automation Composition Element
187 type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest
189 description: A sequence of REST commands to send to the REST endpoint
191 onap.policies.Monitoring:
192 derived_from: tosca.policies.Root
193 description: a base policy type for all policies that govern monitoring provisioning
195 name: onap.policies.Monitoring
196 onap.policies.customPolicyType:
197 derived_from: tosca.policies.Root
198 description: a base policy type for all policies that govern monitoring provisioning
200 name: onap.policies.customPolicyType
201 onap.policies.controlloop.operational.Common:
202 derived_from: tosca.policies.Root
204 name: onap.policies.controlloop.operational.Common
206 Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant
207 Policy Types. This does NOT support the legacy Policy YAML policy type.
211 description: The unique control loop id.
216 Overall timeout for executing all the operations. This timeout should equal or exceed the total
217 timeout for each operation listed.
221 description: Whether an abatement event message will be expected for the control
227 description: Initial operation to execute upon receiving an Onset event message
228 for the Control Loop.
232 description: List of operations to be performed when Control Loop is triggered.
235 type: onap.datatype.controlloop.Operation
236 onap.policies.controlloop.operational.common.Apex:
237 derived_from: onap.policies.controlloop.operational.Common
240 name: onap.policies.controlloop.operational.common.Apex
241 description: Operational policies for Apex PDP
243 engineServiceParameters:
245 description: The engine parameters like name, instanceCount, policy implementation,
248 eventInputParameters:
250 description: The event input parameters.
252 eventOutputParameters:
254 description: The event output parameters.
258 description: Name/value pairs of properties to be set for APEX if needed.
262 org.onap.policy.clamp.acm.Participant:
264 derived_from: tosca.nodetypes.Root
269 org.onap.policy.clamp.acm.AutomationCompositionElement:
271 derived_from: tosca.nodetypes.Root
278 description: Specifies the organization that provides the automation composition element
280 type: onap.datatypes.ToscaConceptIdentifier
285 type: onap.datatypes.ToscaConceptIdentifier
289 description: The identity of the participant type that hosts this type of Automation Composition Element
294 - greater_or_equal: 0
297 description: A value indicating the start phase in which this automation composition element will be started, the
298 first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped
299 in reverse start phase order. Automation Composition Elements with the same start phase are started and
300 stopped simultaneously
301 uninitializedToPassiveTimeout:
305 - greater_or_equal: 0
309 description: The maximum time in seconds to wait for a state chage from uninitialized to passive
310 passiveToRunningTimeout:
314 - greater_or_equal: 0
318 description: The maximum time in seconds to wait for a state chage from passive to running
319 runningToPassiveTimeout:
323 - greater_or_equal: 0
327 description: The maximum time in seconds to wait for a state chage from running to passive
328 passiveToUninitializedTimeout:
332 - greater_or_equal: 0
336 description: The maximum time in seconds to wait for a state chage from passive to uninitialized
337 org.onap.policy.clamp.acm.AutomationComposition:
339 derived_from: tosca.nodetypes.Root
346 description: Specifies the organization that provides the automation composition element
353 type: onap.datatypes.ToscaConceptIdentifier
354 description: Specifies a list of automation composition element definitions that make up this automation composition definition
355 org.onap.policy.clamp.acm.PolicyAutomationCompositionElement:
357 derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
360 type: onap.datatypes.ToscaConceptIdentifier
363 type: onap.datatypes.ToscaConceptIdentifier
365 org.onap.policy.clamp.acm.CDSAutomationCompositionElement:
367 derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
370 type: onap.datatypes.ToscaConceptIdentifier
372 org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement:
374 derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
392 org.onap.policy.clamp.acm.HttpAutomationCompositionElement:
394 derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
399 description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
405 description: HTTP headers to send on REST requests
406 configurationEntities:
410 type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity
412 description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests
416 pmsh_operational_policy:
417 type: onap.datatypes.ToscaConceptIdentifier
418 description: The ID of the PMSH operational policy to use
420 name: operational.apex.pmcontrol
423 org.onap.policy.clamp.acm.PolicyParticipant:
425 type: org.onap.policy.clamp.acm.Participant
427 description: Participant for DCAE microservices
430 org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement:
432 type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement
434 description: Automation composition element for the operational policy for Performance Management Subscription Handling
438 name: org.onap.PM_Policy
441 name: org.onap.policy.clamp.acm.PolicyParticipant
444 name: onap.policies.operational.pm-subscription-handler
447 get_input: pmsh_operational_policy
450 org.onap.policy.clamp.acm.KubernetesParticipant:
452 type: org.onap.policy.clamp.acm.Participant
454 description: Participant for K8S
457 org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement:
458 # Chart from new repository
460 type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
462 description: Automation composition element for the K8S microservice for PMSH
466 name: K8sParticipant0
469 name: org.onap.policy.clamp.acm.KubernetesParticipant
476 releaseName: dcae-pmsh
478 repoName: chartmuseum
479 address: http://chart-museum:80
480 userName: onapinitializer
481 password: demo123456!
483 global.masterPassword: test
484 global.centralizedLoggingEnabled: false
485 org.onap.policy.clamp.acm.HttpParticipant:
487 type: org.onap.policy.clamp.acm.Participant
489 description: Participant for Http requests
492 org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement:
493 # Http config for PMSH.
495 type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
497 description: Automation composition element for the http requests of PMSH microservice
501 name: HttpParticipant0
504 name: org.onap.policy.clamp.acm.HttpParticipant
506 uninitializedToPassiveTimeout: 180
508 baseUrl: https://dcae-pmsh:8443
510 Content-Type: application/json
511 configurationEntities:
512 - configurationEntityId:
523 "subscriptionName":"new_sub_01",
524 "operationalPolicyName":"pmsh-operational-policy",
525 "controlLoopName":"controlLoop-name",
530 "modelInvariantIDs":[
531 "7129e420-d396-4efb-af02-6b83499b12f5"
534 "e80a6ae3-cafd-4d24-850d-e14c084a5ca7"
540 "measurementGroups":[
543 "measurementGroupName":"msgroup_01",
544 "administrativeState":"UNLOCKED",
546 "fileLocation":"/pm/pm.xml",
549 "measurementType":"EutranCell.*"
552 "measurementType":"EutranCellRelation.pmCounter1"
555 "measurementType":"EutranCellRelation.pmCounter2"
558 "managedObjectDNsBasic":[
560 "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1"
563 "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter2"
566 "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter3"
574 expectedResponse: 201
577 org.onap.domain.pmsh.PMSHAutomationCompositionDefinition:
579 type: org.onap.policy.clamp.acm.AutomationComposition
581 description: Automation composition for PMSH
585 - name: org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement
587 - name: org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement
589 - name: org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement
592 - operational.apex.pmcontrol:
593 type: onap.policies.controlloop.operational.common.Apex
597 engineServiceParameters:
602 deploymentPort: 12561
606 parameterClassName: org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters
608 parameterClassName: org.onap.policy.apex.context.parameters.ContextParameters
611 parameterClassName: org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters
613 parameterClassName: org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters
616 adaptedClass: java.time.Instant
617 adaptorClass: org.onap.policy.common.gson.InstantAsMillisTypeAdapter
621 name: PMControlPolicy
625 name: PMControlPolicy_KeyInfo
630 name: CDSActionIdentifiersType
634 name: CDSActionIdentifiersType
636 UUID: 6e5fa19b-14df-37e3-a4ae-8c537e861a82
637 description: Generated description for concept referred to by
638 key "CDSActionIdentifiersType:0.0.1"
640 name: CDSCreateResponseEvent
644 name: CDSCreateResponseEvent
646 UUID: 14b29e38-ac75-3273-aa4e-8583c0aa7dad
647 description: Generated description for concept referred to by
648 key "CDSCreateResponseEvent:0.0.1"
650 name: CDSCreateResponsePayloadType
654 name: CDSCreateResponsePayloadType
656 UUID: 04573f8f-e772-30a5-b1d9-d7318d4a1e13
657 description: Generated description for concept referred to by
658 key "CDSCreateResponsePayloadType:0.0.1"
660 name: CDSCreateResponsePolicy
664 name: CDSCreateResponsePolicy
666 UUID: e126c965-fc09-3bfe-8f55-70f380a4a49c
667 description: Generated description for concept referred to by
668 key "CDSCreateResponsePolicy:0.0.1"
670 name: CDSCreateResponseTask
674 name: CDSCreateResponseTask
676 UUID: 6165ee82-afd2-3aab-a517-f00b3f2461d2
677 description: Generated description for concept referred to by
678 key "CDSCreateResponseTask:0.0.1"
680 name: CDSCreateSubscriptionPayloadType
684 name: CDSCreateSubscriptionPayloadType
686 UUID: 8350ac5e-c157-38b9-9614-a0f93a830e60
687 description: Generated description for concept referred to by
688 key "CDSCreateSubscriptionPayloadType:0.0.1"
690 name: CDSCreateSubscriptionRequestEvent
694 name: CDSCreateSubscriptionRequestEvent
696 UUID: cfa325ba-226b-3a31-9183-ec43e2b6e9a2
697 description: Generated description for concept referred to by
698 key "CDSCreateSubscriptionRequestEvent:0.0.1"
700 name: CDSDeleteResponseEvent
704 name: CDSDeleteResponseEvent
706 UUID: 8be9c0fa-7437-3841-aff2-b3cec6ae3bd8
707 description: Generated description for concept referred to by
708 key "CDSDeleteResponseEvent:0.0.1"
710 name: CDSDeleteResponsePayloadType
714 name: CDSDeleteResponsePayloadType
716 UUID: 3fbfe0c9-152e-34d3-a504-09cd13c058d0
717 description: Generated description for concept referred to by
718 key "CDSDeleteResponsePayloadType:0.0.1"
720 name: CDSDeleteResponsePolicy
724 name: CDSDeleteResponsePolicy
726 UUID: a780251c-edd5-3132-b865-04313246b43c
727 description: Generated description for concept referred to by
728 key "CDSDeleteResponsePolicy:0.0.1"
730 name: CDSDeleteResponseTask
734 name: CDSDeleteResponseTask
736 UUID: afce4555-3aa3-3521-a7d8-ee8cdf0d3efc
737 description: Generated description for concept referred to by
738 key "CDSDeleteResponseTask:0.0.1"
740 name: CDSDeleteSubscriptionPayloadType
744 name: CDSDeleteSubscriptionPayloadType
746 UUID: 12658406-9147-3c9d-a38c-5ad5e30b092b
747 description: Generated description for concept referred to by
748 key "CDSDeleteSubscriptionPayloadType:0.0.1"
750 name: CDSDeleteSubscriptionRequestEvent
754 name: CDSDeleteSubscriptionRequestEvent
756 UUID: 24380c95-9289-36e6-8cbf-0edefa15ccd9
757 description: Generated description for concept referred to by
758 key "CDSDeleteSubscriptionRequestEvent:0.0.1"
760 name: CDSRequestCommonHeaderType
764 name: CDSRequestCommonHeaderType
766 UUID: 35590ac0-062c-39f1-8786-b4ff716e30b1
767 description: Generated description for concept referred to by
768 key "CDSRequestCommonHeaderType:0.0.1"
770 name: CDSResponseCommonHeaderType
774 name: CDSResponseCommonHeaderType
776 UUID: dd7e1805-885a-350b-aaf9-ed541321ae3c
777 description: Generated description for concept referred to by
778 key "CDSResponseCommonHeaderType:0.0.1"
780 name: CDSResponseStatusEvent
784 name: CDSResponseStatusEvent
786 UUID: 7986e21b-32f7-302e-9554-31f21b673493
787 description: Generated description for concept referred to by
788 key "CDSResponseStatusEvent:0.0.1"
790 name: CDSResponseStatusType
794 name: CDSResponseStatusType
796 UUID: 92b8a2cf-344e-3ce1-8cc0-2b7d3cb695fa
797 description: Generated description for concept referred to by
798 key "CDSResponseStatusType:0.0.1"
800 name: CreateSubscriptionPayloadEvent
804 name: CreateSubscriptionPayloadEvent
806 UUID: 92162397-1a8e-3a3f-a469-d2af7700af4a
807 description: Generated description for concept referred to by
808 key "CreateSubscriptionPayloadEvent:0.0.1"
810 name: CreateSubscriptionPayloadTask
814 name: CreateSubscriptionPayloadTask
816 UUID: bc0c69f0-52ed-38ea-b468-ae4a6fd1730d
817 description: Generated description for concept referred to by
818 key "CreateSubscriptionPayloadTask:0.0.1"
820 name: CreateSubscriptionRequestTask
824 name: CreateSubscriptionRequestTask
826 UUID: 89cb75e9-f06c-30d3-b4ff-698d45f63869
827 description: Generated description for concept referred to by
828 key "CreateSubscriptionRequestTask:0.0.1"
830 name: DeleteSubscriptionPayloadEvent
834 name: DeleteSubscriptionPayloadEvent
836 UUID: 994fa441-04ab-33bb-832d-1cd12ab5d074
837 description: Generated description for concept referred to by
838 key "DeleteSubscriptionPayloadEvent:0.0.1"
840 name: DeleteSubscriptionPayloadTask
844 name: DeleteSubscriptionPayloadTask
846 UUID: 0f519117-5fea-3e4b-941f-8f778100465f
847 description: Generated description for concept referred to by
848 key "DeleteSubscriptionPayloadTask:0.0.1"
850 name: DeleteSubscriptionRequestTask
854 name: DeleteSubscriptionRequestTask
856 UUID: acb772fe-d442-39e3-98f9-b1080caf4150
857 description: Generated description for concept referred to by
858 key "DeleteSubscriptionRequestTask:0.0.1"
860 name: MRResponseEvent
864 name: MRResponseEvent
866 UUID: 13c747a3-6bae-3bcf-9c80-b152e01dc194
867 description: Generated description for concept referred to by
868 key "MRResponseEvent:0.0.1"
870 name: PMControlPolicy
874 name: PMControlPolicy
876 UUID: acf1e55c-7bc5-3bd5-975a-0ca54afcd8a4
877 description: Generated description for concept referred to by
878 key "PMControlPolicy:0.0.1"
880 name: PMControlPolicy_Albums
884 name: PMControlPolicy_Albums
886 UUID: b38ad204-c2c8-32f4-9b5a-dda0aeb0145b
887 description: Generated description for concept referred to by
888 key "PMControlPolicy_Albums:0.0.1"
890 name: PMControlPolicy_Events
894 name: PMControlPolicy_Events
896 UUID: be3871a0-c42a-3113-a066-82d192840eca
897 description: Generated description for concept referred to by
898 key "PMControlPolicy_Events:0.0.1"
900 name: PMControlPolicy_KeyInfo
904 name: PMControlPolicy_KeyInfo
906 UUID: ced37634-28a4-3178-b7f6-2980794927b0
907 description: Generated description for concept referred to by
908 key "PMControlPolicy_KeyInfo:0.0.1"
910 name: PMControlPolicy_Policies
914 name: PMControlPolicy_Policies
916 UUID: be3d180d-ef9c-3a75-8e9c-84271a038bed
917 description: Generated description for concept referred to by
918 key "PMControlPolicy_Policies:0.0.1"
920 name: PMControlPolicy_Schemas
924 name: PMControlPolicy_Schemas
926 UUID: e61973f1-189c-39e5-82f6-0d3afe298a20
927 description: Generated description for concept referred to by
928 key "PMControlPolicy_Schemas:0.0.1"
930 name: PMControlPolicy_Tasks
934 name: PMControlPolicy_Tasks
936 UUID: 5658adb3-2962-30a3-a241-fae75bb8eb4a
937 description: Generated description for concept referred to by
938 key "PMControlPolicy_Tasks:0.0.1"
940 name: PMSubscriptionAlbum
944 name: PMSubscriptionAlbum
946 UUID: c2bd6f0d-6854-317a-9be2-97c08338428c
947 description: Generated description for concept referred to by
948 key "PMSubscriptionAlbum:0.0.1"
950 name: PMSubscriptionOutputEvent
954 name: PMSubscriptionOutputEvent
956 UUID: 992b7819-9f69-3aa0-bb0f-6e45ea15ce05
957 description: Generated description for concept referred to by
958 key "PMSubscriptionOutputEvent:0.0.1"
960 name: PMSubscriptionType
964 name: PMSubscriptionType
966 UUID: 73c1c397-4fc3-357f-93b6-a8ad707fbaae
967 description: Generated description for concept referred to by
968 key "PMSubscriptionType:0.0.1"
970 name: ReceiveEventPolicy
974 name: ReceiveEventPolicy
976 UUID: 568b7345-9de1-36d3-b6a3-9b857e6809a1
977 description: Generated description for concept referred to by
978 key "ReceiveEventPolicy:0.0.1"
980 name: ReceiveSubscriptionTask
984 name: ReceiveSubscriptionTask
986 UUID: f596afc8-100c-35eb-92c8-352355ea457d
987 description: Generated description for concept referred to by
988 key "ReceiveSubscriptionTask:0.0.1"
996 UUID: 153791fd-ae0a-36a7-88a5-309a7936415d
997 description: Generated description for concept referred to by
998 key "SimpleIntType:0.0.1"
1000 name: SimpleStringType
1004 name: SimpleStringType
1006 UUID: 8a4957cf-9493-3a76-8c22-a208e23259af
1007 description: Generated description for concept referred to by
1008 key "SimpleStringType:0.0.1"
1010 name: SubscriptionStatusType
1014 name: SubscriptionStatusType
1016 UUID: 597643b1-9db1-31ce-85d0-e1c63c43b30b
1017 description: Generated description for concept referred to by
1018 key "SubscriptionStatusType:0.0.1"
1020 name: SubscriptionType
1024 name: SubscriptionType
1026 UUID: 184547bb-7d64-3cb2-a273-d7185102c5ce
1027 description: Generated description for concept referred to by
1028 key "SubscriptionType:0.0.1"
1036 UUID: 6a8cc68e-dfc8-3403-9c6d-071c886b319c
1037 description: Generated description for concept referred to by
1038 key "UUIDType:0.0.1"
1040 name: pmsh-operational-policy
1044 name: pmsh-operational-policy
1046 UUID: fdf2c9ff-6422-3ea6-b6b6-49b12116265d
1047 description: Generated description for concept referred to by
1048 key "pmsh-operational-policy:0.0.1"
1051 name: PMControlPolicy_Policies
1056 name: CDSCreateResponsePolicy
1060 name: CDSCreateResponsePolicy
1065 - key: CDSCreateResponseState
1068 parentKeyName: CDSCreateResponsePolicy
1069 parentKeyVersion: 0.0.1
1070 parentLocalName: 'NULL'
1071 localName: CDSCreateResponseState
1073 name: CDSCreateResponseEvent
1077 - key: ResponseOutput
1080 parentKeyName: CDSCreateResponsePolicy
1081 parentKeyVersion: 0.0.1
1082 parentLocalName: CDSCreateResponseState
1083 localName: ResponseOutput
1085 name: CDSResponseStatusEvent
1087 outgoingEventReference:
1088 - name: CDSResponseStatusEvent
1091 parentKeyName: 'NULL'
1092 parentKeyVersion: 0.0.0
1093 parentLocalName: 'NULL'
1095 contextAlbumReference: [ ]
1098 logicFlavour: UNDEFINED
1100 stateFinalizerLogicMap:
1103 name: CDSCreateResponseTask
1108 name: CDSCreateResponseTask
1112 parentKeyName: CDSCreateResponsePolicy
1113 parentKeyVersion: 0.0.1
1114 parentLocalName: CDSCreateResponseState
1115 localName: CDSCreateResponsePolicy
1118 parentKeyName: CDSCreateResponsePolicy
1119 parentKeyVersion: 0.0.1
1120 parentLocalName: CDSCreateResponseState
1121 localName: ResponseOutput
1122 firstState: CDSCreateResponseState
1124 name: CDSDeleteResponsePolicy
1128 name: CDSDeleteResponsePolicy
1133 - key: CDSDeleteResponseState
1136 parentKeyName: CDSDeleteResponsePolicy
1137 parentKeyVersion: 0.0.1
1138 parentLocalName: 'NULL'
1139 localName: CDSDeleteResponseState
1141 name: CDSDeleteResponseEvent
1145 - key: ResponseOutput
1148 parentKeyName: CDSDeleteResponsePolicy
1149 parentKeyVersion: 0.0.1
1150 parentLocalName: CDSDeleteResponseState
1151 localName: ResponseOutput
1153 name: CDSResponseStatusEvent
1155 outgoingEventReference:
1156 - name: CDSResponseStatusEvent
1159 parentKeyName: 'NULL'
1160 parentKeyVersion: 0.0.0
1161 parentLocalName: 'NULL'
1163 contextAlbumReference: [ ]
1166 logicFlavour: UNDEFINED
1168 stateFinalizerLogicMap:
1171 name: CDSDeleteResponseTask
1176 name: CDSDeleteResponseTask
1180 parentKeyName: CDSDeleteResponsePolicy
1181 parentKeyVersion: 0.0.1
1182 parentLocalName: CDSDeleteResponseState
1183 localName: CDSDeleteResponsePolicy
1186 parentKeyName: CDSDeleteResponsePolicy
1187 parentKeyVersion: 0.0.1
1188 parentLocalName: CDSDeleteResponseState
1189 localName: ResponseOutput
1190 firstState: CDSDeleteResponseState
1192 name: ReceiveEventPolicy
1196 name: ReceiveEventPolicy
1201 - key: CreateOrDeleteState
1204 parentKeyName: ReceiveEventPolicy
1205 parentKeyVersion: 0.0.1
1206 parentLocalName: 'NULL'
1207 localName: CreateOrDeleteState
1209 name: PMSubscriptionOutputEvent
1213 - key: CreateSubscriptionPayload
1216 parentKeyName: ReceiveEventPolicy
1217 parentKeyVersion: 0.0.1
1218 parentLocalName: CreateOrDeleteState
1219 localName: CreateSubscriptionPayload
1221 name: CreateSubscriptionPayloadEvent
1223 outgoingEventReference:
1224 - name: CreateSubscriptionPayloadEvent
1227 parentKeyName: ReceiveEventPolicy
1228 parentKeyVersion: 0.0.1
1229 parentLocalName: 'NULL'
1230 localName: CreateSubscription
1231 - key: DeleteSubscriptionPayload
1234 parentKeyName: ReceiveEventPolicy
1235 parentKeyVersion: 0.0.1
1236 parentLocalName: CreateOrDeleteState
1237 localName: DeleteSubscriptionPayload
1239 name: DeleteSubscriptionPayloadEvent
1241 outgoingEventReference:
1242 - name: DeleteSubscriptionPayloadEvent
1245 parentKeyName: ReceiveEventPolicy
1246 parentKeyVersion: 0.0.1
1247 parentLocalName: 'NULL'
1248 localName: DeleteSubscription
1249 contextAlbumReference:
1250 - name: PMSubscriptionAlbum
1253 key: TaskSelectionLogic
1254 logicFlavour: JAVASCRIPT
1257 * ============LICENSE_START=======================================================
1258 * Copyright (C) 2020 Nordix. All rights reserved.
1259 * ================================================================================
1260 * Licensed under the Apache License, Version 2.0 (the "License");
1261 * you may not use this file except in compliance with the License.
1262 * You may obtain a copy of the License at
1264 * http://www.apache.org/licenses/LICENSE-2.0
1266 * Unless required by applicable law or agreed to in writing, software
1267 * distributed under the License is distributed on an "AS IS" BASIS,
1268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1269 * See the License for the specific language governing permissions and
1270 * limitations under the License.
1272 * SPDX-License-Identifier: Apache-2.0
1273 * ============LICENSE_END=========================================================
1275 executor.logger.info(executor.subject.id);
1276 var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString())
1277 var changeType = pmSubscriptionInfo.get("changeType").toString()
1278 executor.logger.info("Change Type is " + changeType)
1279 if ("CREATE".equals(changeType)) {
1280 executor.logger.info("Choosing to create a subscription")
1281 executor.subject.getTaskKey("CreateSubscriptionPayloadTask").copyTo(executor.selectedTask);
1283 else if ("DELETE".equals(changeType)) {
1284 executor.logger.info("Choosing to delete a subscription")
1285 executor.subject.getTaskKey("DeleteSubscriptionPayloadTask").copyTo(executor.selectedTask);
1287 returnValue = executor.isTrue;
1289 stateFinalizerLogicMap:
1292 name: CreateSubscriptionPayloadTask
1297 name: CreateSubscriptionPayloadTask
1301 parentKeyName: ReceiveEventPolicy
1302 parentKeyVersion: 0.0.1
1303 parentLocalName: CreateOrDeleteState
1304 localName: ReceiveEventPolicy
1307 parentKeyName: ReceiveEventPolicy
1308 parentKeyVersion: 0.0.1
1309 parentLocalName: CreateOrDeleteState
1310 localName: CreateSubscriptionPayload
1312 name: DeleteSubscriptionPayloadTask
1316 parentKeyName: ReceiveEventPolicy
1317 parentKeyVersion: 0.0.1
1318 parentLocalName: CreateOrDeleteState
1319 localName: ReceiveEventPolicy
1322 parentKeyName: ReceiveEventPolicy
1323 parentKeyVersion: 0.0.1
1324 parentLocalName: CreateOrDeleteState
1325 localName: DeleteSubscriptionPayload
1326 - key: CreateSubscription
1329 parentKeyName: ReceiveEventPolicy
1330 parentKeyVersion: 0.0.1
1331 parentLocalName: 'NULL'
1332 localName: CreateSubscription
1334 name: CreateSubscriptionPayloadEvent
1338 - key: IssueCreateSubscriptionRequestOutput
1341 parentKeyName: ReceiveEventPolicy
1342 parentKeyVersion: 0.0.1
1343 parentLocalName: CreateSubscription
1344 localName: IssueCreateSubscriptionRequestOutput
1346 name: CDSCreateSubscriptionRequestEvent
1348 outgoingEventReference:
1349 - name: CDSCreateSubscriptionRequestEvent
1352 parentKeyName: 'NULL'
1353 parentKeyVersion: 0.0.0
1354 parentLocalName: 'NULL'
1356 contextAlbumReference:
1357 - name: PMSubscriptionAlbum
1361 logicFlavour: UNDEFINED
1363 stateFinalizerLogicMap:
1366 name: CreateSubscriptionRequestTask
1371 name: CreateSubscriptionRequestTask
1375 parentKeyName: ReceiveEventPolicy
1376 parentKeyVersion: 0.0.1
1377 parentLocalName: CreateSubscription
1378 localName: ReceiveEventPolicy
1381 parentKeyName: ReceiveEventPolicy
1382 parentKeyVersion: 0.0.1
1383 parentLocalName: CreateSubscription
1384 localName: IssueCreateSubscriptionRequestOutput
1385 - key: DeleteSubscription
1388 parentKeyName: ReceiveEventPolicy
1389 parentKeyVersion: 0.0.1
1390 parentLocalName: 'NULL'
1391 localName: DeleteSubscription
1393 name: DeleteSubscriptionPayloadEvent
1397 - key: IssueDeleteSubscriptionRequestOutput
1400 parentKeyName: ReceiveEventPolicy
1401 parentKeyVersion: 0.0.1
1402 parentLocalName: DeleteSubscription
1403 localName: IssueDeleteSubscriptionRequestOutput
1405 name: CDSDeleteSubscriptionRequestEvent
1407 outgoingEventReference:
1408 - name: CDSDeleteSubscriptionRequestEvent
1411 parentKeyName: 'NULL'
1412 parentKeyVersion: 0.0.0
1413 parentLocalName: 'NULL'
1415 contextAlbumReference:
1416 - name: PMSubscriptionAlbum
1420 logicFlavour: UNDEFINED
1422 stateFinalizerLogicMap:
1425 name: DeleteSubscriptionRequestTask
1430 name: DeleteSubscriptionRequestTask
1434 parentKeyName: ReceiveEventPolicy
1435 parentKeyVersion: 0.0.1
1436 parentLocalName: DeleteSubscription
1437 localName: ReceiveEventPolicy
1440 parentKeyName: ReceiveEventPolicy
1441 parentKeyVersion: 0.0.1
1442 parentLocalName: DeleteSubscription
1443 localName: IssueDeleteSubscriptionRequestOutput
1444 - key: ReceiveSubscriptionState
1447 parentKeyName: ReceiveEventPolicy
1448 parentKeyVersion: 0.0.1
1449 parentLocalName: 'NULL'
1450 localName: ReceiveSubscriptionState
1452 name: pmsh-operational-policy
1456 - key: ReceivePMSubscriptionOutput
1459 parentKeyName: ReceiveEventPolicy
1460 parentKeyVersion: 0.0.1
1461 parentLocalName: ReceiveSubscriptionState
1462 localName: ReceivePMSubscriptionOutput
1464 name: PMSubscriptionOutputEvent
1466 outgoingEventReference:
1467 - name: PMSubscriptionOutputEvent
1470 parentKeyName: ReceiveEventPolicy
1471 parentKeyVersion: 0.0.1
1472 parentLocalName: 'NULL'
1473 localName: CreateOrDeleteState
1474 contextAlbumReference:
1475 - name: PMSubscriptionAlbum
1479 logicFlavour: UNDEFINED
1481 stateFinalizerLogicMap:
1484 name: ReceiveSubscriptionTask
1489 name: ReceiveSubscriptionTask
1493 parentKeyName: ReceiveEventPolicy
1494 parentKeyVersion: 0.0.1
1495 parentLocalName: ReceiveSubscriptionState
1496 localName: ReceiveEventPolicy
1499 parentKeyName: ReceiveEventPolicy
1500 parentKeyVersion: 0.0.1
1501 parentLocalName: ReceiveSubscriptionState
1502 localName: ReceivePMSubscriptionOutput
1503 firstState: ReceiveSubscriptionState
1506 name: PMControlPolicy_Tasks
1511 name: CDSCreateResponseTask
1515 name: CDSCreateResponseTask
1519 name: CDSCreateResponseEvent
1521 nameSpace: org.onap.policy.apex.onap.pmcontrol
1526 - key: actionIdentifiers
1528 key: actionIdentifiers
1530 name: CDSActionIdentifiersType
1537 name: CDSResponseCommonHeaderType
1544 name: CDSCreateResponsePayloadType
1551 name: CDSResponseStatusType
1556 - key: CDSResponseStatusEvent
1559 name: CDSResponseStatusEvent
1561 nameSpace: org.onap.policy.apex.onap.pmcontrol
1570 name: SubscriptionStatusType
1575 contextAlbumReference:
1576 - name: PMSubscriptionAlbum
1580 logicFlavour: JAVASCRIPT
1583 * ============LICENSE_START=======================================================
1584 * Copyright (C) 2020 Nordix. All rights reserved.
1585 * ================================================================================
1586 * Licensed under the Apache License, Version 2.0 (the "License");
1587 * you may not use this file except in compliance with the License.
1588 * You may obtain a copy of the License at
1590 * http://www.apache.org/licenses/LICENSE-2.0
1592 * Unless required by applicable law or agreed to in writing, software
1593 * distributed under the License is distributed on an "AS IS" BASIS,
1594 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1595 * See the License for the specific language governing permissions and
1596 * limitations under the License.
1598 * SPDX-License-Identifier: Apache-2.0
1599 * ============LICENSE_END=========================================================
1601 executor.logger.info(executor.subject.id);
1602 var commonHeader = executor.inFields.get("commonHeader")
1603 var response = executor.inFields.get("payload")
1604 var albumID = commonHeader.get("requestId")
1605 var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(albumID.toString());
1606 var responseStatus = executor.subject.getOutFieldSchemaHelper("status").createNewInstance();
1607 var changeType = pmSubscriptionInfo.get("changeType").toUpperCase()
1608 responseStatus.put("nfName", pmSubscriptionInfo.get("nfName"))
1609 responseStatus.put("changeType", pmSubscriptionInfo.get("changeType"))
1610 if ("CREATE".equals(changeType)) {
1611 responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName"))
1612 responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("subscription").get("measurementGroup").get("measurementGroupName"))
1614 else if ("DELETE".equals(changeType)) {
1615 responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName"))
1616 responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName"))
1618 var status = response.get(pmSubscriptionInfo.get("changeType").toLowerCase() + "_DasH_subscription_DasH_response").get("odl_DasH_response").get("status")
1619 executor.logger.info("RESPONSE STATUS = " + status)
1620 if(status == "success") {
1621 responseStatus.put("message", "success")
1623 responseStatus.put("message", "failed")
1625 executor.outFields.put("status", responseStatus)
1626 returnValue = executor.isTrue;
1629 name: CDSDeleteResponseTask
1633 name: CDSDeleteResponseTask
1637 name: CDSDeleteResponseEvent
1639 nameSpace: org.onap.policy.apex.onap.pmcontrol
1644 - key: actionIdentifiers
1646 key: actionIdentifiers
1648 name: CDSActionIdentifiersType
1655 name: CDSResponseCommonHeaderType
1662 name: CDSDeleteResponsePayloadType
1669 name: CDSResponseStatusType
1674 - key: CDSResponseStatusEvent
1677 name: CDSResponseStatusEvent
1679 nameSpace: org.onap.policy.apex.onap.pmcontrol
1688 name: SubscriptionStatusType
1693 contextAlbumReference:
1694 - name: PMSubscriptionAlbum
1698 logicFlavour: JAVASCRIPT
1701 * ============LICENSE_START=======================================================
1702 * Copyright (C) 2020 Nordix. All rights reserved.
1703 * ================================================================================
1704 * Licensed under the Apache License, Version 2.0 (the "License");
1705 * you may not use this file except in compliance with the License.
1706 * You may obtain a copy of the License at
1708 * http://www.apache.org/licenses/LICENSE-2.0
1710 * Unless required by applicable law or agreed to in writing, software
1711 * distributed under the License is distributed on an "AS IS" BASIS,
1712 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1713 * See the License for the specific language governing permissions and
1714 * limitations under the License.
1716 * SPDX-License-Identifier: Apache-2.0
1717 * ============LICENSE_END=========================================================
1719 executor.logger.info(executor.subject.id);
1720 var commonHeader = executor.inFields.get("commonHeader")
1721 var response = executor.inFields.get("payload")
1722 var albumID = commonHeader.get("requestId")
1723 var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(albumID.toString());
1724 var responseStatus = executor.subject.getOutFieldSchemaHelper("status").createNewInstance();
1725 var changeType = pmSubscriptionInfo.get("changeType").toUpperCase()
1726 responseStatus.put("nfName", pmSubscriptionInfo.get("nfName"))
1727 responseStatus.put("changeType", pmSubscriptionInfo.get("changeType"))
1728 if ("CREATE".equals(changeType)) {
1729 responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName"))
1730 responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("subscription").get("measurementGroup").get("measurementGroupName"))
1732 else if ("DELETE".equals(changeType)) {
1733 responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName"))
1734 responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName"))
1736 var status = response.get(pmSubscriptionInfo.get("changeType").toLowerCase() + "_DasH_subscription_DasH_response").get("odl_DasH_response").get("status")
1737 executor.logger.info("RESPONSE STATUS = " + status)
1738 if(status == "success") {
1739 responseStatus.put("message", "success")
1741 responseStatus.put("message", "failed")
1743 executor.outFields.put("status", responseStatus)
1744 returnValue = executor.isTrue;
1747 name: CreateSubscriptionPayloadTask
1751 name: CreateSubscriptionPayloadTask
1755 name: PMSubscriptionOutputEvent
1757 nameSpace: org.onap.policy.apex.onap.pmcontrol
1771 - key: CreateSubscriptionPayloadEvent
1774 name: CreateSubscriptionPayloadEvent
1776 nameSpace: org.onap.policy.apex.onap.pmcontrol
1792 name: CDSCreateSubscriptionPayloadType
1797 contextAlbumReference:
1798 - name: PMSubscriptionAlbum
1802 logicFlavour: JAVASCRIPT
1805 * ============LICENSE_START=======================================================
1806 * Copyright (C) 2020 Nordix. All rights reserved.
1807 * ================================================================================
1808 * Licensed under the Apache License, Version 2.0 (the "License");
1809 * you may not use this file except in compliance with the License.
1810 * You may obtain a copy of the License at
1812 * http://www.apache.org/licenses/LICENSE-2.0
1814 * Unless required by applicable law or agreed to in writing, software
1815 * distributed under the License is distributed on an "AS IS" BASIS,
1816 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1817 * See the License for the specific language governing permissions and
1818 * limitations under the License.
1820 * SPDX-License-Identifier: Apache-2.0
1821 * ============LICENSE_END=========================================================
1823 executor.logger.info(executor.subject.id);
1824 var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString())
1825 var changeType = pmSubscriptionInfo.get("changeType").toLowerCase()
1826 var payloadProperties = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance(changeType + "_DasH_subscription_DasH_properties_record");
1827 payloadProperties.put("nfName", pmSubscriptionInfo.get("nfName"))
1828 payloadProperties.put("ipAddress", pmSubscriptionInfo.get("ipAddress"))
1829 if ("create".equals(changeType)) {
1830 payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName"))
1831 payloadProperties.put("fileBasedGP", pmSubscriptionInfo.get("subscription").get("fileBasedGP").toString())
1832 payloadProperties.put("fileLocation", pmSubscriptionInfo.get("subscription").get("fileLocation"))
1833 payloadProperties.put("measurementGroup", pmSubscriptionInfo.get("subscription").get("measurementGroup"))
1835 else if ("delete".equals(changeType)) {
1836 payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName"))
1837 payloadProperties.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName"))
1839 var payloadEntry = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance("CDSRequestPayloadEntry");
1840 payloadEntry.put(changeType + "_DasH_subscription_DasH_properties", payloadProperties)
1841 var payload = executor.subject.getOutFieldSchemaHelper("payload").createNewInstance();
1842 payload.put(changeType + "_DasH_subscription_DasH_request", payloadEntry);
1843 executor.outFields.put("albumID", executor.inFields.get("albumID"))
1844 executor.outFields.put("payload", payload);
1845 returnValue = executor.isTrue;
1848 name: CreateSubscriptionRequestTask
1852 name: CreateSubscriptionRequestTask
1856 name: CreateSubscriptionPayloadEvent
1858 nameSpace: org.onap.policy.apex.onap.pmcontrol
1874 name: CDSCreateSubscriptionPayloadType
1879 - key: CDSCreateSubscriptionRequestEvent
1882 name: CDSCreateSubscriptionRequestEvent
1884 nameSpace: org.onap.policy.apex.onap.pmcontrol
1889 - key: actionIdentifiers
1891 key: actionIdentifiers
1893 name: CDSActionIdentifiersType
1900 name: CDSRequestCommonHeaderType
1907 name: CDSCreateSubscriptionPayloadType
1912 contextAlbumReference:
1913 - name: PMSubscriptionAlbum
1917 logicFlavour: JAVASCRIPT
1920 * ============LICENSE_START=======================================================
1921 * Copyright (C) 2020 Nordix. All rights reserved.
1922 * ================================================================================
1923 * Licensed under the Apache License, Version 2.0 (the "License");
1924 * you may not use this file except in compliance with the License.
1925 * You may obtain a copy of the License at
1927 * http://www.apache.org/licenses/LICENSE-2.0
1929 * Unless required by applicable law or agreed to in writing, software
1930 * distributed under the License is distributed on an "AS IS" BASIS,
1931 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1932 * See the License for the specific language governing permissions and
1933 * limitations under the License.
1935 * SPDX-License-Identifier: Apache-2.0
1936 * ============LICENSE_END=========================================================
1938 executor.logger.info(executor.subject.id);
1939 var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString())
1940 executor.logger.info(pmSubscriptionInfo)
1941 var changeType = pmSubscriptionInfo.get("changeType").toLowerCase()
1942 var blueprintName = pmSubscriptionInfo.get("blueprintName").toLowerCase()
1943 var blueprintVersion = pmSubscriptionInfo.get("blueprintVersion").toLowerCase()
1944 var payload = executor.inFields.get("payload")
1945 var actionName = changeType + "-subscription"
1946 var commonHeader = executor.subject.getOutFieldSchemaHelper("commonHeader").createNewInstance();
1947 commonHeader.put("originatorId", "sdnc");
1948 commonHeader.put("requestId", executor.inFields.get("albumID").toString());
1949 commonHeader.put("subRequestId", "sub-123456-1000");
1950 var actionIdentifiers = executor.subject.getOutFieldSchemaHelper("actionIdentifiers").createNewInstance();
1951 actionIdentifiers.put("actionName", actionName);
1952 actionIdentifiers.put("blueprintName", blueprintName);
1953 actionIdentifiers.put("blueprintVersion", blueprintVersion);
1954 actionIdentifiers.put("mode", "sync");
1955 executor.outFields.put("commonHeader", commonHeader);
1956 executor.outFields.put("actionIdentifiers", actionIdentifiers);
1957 executor.outFields.put("payload", payload);
1958 returnValue = executor.isTrue;
1961 name: DeleteSubscriptionPayloadTask
1965 name: DeleteSubscriptionPayloadTask
1969 name: PMSubscriptionOutputEvent
1971 nameSpace: org.onap.policy.apex.onap.pmcontrol
1985 - key: DeleteSubscriptionPayloadEvent
1988 name: DeleteSubscriptionPayloadEvent
1990 nameSpace: org.onap.policy.apex.onap.pmcontrol
2006 name: CDSDeleteSubscriptionPayloadType
2011 contextAlbumReference:
2012 - name: PMSubscriptionAlbum
2016 logicFlavour: JAVASCRIPT
2019 * ============LICENSE_START=======================================================
2020 * Copyright (C) 2020 Nordix. All rights reserved.
2021 * ================================================================================
2022 * Licensed under the Apache License, Version 2.0 (the "License");
2023 * you may not use this file except in compliance with the License.
2024 * You may obtain a copy of the License at
2026 * http://www.apache.org/licenses/LICENSE-2.0
2028 * Unless required by applicable law or agreed to in writing, software
2029 * distributed under the License is distributed on an "AS IS" BASIS,
2030 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2031 * See the License for the specific language governing permissions and
2032 * limitations under the License.
2034 * SPDX-License-Identifier: Apache-2.0
2035 * ============LICENSE_END=========================================================
2037 executor.logger.info(executor.subject.id);
2038 var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString())
2039 var changeType = pmSubscriptionInfo.get("changeType").toLowerCase()
2040 var payloadProperties = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance(changeType + "_DasH_subscription_DasH_properties_record");
2041 payloadProperties.put("nfName", pmSubscriptionInfo.get("nfName"))
2042 payloadProperties.put("ipAddress", pmSubscriptionInfo.get("ipAddress"))
2043 if ("create".equals(changeType)) {
2044 payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName"))
2045 payloadProperties.put("fileBasedGP", pmSubscriptionInfo.get("subscription").get("fileBasedGP").toString())
2046 payloadProperties.put("fileLocation", pmSubscriptionInfo.get("subscription").get("fileLocation"))
2047 payloadProperties.put("measurementGroup", pmSubscriptionInfo.get("subscription").get("measurementGroup"))
2049 else if ("delete".equals(changeType)) {
2050 payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName"))
2051 payloadProperties.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName"))
2053 var payloadEntry = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance("CDSRequestPayloadEntry");
2054 payloadEntry.put(changeType + "_DasH_subscription_DasH_properties", payloadProperties)
2055 var payload = executor.subject.getOutFieldSchemaHelper("payload").createNewInstance();
2056 payload.put(changeType + "_DasH_subscription_DasH_request", payloadEntry);
2057 executor.outFields.put("albumID", executor.inFields.get("albumID"))
2058 executor.outFields.put("payload", payload);
2059 returnValue = executor.isTrue;
2062 name: DeleteSubscriptionRequestTask
2066 name: DeleteSubscriptionRequestTask
2070 name: DeleteSubscriptionPayloadEvent
2072 nameSpace: org.onap.policy.apex.onap.pmcontrol
2088 name: CDSDeleteSubscriptionPayloadType
2093 - key: CDSDeleteSubscriptionRequestEvent
2096 name: CDSDeleteSubscriptionRequestEvent
2098 nameSpace: org.onap.policy.apex.onap.pmcontrol
2103 - key: actionIdentifiers
2105 key: actionIdentifiers
2107 name: CDSActionIdentifiersType
2114 name: CDSRequestCommonHeaderType
2121 name: CDSDeleteSubscriptionPayloadType
2126 contextAlbumReference:
2127 - name: PMSubscriptionAlbum
2131 logicFlavour: JAVASCRIPT
2134 * ============LICENSE_START=======================================================
2135 * Copyright (C) 2020 Nordix. All rights reserved.
2136 * ================================================================================
2137 * Licensed under the Apache License, Version 2.0 (the "License");
2138 * you may not use this file except in compliance with the License.
2139 * You may obtain a copy of the License at
2141 * http://www.apache.org/licenses/LICENSE-2.0
2143 * Unless required by applicable law or agreed to in writing, software
2144 * distributed under the License is distributed on an "AS IS" BASIS,
2145 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2146 * See the License for the specific language governing permissions and
2147 * limitations under the License.
2149 * SPDX-License-Identifier: Apache-2.0
2150 * ============LICENSE_END=========================================================
2152 executor.logger.info(executor.subject.id);
2153 var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString())
2154 executor.logger.info(pmSubscriptionInfo)
2155 var changeType = pmSubscriptionInfo.get("changeType").toLowerCase()
2156 var blueprintName = pmSubscriptionInfo.get("blueprintName").toLowerCase()
2157 var blueprintVersion = pmSubscriptionInfo.get("blueprintVersion").toLowerCase()
2158 var payload = executor.inFields.get("payload")
2159 var actionName = changeType + "-subscription"
2160 var commonHeader = executor.subject.getOutFieldSchemaHelper("commonHeader").createNewInstance();
2161 commonHeader.put("originatorId", "sdnc");
2162 commonHeader.put("requestId", executor.inFields.get("albumID").toString());
2163 commonHeader.put("subRequestId", "sub-123456-1000");
2164 var actionIdentifiers = executor.subject.getOutFieldSchemaHelper("actionIdentifiers").createNewInstance();
2165 actionIdentifiers.put("actionName", actionName);
2166 actionIdentifiers.put("blueprintName", blueprintName);
2167 actionIdentifiers.put("blueprintVersion", blueprintVersion);
2168 actionIdentifiers.put("mode", "sync");
2169 executor.outFields.put("commonHeader", commonHeader);
2170 executor.outFields.put("actionIdentifiers", actionIdentifiers);
2171 executor.outFields.put("payload", payload);
2172 returnValue = executor.isTrue;
2175 name: ReceiveSubscriptionTask
2179 name: ReceiveSubscriptionTask
2183 name: pmsh-operational-policy
2185 nameSpace: org.onap.policy.apex.onap.pmcontrol
2190 - key: blueprintName
2194 name: SimpleStringType
2197 - key: blueprintVersion
2199 key: blueprintVersion
2201 name: SimpleStringType
2208 name: SimpleStringType
2211 - key: controlLoopName
2213 key: controlLoopName
2215 name: SimpleStringType
2222 name: SimpleStringType
2225 - key: measurementGroupName
2227 key: measurementGroupName
2229 name: SimpleStringType
2236 name: SimpleStringType
2239 - key: operationalPolicyName
2241 key: operationalPolicyName
2243 name: SimpleStringType
2250 name: SubscriptionType
2253 - key: subscriptionName
2255 key: subscriptionName
2257 name: SimpleStringType
2262 - key: PMSubscriptionOutputEvent
2265 name: PMSubscriptionOutputEvent
2267 nameSpace: org.onap.policy.apex.onap.pmcontrol
2281 contextAlbumReference:
2282 - name: PMSubscriptionAlbum
2286 logicFlavour: JAVASCRIPT
2289 * ============LICENSE_START=======================================================
2290 * Copyright (C) 2020 Nordix. All rights reserved.
2291 * ================================================================================
2292 * Licensed under the Apache License, Version 2.0 (the "License");
2293 * you may not use this file except in compliance with the License.
2294 * You may obtain a copy of the License at
2296 * http://www.apache.org/licenses/LICENSE-2.0
2298 * Unless required by applicable law or agreed to in writing, software
2299 * distributed under the License is distributed on an "AS IS" BASIS,
2300 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2301 * See the License for the specific language governing permissions and
2302 * limitations under the License.
2304 * SPDX-License-Identifier: Apache-2.0
2305 * ============LICENSE_END=========================================================
2307 var uuidType = java.util.UUID;
2308 executor.logger.info(executor.subject.id);
2309 //albumID will be used to fetch info from our album later
2310 var albumID = uuidType.randomUUID();
2311 var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").getSchemaHelper().createNewInstance();
2312 var returnValue = true;
2313 if(executor.inFields.get("operationalPolicyName") != null) {
2314 executor.logger.info("nfName in receive sub event " + executor.inFields.get("nfName"));
2315 var changeType = executor.inFields.get("changeType")
2316 var nfName = executor.inFields.get("nfName")
2317 var ipAddress = executor.inFields.get("ipAddress")
2318 var operationalPolicyName = executor.inFields.get("operationalPolicyName")
2319 var controlLoopName = executor.inFields.get("controlLoopName")
2320 var subscription = executor.inFields.get("subscription")
2321 var blueprintName = executor.inFields.get("blueprintName")
2322 var blueprintVersion = executor.inFields.get("blueprintVersion")
2323 pmSubscriptionInfo.put("nfName", executor.inFields.get("nfName"));
2324 pmSubscriptionInfo.put("ipAddress", executor.inFields.get("ipAddress"));
2325 pmSubscriptionInfo.put("changeType", executor.inFields.get("changeType"))
2326 pmSubscriptionInfo.put("operationalPolicyName", executor.inFields.get("operationalPolicyName"))
2327 pmSubscriptionInfo.put("controlLoopName", executor.inFields.get("controlLoopName"))
2328 pmSubscriptionInfo.put("subscription", subscription)
2329 pmSubscriptionInfo.put("blueprintName", blueprintName)
2330 pmSubscriptionInfo.put("blueprintVersion", blueprintVersion)
2331 if ("delete".equals(changeType.toLowerCase())) {
2332 pmSubscriptionInfo.put("subscriptionName", executor.inFields.get("subscriptionName"))
2333 pmSubscriptionInfo.put("measurementGroupName", executor.inFields.get("measurementGroupName"))
2335 executor.getContextAlbum("PMSubscriptionAlbum").put(albumID.toString(), pmSubscriptionInfo);
2336 executor.outFields.put("albumID", albumID)
2338 executor.message = "Received invalid event"
2339 returnValue = false;
2344 name: PMControlPolicy_Events
2349 name: CDSCreateResponseEvent
2353 name: CDSCreateResponseEvent
2355 nameSpace: org.onap.policy.apex.onap.pmcontrol
2360 - key: actionIdentifiers
2362 key: actionIdentifiers
2364 name: CDSActionIdentifiersType
2371 name: CDSResponseCommonHeaderType
2378 name: CDSCreateResponsePayloadType
2385 name: CDSResponseStatusType
2389 name: CDSCreateSubscriptionRequestEvent
2393 name: CDSCreateSubscriptionRequestEvent
2395 nameSpace: org.onap.policy.apex.onap.pmcontrol
2400 - key: actionIdentifiers
2402 key: actionIdentifiers
2404 name: CDSActionIdentifiersType
2411 name: CDSRequestCommonHeaderType
2418 name: CDSCreateSubscriptionPayloadType
2422 name: CDSDeleteResponseEvent
2426 name: CDSDeleteResponseEvent
2428 nameSpace: org.onap.policy.apex.onap.pmcontrol
2433 - key: actionIdentifiers
2435 key: actionIdentifiers
2437 name: CDSActionIdentifiersType
2444 name: CDSResponseCommonHeaderType
2451 name: CDSDeleteResponsePayloadType
2458 name: CDSResponseStatusType
2462 name: CDSDeleteSubscriptionRequestEvent
2466 name: CDSDeleteSubscriptionRequestEvent
2468 nameSpace: org.onap.policy.apex.onap.pmcontrol
2473 - key: actionIdentifiers
2475 key: actionIdentifiers
2477 name: CDSActionIdentifiersType
2484 name: CDSRequestCommonHeaderType
2491 name: CDSDeleteSubscriptionPayloadType
2495 name: CDSResponseStatusEvent
2499 name: CDSResponseStatusEvent
2501 nameSpace: org.onap.policy.apex.onap.pmcontrol
2510 name: SubscriptionStatusType
2514 name: CreateSubscriptionPayloadEvent
2518 name: CreateSubscriptionPayloadEvent
2520 nameSpace: org.onap.policy.apex.onap.pmcontrol
2536 name: CDSCreateSubscriptionPayloadType
2540 name: DeleteSubscriptionPayloadEvent
2544 name: DeleteSubscriptionPayloadEvent
2546 nameSpace: org.onap.policy.apex.onap.pmcontrol
2562 name: CDSDeleteSubscriptionPayloadType
2566 name: MRResponseEvent
2570 name: MRResponseEvent
2572 nameSpace: org.onap.policy.apex.onap.pmcontrol
2592 name: PMSubscriptionOutputEvent
2596 name: PMSubscriptionOutputEvent
2598 nameSpace: org.onap.policy.apex.onap.pmcontrol
2611 name: pmsh-operational-policy
2615 name: pmsh-operational-policy
2617 nameSpace: org.onap.policy.apex.onap.pmcontrol
2622 - key: blueprintName
2626 name: SimpleStringType
2629 - key: blueprintVersion
2631 key: blueprintVersion
2633 name: SimpleStringType
2640 name: SimpleStringType
2643 - key: controlLoopName
2645 key: controlLoopName
2647 name: SimpleStringType
2654 name: SimpleStringType
2657 - key: measurementGroupName
2659 key: measurementGroupName
2661 name: SimpleStringType
2668 name: SimpleStringType
2671 - key: operationalPolicyName
2673 key: operationalPolicyName
2675 name: SimpleStringType
2682 name: SubscriptionType
2685 - key: subscriptionName
2687 key: subscriptionName
2689 name: SimpleStringType
2694 name: PMControlPolicy_Albums
2699 name: PMSubscriptionAlbum
2703 name: PMSubscriptionAlbum
2708 name: PMSubscriptionType
2712 name: PMControlPolicy_Schemas
2717 name: CDSActionIdentifiersType
2721 name: CDSActionIdentifiersType
2724 schemaDefinition: |-
2727 "name": "ActionIdentifiers_Type",
2728 "namespace": "org.onap.policy.apex.onap.helloworld",
2731 "name": "actionName",
2735 "name": "blueprintName",
2739 "name": "blueprintVersion",
2749 name: CDSCreateResponsePayloadType
2753 name: CDSCreateResponsePayloadType
2756 schemaDefinition: |-
2758 "name": "CreateResponsePayloadEntry",
2760 "namespace": "com.acme.avro",
2763 "name": "create_DasH_subscription_DasH_response",
2765 "name": "create_DasH_subscription_DasH_response",
2769 "name": "odl_DasH_response",
2771 "name": "odl_DasH_response",
2787 name: CDSCreateSubscriptionPayloadType
2791 name: CDSCreateSubscriptionPayloadType
2794 schemaDefinition: |-
2799 "name":"CDSRequestPayloadEntry",
2802 "name":"create_DasH_subscription_DasH_properties",
2804 "name":"create_DasH_subscription_DasH_properties_record",
2816 "name":"subscriptionName",
2820 "name":"fileBasedGP",
2824 "name":"fileLocation",
2828 "name":"measurementGroup",
2830 "name":"Measurement_Group_Type",
2834 "name":"measurementGroupName",
2838 "name":"measurementTypes",
2842 "name":"Measurement_Types_Type",
2846 "name":"measurementType",
2854 "name":"managedObjectDNsBasic",
2858 "name":"Managed_Object_Dns_Basic_Type",
2879 name: CDSDeleteResponsePayloadType
2883 name: CDSDeleteResponsePayloadType
2886 schemaDefinition: |-
2888 "name": "DeleteResponsePayloadEntry",
2890 "namespace": "com.acme.avro",
2893 "name": "delete_DasH_subscription_DasH_response",
2895 "name": "delete_DasH_subscription_DasH_response",
2899 "name": "odl_DasH_response",
2901 "name": "odl_DasH_response",
2917 name: CDSDeleteSubscriptionPayloadType
2921 name: CDSDeleteSubscriptionPayloadType
2924 schemaDefinition: |-
2929 "name":"CDSRequestPayloadEntry",
2932 "name":"delete_DasH_subscription_DasH_properties",
2934 "name":"delete_DasH_subscription_DasH_properties_record",
2946 "name":"subscriptionName",
2950 "name":"measurementGroupName",
2960 name: CDSRequestCommonHeaderType
2964 name: CDSRequestCommonHeaderType
2967 schemaDefinition: |-
2970 "name": "RequestCommonHeader_Type",
2971 "namespace": "org.onap.policy.apex.onap.helloworld",
2974 "name": "originatorId",
2978 "name": "requestId",
2982 "name": "subRequestId",
2988 name: CDSResponseCommonHeaderType
2992 name: CDSResponseCommonHeaderType
2995 schemaDefinition: |-
2998 "name": "ResponseCommonHeader_Type",
2999 "namespace": "org.onap.policy.apex.onap.helloworld",
3002 "name": "originatorId",
3006 "name": "requestId",
3010 "name": "subRequestId",
3014 "name": "timestamp",
3019 "type": ["null", "string"]
3024 name: CDSResponseStatusType
3028 name: CDSResponseStatusType
3031 schemaDefinition: |-
3034 "name": "ResponseStatus_Type",
3035 "namespace": "org.onap.policy.apex.onap.helloworld",
3042 "name": "eventType",
3046 "name": "timestamp",
3056 name: PMSubscriptionType
3060 name: PMSubscriptionType
3063 schemaDefinition: |-
3065 "name": "PMSubscription",
3067 "namespace": "org.onap.policy.apex.onap.pmcontrol",
3074 "name": "ipAddress",
3078 "name": "changeType",
3082 "name": "controlLoopName",
3086 "name": "operationalPolicyName",
3090 "name": "blueprintName",
3094 "name": "blueprintVersion",
3098 "name": "subscriptionName",
3102 "name": "measurementGroupName",
3106 "name": "subscription",
3108 "name": "subscription",
3112 "name": "subscriptionName",
3116 "name": "fileBasedGP",
3120 "name": "fileLocation",
3124 "name": "measurementGroup",
3126 "name": "Measurement_Group_Type",
3130 "name": "measurementGroupName",
3134 "name": "measurementTypes",
3138 "name": "Measurement_Types_Type",
3142 "name": "measurementType",
3150 "name": "managedObjectDNsBasic",
3154 "name": "Managed_Object_Dns_Basic_Type",
3181 schemaDefinition: java.lang.Integer
3183 name: SimpleStringType
3187 name: SimpleStringType
3190 schemaDefinition: java.lang.String
3192 name: SubscriptionStatusType
3196 name: SubscriptionStatusType
3199 schemaDefinition: |-
3202 "name": "ActivateSubscriptionStatus_Type",
3203 "namespace": "org.onap.policy.apex.onap.helloworld",
3206 "name": "subscriptionName",
3210 "name": "measurementGroupName",
3218 "name": "changeType",
3228 name: SubscriptionType
3232 name: SubscriptionType
3235 schemaDefinition: |-
3237 "name": "subscription",
3242 "name": "subscriptionName",
3246 "name": "fileBasedGP",
3250 "name": "fileLocation",
3254 "name": "measurementGroup",
3256 "name": "Measurement_Group_Type",
3260 "name": "measurementGroupName",
3264 "name": "measurementTypes",
3268 "name": "Measurement_Types_Type",
3272 "name": "measurementType",
3280 "name": "managedObjectDNsBasic",
3284 "name": "Managed_Object_Dns_Basic_Type",
3308 schemaDefinition: java.util.UUID
3309 eventInputParameters:
3311 carrierTechnologyParameters:
3312 carrierTechnology: RESTCLIENT
3313 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
3315 consumerPollTime: '50'
3316 url: https://message-router:3905/events/unauthenticated.DCAE_CL_OUTPUT/cg1/sg1
3317 eventProtocolParameters:
3320 nameAlias: operationalPolicyName
3321 eventName: pmsh-operational-policy
3322 eventNameFilter: pmsh-operational-policy
3324 carrierTechnologyParameters:
3325 carrierTechnology: RESTREQUESTOR
3326 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters
3328 url: http://cds-blueprints-processor-http:8080/api/v1/execution-service/process
3330 restRequestTimeout: 2000
3333 - Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
3334 eventProtocolParameters:
3336 eventName: CDSCreateResponseEvent
3337 eventNameFilter: CDSCreateResponseEvent
3339 requestorPeer: CDSRequestProducer
3340 requestorTimeout: 500
3341 CDSDeleteRequestConsumer:
3342 carrierTechnologyParameters:
3343 carrierTechnology: RESTREQUESTOR
3344 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters
3346 url: http://cds-blueprints-processor-http:8080/api/v1/execution-service/process
3348 restRequestTimeout: 2000
3351 - Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
3352 eventProtocolParameters:
3354 eventName: CDSDeleteResponseEvent
3355 eventNameFilter: CDSDeleteResponseEvent
3357 requestorPeer: CDSDeleteRequestProducer
3358 requestorTimeout: 500
3359 eventOutputParameters:
3361 carrierTechnologyParameters:
3362 carrierTechnology: FILE
3365 eventProtocolParameters:
3368 carrierTechnologyParameters:
3369 carrierTechnology: FILE
3372 eventProtocolParameters:
3375 carrierTechnologyParameters:
3376 carrierTechnology: RESTREQUESTOR
3377 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters
3378 eventProtocolParameters:
3380 eventNameFilter: CDSCreateSubscriptionRequestEvent
3382 requestorPeer: CDSRequestConsumer
3383 requestorTimeout: 500
3384 CDSDeleteRequestProducer:
3385 carrierTechnologyParameters:
3386 carrierTechnology: RESTREQUESTOR
3387 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters
3388 eventProtocolParameters:
3390 eventNameFilter: CDSDeleteSubscriptionRequestEvent
3392 requestorPeer: CDSDeleteRequestConsumer
3393 requestorTimeout: 500
3395 carrierTechnologyParameters:
3396 carrierTechnology: RESTCLIENT
3397 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
3399 url: https://message-router:3905/events/unauthenticated.PMSH_CL_INPUT
3401 restRequestTimeout: 2000
3402 eventProtocolParameters:
3404 eventNameFilter: CDSResponseStatusEvent