1 tosca_definitions_version: tosca_simple_yaml_1_3
3 onap.datatypes.ToscaConceptIdentifier:
4 derived_from: tosca.datatypes.Root
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
19 description: Category for the target type
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.
34 clamp_possible_values: ClampExecution:CSAR_RESOURCES
37 onap.datatype.controlloop.Actor:
38 derived_from: tosca.datatypes.Root
39 description: An actor/operation/target definition
43 description: The actor performing the operation.
46 clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor
49 description: The operation the actor is performing.
51 clamp_possible_values: Dictionary:DefaultOperations,ClampExecution:CDS/operation
54 type: onap.datatype.controlloop.Target
55 description: The resource the operation should be performed on.
59 description: Name/value pairs of payload information passed by Policy to the
63 clamp_possible_values: ClampExecution:CDS/payload
66 onap.datatype.controlloop.Operation:
67 derived_from: tosca.datatypes.Root
68 description: An operation supported by an actor
72 description: Unique identifier for the operation
76 description: A user-friendly description of the intent for the operation
79 type: onap.datatype.controlloop.Actor
80 description: The definition of the operation to be performed.
84 description: The amount of time for the actor to perform the operation.
88 description: The number of retries the actor should attempt to perform the
94 description: Points to the operation to invoke on success. A value of "final_success"
95 indicates and end to the operation.
97 default: final_success
100 description: Points to the operation to invoke on Actor operation failure.
102 default: final_failure
105 description: Points to the operation to invoke when the time out for the operation
108 default: final_failure_timeout
111 description: Points to the operation to invoke when the current operation
112 has exceeded its max retries.
114 default: final_failure_retries
117 description: Points to the operation to invoke when the current operation
120 default: final_failure_exception
123 description: Points to the operation to invoke when the current operation
124 is blocked due to guard policy enforcement.
126 default: final_failure_guard
127 org.onap.datatypes.policy.clamp.acm.httpControlLoopElement.RestRequest:
129 derived_from: tosca.datatypes.Root
132 type: onap.datatypes.ToscaConceptIdentifier
135 description: The name and version of a REST request to be sent to a REST endpoint
145 description: The REST method to use
149 description: The path of the REST request relative to the base URL
153 description: The body of the REST request for PUT and POST requests
158 description: THe expected HTTP status code for the REST request
159 org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity:
161 derived_from: tosca.datatypes.Root
163 configurationEntityId:
164 type: onap.datatypes.ToscaConceptIdentifier
167 description: The name and version of a Configuration Entity to be handled
168 by the HTTP Automation Composition Element
172 type: org.onap.datatypes.policy.clamp.acm.httpControlLoopElement.RestRequest
174 description: A sequence of REST commands to send to the REST endpoint
176 onap.policies.Monitoring:
177 derived_from: tosca.policies.Root
178 description: a base policy type for all policies that govern monitoring provisioning
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
185 name: onap.policies.customPolicyType
186 onap.policies.controlloop.operational.Common:
187 derived_from: tosca.policies.Root
189 name: onap.policies.controlloop.operational.Common
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.
196 description: The unique control loop id.
201 Overall timeout for executing all the operations. This timeout should equal or exceed the total
202 timeout for each operation listed.
206 description: Whether an abatement event message will be expected for the control
212 description: Initial operation to execute upon receiving an Onset event message
213 for the Control Loop.
217 description: List of operations to be performed when Control Loop is triggered.
220 type: onap.datatype.controlloop.Operation
221 onap.policies.controlloop.operational.common.Apex:
222 derived_from: onap.policies.controlloop.operational.Common
225 name: onap.policies.controlloop.operational.common.Apex
226 description: Operational policies for Apex PDP
228 engineServiceParameters:
230 description: The engine parameters like name, instanceCount, policy implementation,
233 eventInputParameters:
235 description: The event input parameters.
237 eventOutputParameters:
239 description: The event output parameters.
243 description: Name/value pairs of properties to be set for APEX if needed.
247 org.onap.policy.clamp.acm.Participant:
249 derived_from: tosca.nodetypes.Root
254 org.onap.policy.clamp.acm.AutomationCompositionElement:
256 derived_from: tosca.nodetypes.Root
263 description: Specifies the organization that provides the automation composition element
265 type: onap.datatypes.ToscaConceptIdentifier
270 type: onap.datatypes.ToscaConceptIdentifier
274 description: The identity of the participant type that hosts this type of Automation Composition Element
279 - greater_or_equal: 0
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:
290 - greater_or_equal: 0
294 description: The maximum time in seconds to wait for a state chage from uninitialized to passive
295 passiveToRunningTimeout:
299 - greater_or_equal: 0
303 description: The maximum time in seconds to wait for a state chage from passive to running
304 runningToPassiveTimeout:
308 - greater_or_equal: 0
312 description: The maximum time in seconds to wait for a state chage from running to passive
313 passiveToUninitializedTimeout:
317 - greater_or_equal: 0
321 description: The maximum time in seconds to wait for a state chage from passive to uninitialized
322 org.onap.policy.clamp.acm.AutomationComposition:
324 derived_from: tosca.nodetypes.Root
331 description: Specifies the organization that provides the automation composition element
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:
342 derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
345 type: onap.datatypes.ToscaConceptIdentifier
348 type: onap.datatypes.ToscaConceptIdentifier
350 org.onap.policy.clamp.acm.CDSAutomationCompositionElement:
352 derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
355 type: onap.datatypes.ToscaConceptIdentifier
357 org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement:
359 derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
377 org.onap.policy.clamp.acm.HttpAutomationCompositionElement:
379 derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
384 description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
390 description: HTTP headers to send on REST requests
391 configurationEntities:
395 type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity
397 description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests
401 pmsh_operational_policy:
402 type: onap.datatypes.ToscaConceptIdentifier
403 description: The ID of the PMSH operational policy to use
405 name: operational.apex.pmcontrol
408 org.onap.policy.clamp.acm.PolicyParticipant:
410 type: org.onap.policy.clamp.acm.Participant
412 description: Participant for DCAE microservices
415 org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement:
417 type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement
419 description: Automation composition element for the operational policy for Performance Management Subscription Handling
423 name: org.onap.PM_Policy
426 name: org.onap.policy.clamp.acm.PolicyParticipant
429 name: onap.policies.operational.pm-subscription-handler
432 get_input: pmsh_operational_policy
435 org.onap.policy.clamp.acm.KubernetesParticipant:
437 type: org.onap.policy.clamp.acm.Participant
439 description: Participant for K8S
442 org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement:
443 # Chart from new repository
445 type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
447 description: Automation composition element for the K8S microservice for PMSH
451 name: K8sParticipant0
454 name: org.onap.policy.clamp.acm.KubernetesParticipant
461 releaseName: onap-dcae-pmsh
463 repoName: chartmuseum
464 address: http://chart-museum:80
465 userName: onapinitializer
466 password: demo123456!
468 global.masterPassword: test
469 org.onap.policy.clamp.acm.HttpParticipant:
471 type: org.onap.policy.clamp.acm.Participant
473 description: Participant for Http requests
476 org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement:
477 # Consul http config for PMSH.
479 type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
481 description: Automation composition element for the http requests of PMSH microservice
485 name: HttpParticipant0
488 name: org.onap.policy.clamp.acm.HttpParticipant
490 uninitializedToPassiveTimeout: 180
492 baseUrl: https://dcae-pmsh:8443
494 Content-Type: application/json
495 configurationEntities:
496 - configurationEntityId:
507 "subscriptionName":"new_sub_01",
508 "operationalPolicyName":"pmsh-operational-policy",
509 "controlLoopName":"controlLoop-name",
514 "modelInvariantIDs":[
515 "7129e420-d396-4efb-af02-6b83499b12f5"
518 "e80a6ae3-cafd-4d24-850d-e14c084a5ca7"
524 "measurementGroups":[
527 "measurementGroupName":"msgroup_01",
528 "administrativeState":"UNLOCKED",
530 "fileLocation":"/pm/pm.xml",
533 "measurementType":"EutranCell.*"
536 "measurementType":"EutranCellRelation.pmCounter1"
539 "measurementType":"EutranCellRelation.pmCounter2"
542 "managedObjectDNsBasic":[
544 "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1"
547 "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter2"
550 "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter3"
558 expectedResponse: 201
561 org.onap.domain.sample.GenericK8s_AutomationCompositionDefinition:
563 type: org.onap.policy.clamp.acm.AutomationComposition
565 description: Automation composition for Hello World
569 - name: org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement
571 - name: org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement
573 - name: org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement
576 - operational.apex.pmcontrol:
577 type: onap.policies.controlloop.operational.common.Apex
581 engineServiceParameters:
586 deploymentPort: 12561
590 parameterClassName: org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters
592 parameterClassName: org.onap.policy.apex.context.parameters.ContextParameters
595 parameterClassName: org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters
597 parameterClassName: org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters
600 adaptedClass: java.time.Instant
601 adaptorClass: org.onap.policy.common.gson.InstantAsMillisTypeAdapter
605 name: PMControlPolicy
609 name: PMControlPolicy_KeyInfo
614 name: CDSActionIdentifiersType
618 name: CDSActionIdentifiersType
620 UUID: 6e5fa19b-14df-37e3-a4ae-8c537e861a82
621 description: Generated description for concept referred to by
622 key "CDSActionIdentifiersType:0.0.1"
624 name: CDSCreateResponseEvent
628 name: CDSCreateResponseEvent
630 UUID: 14b29e38-ac75-3273-aa4e-8583c0aa7dad
631 description: Generated description for concept referred to by
632 key "CDSCreateResponseEvent:0.0.1"
634 name: CDSCreateResponsePayloadType
638 name: CDSCreateResponsePayloadType
640 UUID: 04573f8f-e772-30a5-b1d9-d7318d4a1e13
641 description: Generated description for concept referred to by
642 key "CDSCreateResponsePayloadType:0.0.1"
644 name: CDSCreateResponsePolicy
648 name: CDSCreateResponsePolicy
650 UUID: e126c965-fc09-3bfe-8f55-70f380a4a49c
651 description: Generated description for concept referred to by
652 key "CDSCreateResponsePolicy:0.0.1"
654 name: CDSCreateResponseTask
658 name: CDSCreateResponseTask
660 UUID: 6165ee82-afd2-3aab-a517-f00b3f2461d2
661 description: Generated description for concept referred to by
662 key "CDSCreateResponseTask:0.0.1"
664 name: CDSCreateSubscriptionPayloadType
668 name: CDSCreateSubscriptionPayloadType
670 UUID: 8350ac5e-c157-38b9-9614-a0f93a830e60
671 description: Generated description for concept referred to by
672 key "CDSCreateSubscriptionPayloadType:0.0.1"
674 name: CDSCreateSubscriptionRequestEvent
678 name: CDSCreateSubscriptionRequestEvent
680 UUID: cfa325ba-226b-3a31-9183-ec43e2b6e9a2
681 description: Generated description for concept referred to by
682 key "CDSCreateSubscriptionRequestEvent:0.0.1"
684 name: CDSDeleteResponseEvent
688 name: CDSDeleteResponseEvent
690 UUID: 8be9c0fa-7437-3841-aff2-b3cec6ae3bd8
691 description: Generated description for concept referred to by
692 key "CDSDeleteResponseEvent:0.0.1"
694 name: CDSDeleteResponsePayloadType
698 name: CDSDeleteResponsePayloadType
700 UUID: 3fbfe0c9-152e-34d3-a504-09cd13c058d0
701 description: Generated description for concept referred to by
702 key "CDSDeleteResponsePayloadType:0.0.1"
704 name: CDSDeleteResponsePolicy
708 name: CDSDeleteResponsePolicy
710 UUID: a780251c-edd5-3132-b865-04313246b43c
711 description: Generated description for concept referred to by
712 key "CDSDeleteResponsePolicy:0.0.1"
714 name: CDSDeleteResponseTask
718 name: CDSDeleteResponseTask
720 UUID: afce4555-3aa3-3521-a7d8-ee8cdf0d3efc
721 description: Generated description for concept referred to by
722 key "CDSDeleteResponseTask:0.0.1"
724 name: CDSDeleteSubscriptionPayloadType
728 name: CDSDeleteSubscriptionPayloadType
730 UUID: 12658406-9147-3c9d-a38c-5ad5e30b092b
731 description: Generated description for concept referred to by
732 key "CDSDeleteSubscriptionPayloadType:0.0.1"
734 name: CDSDeleteSubscriptionRequestEvent
738 name: CDSDeleteSubscriptionRequestEvent
740 UUID: 24380c95-9289-36e6-8cbf-0edefa15ccd9
741 description: Generated description for concept referred to by
742 key "CDSDeleteSubscriptionRequestEvent:0.0.1"
744 name: CDSRequestCommonHeaderType
748 name: CDSRequestCommonHeaderType
750 UUID: 35590ac0-062c-39f1-8786-b4ff716e30b1
751 description: Generated description for concept referred to by
752 key "CDSRequestCommonHeaderType:0.0.1"
754 name: CDSResponseCommonHeaderType
758 name: CDSResponseCommonHeaderType
760 UUID: dd7e1805-885a-350b-aaf9-ed541321ae3c
761 description: Generated description for concept referred to by
762 key "CDSResponseCommonHeaderType:0.0.1"
764 name: CDSResponseStatusEvent
768 name: CDSResponseStatusEvent
770 UUID: 7986e21b-32f7-302e-9554-31f21b673493
771 description: Generated description for concept referred to by
772 key "CDSResponseStatusEvent:0.0.1"
774 name: CDSResponseStatusType
778 name: CDSResponseStatusType
780 UUID: 92b8a2cf-344e-3ce1-8cc0-2b7d3cb695fa
781 description: Generated description for concept referred to by
782 key "CDSResponseStatusType:0.0.1"
784 name: CreateSubscriptionPayloadEvent
788 name: CreateSubscriptionPayloadEvent
790 UUID: 92162397-1a8e-3a3f-a469-d2af7700af4a
791 description: Generated description for concept referred to by
792 key "CreateSubscriptionPayloadEvent:0.0.1"
794 name: CreateSubscriptionPayloadTask
798 name: CreateSubscriptionPayloadTask
800 UUID: bc0c69f0-52ed-38ea-b468-ae4a6fd1730d
801 description: Generated description for concept referred to by
802 key "CreateSubscriptionPayloadTask:0.0.1"
804 name: CreateSubscriptionRequestTask
808 name: CreateSubscriptionRequestTask
810 UUID: 89cb75e9-f06c-30d3-b4ff-698d45f63869
811 description: Generated description for concept referred to by
812 key "CreateSubscriptionRequestTask:0.0.1"
814 name: DeleteSubscriptionPayloadEvent
818 name: DeleteSubscriptionPayloadEvent
820 UUID: 994fa441-04ab-33bb-832d-1cd12ab5d074
821 description: Generated description for concept referred to by
822 key "DeleteSubscriptionPayloadEvent:0.0.1"
824 name: DeleteSubscriptionPayloadTask
828 name: DeleteSubscriptionPayloadTask
830 UUID: 0f519117-5fea-3e4b-941f-8f778100465f
831 description: Generated description for concept referred to by
832 key "DeleteSubscriptionPayloadTask:0.0.1"
834 name: DeleteSubscriptionRequestTask
838 name: DeleteSubscriptionRequestTask
840 UUID: acb772fe-d442-39e3-98f9-b1080caf4150
841 description: Generated description for concept referred to by
842 key "DeleteSubscriptionRequestTask:0.0.1"
844 name: MRResponseEvent
848 name: MRResponseEvent
850 UUID: 13c747a3-6bae-3bcf-9c80-b152e01dc194
851 description: Generated description for concept referred to by
852 key "MRResponseEvent:0.0.1"
854 name: PMControlPolicy
858 name: PMControlPolicy
860 UUID: acf1e55c-7bc5-3bd5-975a-0ca54afcd8a4
861 description: Generated description for concept referred to by
862 key "PMControlPolicy:0.0.1"
864 name: PMControlPolicy_Albums
868 name: PMControlPolicy_Albums
870 UUID: b38ad204-c2c8-32f4-9b5a-dda0aeb0145b
871 description: Generated description for concept referred to by
872 key "PMControlPolicy_Albums:0.0.1"
874 name: PMControlPolicy_Events
878 name: PMControlPolicy_Events
880 UUID: be3871a0-c42a-3113-a066-82d192840eca
881 description: Generated description for concept referred to by
882 key "PMControlPolicy_Events:0.0.1"
884 name: PMControlPolicy_KeyInfo
888 name: PMControlPolicy_KeyInfo
890 UUID: ced37634-28a4-3178-b7f6-2980794927b0
891 description: Generated description for concept referred to by
892 key "PMControlPolicy_KeyInfo:0.0.1"
894 name: PMControlPolicy_Policies
898 name: PMControlPolicy_Policies
900 UUID: be3d180d-ef9c-3a75-8e9c-84271a038bed
901 description: Generated description for concept referred to by
902 key "PMControlPolicy_Policies:0.0.1"
904 name: PMControlPolicy_Schemas
908 name: PMControlPolicy_Schemas
910 UUID: e61973f1-189c-39e5-82f6-0d3afe298a20
911 description: Generated description for concept referred to by
912 key "PMControlPolicy_Schemas:0.0.1"
914 name: PMControlPolicy_Tasks
918 name: PMControlPolicy_Tasks
920 UUID: 5658adb3-2962-30a3-a241-fae75bb8eb4a
921 description: Generated description for concept referred to by
922 key "PMControlPolicy_Tasks:0.0.1"
924 name: PMSubscriptionAlbum
928 name: PMSubscriptionAlbum
930 UUID: c2bd6f0d-6854-317a-9be2-97c08338428c
931 description: Generated description for concept referred to by
932 key "PMSubscriptionAlbum:0.0.1"
934 name: PMSubscriptionOutputEvent
938 name: PMSubscriptionOutputEvent
940 UUID: 992b7819-9f69-3aa0-bb0f-6e45ea15ce05
941 description: Generated description for concept referred to by
942 key "PMSubscriptionOutputEvent:0.0.1"
944 name: PMSubscriptionType
948 name: PMSubscriptionType
950 UUID: 73c1c397-4fc3-357f-93b6-a8ad707fbaae
951 description: Generated description for concept referred to by
952 key "PMSubscriptionType:0.0.1"
954 name: ReceiveEventPolicy
958 name: ReceiveEventPolicy
960 UUID: 568b7345-9de1-36d3-b6a3-9b857e6809a1
961 description: Generated description for concept referred to by
962 key "ReceiveEventPolicy:0.0.1"
964 name: ReceiveSubscriptionTask
968 name: ReceiveSubscriptionTask
970 UUID: f596afc8-100c-35eb-92c8-352355ea457d
971 description: Generated description for concept referred to by
972 key "ReceiveSubscriptionTask: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"
984 name: SimpleStringType
988 name: SimpleStringType
990 UUID: 8a4957cf-9493-3a76-8c22-a208e23259af
991 description: Generated description for concept referred to by
992 key "SimpleStringType:0.0.1"
994 name: SubscriptionStatusType
998 name: SubscriptionStatusType
1000 UUID: 597643b1-9db1-31ce-85d0-e1c63c43b30b
1001 description: Generated description for concept referred to by
1002 key "SubscriptionStatusType:0.0.1"
1004 name: SubscriptionType
1008 name: SubscriptionType
1010 UUID: 184547bb-7d64-3cb2-a273-d7185102c5ce
1011 description: Generated description for concept referred to by
1012 key "SubscriptionType: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"
1024 name: pmsh-operational-policy
1028 name: pmsh-operational-policy
1030 UUID: fdf2c9ff-6422-3ea6-b6b6-49b12116265d
1031 description: Generated description for concept referred to by
1032 key "pmsh-operational-policy:0.0.1"
1035 name: PMControlPolicy_Policies
1040 name: CDSCreateResponsePolicy
1044 name: CDSCreateResponsePolicy
1049 - key: CDSCreateResponseState
1052 parentKeyName: CDSCreateResponsePolicy
1053 parentKeyVersion: 0.0.1
1054 parentLocalName: 'NULL'
1055 localName: CDSCreateResponseState
1057 name: CDSCreateResponseEvent
1061 - key: ResponseOutput
1064 parentKeyName: CDSCreateResponsePolicy
1065 parentKeyVersion: 0.0.1
1066 parentLocalName: CDSCreateResponseState
1067 localName: ResponseOutput
1069 name: CDSResponseStatusEvent
1071 outgoingEventReference:
1072 - name: CDSResponseStatusEvent
1075 parentKeyName: 'NULL'
1076 parentKeyVersion: 0.0.0
1077 parentLocalName: 'NULL'
1079 contextAlbumReference: [ ]
1082 logicFlavour: UNDEFINED
1084 stateFinalizerLogicMap:
1087 name: CDSCreateResponseTask
1092 name: CDSCreateResponseTask
1096 parentKeyName: CDSCreateResponsePolicy
1097 parentKeyVersion: 0.0.1
1098 parentLocalName: CDSCreateResponseState
1099 localName: CDSCreateResponsePolicy
1102 parentKeyName: CDSCreateResponsePolicy
1103 parentKeyVersion: 0.0.1
1104 parentLocalName: CDSCreateResponseState
1105 localName: ResponseOutput
1106 firstState: CDSCreateResponseState
1108 name: CDSDeleteResponsePolicy
1112 name: CDSDeleteResponsePolicy
1117 - key: CDSDeleteResponseState
1120 parentKeyName: CDSDeleteResponsePolicy
1121 parentKeyVersion: 0.0.1
1122 parentLocalName: 'NULL'
1123 localName: CDSDeleteResponseState
1125 name: CDSDeleteResponseEvent
1129 - key: ResponseOutput
1132 parentKeyName: CDSDeleteResponsePolicy
1133 parentKeyVersion: 0.0.1
1134 parentLocalName: CDSDeleteResponseState
1135 localName: ResponseOutput
1137 name: CDSResponseStatusEvent
1139 outgoingEventReference:
1140 - name: CDSResponseStatusEvent
1143 parentKeyName: 'NULL'
1144 parentKeyVersion: 0.0.0
1145 parentLocalName: 'NULL'
1147 contextAlbumReference: [ ]
1150 logicFlavour: UNDEFINED
1152 stateFinalizerLogicMap:
1155 name: CDSDeleteResponseTask
1160 name: CDSDeleteResponseTask
1164 parentKeyName: CDSDeleteResponsePolicy
1165 parentKeyVersion: 0.0.1
1166 parentLocalName: CDSDeleteResponseState
1167 localName: CDSDeleteResponsePolicy
1170 parentKeyName: CDSDeleteResponsePolicy
1171 parentKeyVersion: 0.0.1
1172 parentLocalName: CDSDeleteResponseState
1173 localName: ResponseOutput
1174 firstState: CDSDeleteResponseState
1176 name: ReceiveEventPolicy
1180 name: ReceiveEventPolicy
1185 - key: CreateOrDeleteState
1188 parentKeyName: ReceiveEventPolicy
1189 parentKeyVersion: 0.0.1
1190 parentLocalName: 'NULL'
1191 localName: CreateOrDeleteState
1193 name: PMSubscriptionOutputEvent
1197 - key: CreateSubscriptionPayload
1200 parentKeyName: ReceiveEventPolicy
1201 parentKeyVersion: 0.0.1
1202 parentLocalName: CreateOrDeleteState
1203 localName: CreateSubscriptionPayload
1205 name: CreateSubscriptionPayloadEvent
1207 outgoingEventReference:
1208 - name: CreateSubscriptionPayloadEvent
1211 parentKeyName: ReceiveEventPolicy
1212 parentKeyVersion: 0.0.1
1213 parentLocalName: 'NULL'
1214 localName: CreateSubscription
1215 - key: DeleteSubscriptionPayload
1218 parentKeyName: ReceiveEventPolicy
1219 parentKeyVersion: 0.0.1
1220 parentLocalName: CreateOrDeleteState
1221 localName: DeleteSubscriptionPayload
1223 name: DeleteSubscriptionPayloadEvent
1225 outgoingEventReference:
1226 - name: DeleteSubscriptionPayloadEvent
1229 parentKeyName: ReceiveEventPolicy
1230 parentKeyVersion: 0.0.1
1231 parentLocalName: 'NULL'
1232 localName: DeleteSubscription
1233 contextAlbumReference:
1234 - name: PMSubscriptionAlbum
1237 key: TaskSelectionLogic
1238 logicFlavour: JAVASCRIPT
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
1248 * http://www.apache.org/licenses/LICENSE-2.0
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.
1256 * SPDX-License-Identifier: Apache-2.0
1257 * ============LICENSE_END=========================================================
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);
1267 else if ("DELETE".equals(changeType)) {
1268 executor.logger.info("Choosing to delete a subscription")
1269 executor.subject.getTaskKey("DeleteSubscriptionPayloadTask").copyTo(executor.selectedTask);
1271 returnValue = executor.isTrue;
1273 stateFinalizerLogicMap:
1276 name: CreateSubscriptionPayloadTask
1281 name: CreateSubscriptionPayloadTask
1285 parentKeyName: ReceiveEventPolicy
1286 parentKeyVersion: 0.0.1
1287 parentLocalName: CreateOrDeleteState
1288 localName: ReceiveEventPolicy
1291 parentKeyName: ReceiveEventPolicy
1292 parentKeyVersion: 0.0.1
1293 parentLocalName: CreateOrDeleteState
1294 localName: CreateSubscriptionPayload
1296 name: DeleteSubscriptionPayloadTask
1300 parentKeyName: ReceiveEventPolicy
1301 parentKeyVersion: 0.0.1
1302 parentLocalName: CreateOrDeleteState
1303 localName: ReceiveEventPolicy
1306 parentKeyName: ReceiveEventPolicy
1307 parentKeyVersion: 0.0.1
1308 parentLocalName: CreateOrDeleteState
1309 localName: DeleteSubscriptionPayload
1310 - key: CreateSubscription
1313 parentKeyName: ReceiveEventPolicy
1314 parentKeyVersion: 0.0.1
1315 parentLocalName: 'NULL'
1316 localName: CreateSubscription
1318 name: CreateSubscriptionPayloadEvent
1322 - key: IssueCreateSubscriptionRequestOutput
1325 parentKeyName: ReceiveEventPolicy
1326 parentKeyVersion: 0.0.1
1327 parentLocalName: CreateSubscription
1328 localName: IssueCreateSubscriptionRequestOutput
1330 name: CDSCreateSubscriptionRequestEvent
1332 outgoingEventReference:
1333 - name: CDSCreateSubscriptionRequestEvent
1336 parentKeyName: 'NULL'
1337 parentKeyVersion: 0.0.0
1338 parentLocalName: 'NULL'
1340 contextAlbumReference:
1341 - name: PMSubscriptionAlbum
1345 logicFlavour: UNDEFINED
1347 stateFinalizerLogicMap:
1350 name: CreateSubscriptionRequestTask
1355 name: CreateSubscriptionRequestTask
1359 parentKeyName: ReceiveEventPolicy
1360 parentKeyVersion: 0.0.1
1361 parentLocalName: CreateSubscription
1362 localName: ReceiveEventPolicy
1365 parentKeyName: ReceiveEventPolicy
1366 parentKeyVersion: 0.0.1
1367 parentLocalName: CreateSubscription
1368 localName: IssueCreateSubscriptionRequestOutput
1369 - key: DeleteSubscription
1372 parentKeyName: ReceiveEventPolicy
1373 parentKeyVersion: 0.0.1
1374 parentLocalName: 'NULL'
1375 localName: DeleteSubscription
1377 name: DeleteSubscriptionPayloadEvent
1381 - key: IssueDeleteSubscriptionRequestOutput
1384 parentKeyName: ReceiveEventPolicy
1385 parentKeyVersion: 0.0.1
1386 parentLocalName: DeleteSubscription
1387 localName: IssueDeleteSubscriptionRequestOutput
1389 name: CDSDeleteSubscriptionRequestEvent
1391 outgoingEventReference:
1392 - name: CDSDeleteSubscriptionRequestEvent
1395 parentKeyName: 'NULL'
1396 parentKeyVersion: 0.0.0
1397 parentLocalName: 'NULL'
1399 contextAlbumReference:
1400 - name: PMSubscriptionAlbum
1404 logicFlavour: UNDEFINED
1406 stateFinalizerLogicMap:
1409 name: DeleteSubscriptionRequestTask
1414 name: DeleteSubscriptionRequestTask
1418 parentKeyName: ReceiveEventPolicy
1419 parentKeyVersion: 0.0.1
1420 parentLocalName: DeleteSubscription
1421 localName: ReceiveEventPolicy
1424 parentKeyName: ReceiveEventPolicy
1425 parentKeyVersion: 0.0.1
1426 parentLocalName: DeleteSubscription
1427 localName: IssueDeleteSubscriptionRequestOutput
1428 - key: ReceiveSubscriptionState
1431 parentKeyName: ReceiveEventPolicy
1432 parentKeyVersion: 0.0.1
1433 parentLocalName: 'NULL'
1434 localName: ReceiveSubscriptionState
1436 name: pmsh-operational-policy
1440 - key: ReceivePMSubscriptionOutput
1443 parentKeyName: ReceiveEventPolicy
1444 parentKeyVersion: 0.0.1
1445 parentLocalName: ReceiveSubscriptionState
1446 localName: ReceivePMSubscriptionOutput
1448 name: PMSubscriptionOutputEvent
1450 outgoingEventReference:
1451 - name: PMSubscriptionOutputEvent
1454 parentKeyName: ReceiveEventPolicy
1455 parentKeyVersion: 0.0.1
1456 parentLocalName: 'NULL'
1457 localName: CreateOrDeleteState
1458 contextAlbumReference:
1459 - name: PMSubscriptionAlbum
1463 logicFlavour: UNDEFINED
1465 stateFinalizerLogicMap:
1468 name: ReceiveSubscriptionTask
1473 name: ReceiveSubscriptionTask
1477 parentKeyName: ReceiveEventPolicy
1478 parentKeyVersion: 0.0.1
1479 parentLocalName: ReceiveSubscriptionState
1480 localName: ReceiveEventPolicy
1483 parentKeyName: ReceiveEventPolicy
1484 parentKeyVersion: 0.0.1
1485 parentLocalName: ReceiveSubscriptionState
1486 localName: ReceivePMSubscriptionOutput
1487 firstState: ReceiveSubscriptionState
1490 name: PMControlPolicy_Tasks
1495 name: CDSCreateResponseTask
1499 name: CDSCreateResponseTask
1503 name: CDSCreateResponseEvent
1505 nameSpace: org.onap.policy.apex.onap.pmcontrol
1510 - key: actionIdentifiers
1512 key: actionIdentifiers
1514 name: CDSActionIdentifiersType
1521 name: CDSResponseCommonHeaderType
1528 name: CDSCreateResponsePayloadType
1535 name: CDSResponseStatusType
1540 - key: CDSResponseStatusEvent
1543 name: CDSResponseStatusEvent
1545 nameSpace: org.onap.policy.apex.onap.pmcontrol
1554 name: SubscriptionStatusType
1559 contextAlbumReference:
1560 - name: PMSubscriptionAlbum
1564 logicFlavour: JAVASCRIPT
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
1574 * http://www.apache.org/licenses/LICENSE-2.0
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.
1582 * SPDX-License-Identifier: Apache-2.0
1583 * ============LICENSE_END=========================================================
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"))
1598 else if ("DELETE".equals(changeType)) {
1599 responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName"))
1600 responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName"))
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")
1607 responseStatus.put("message", "failed")
1609 executor.outFields.put("status", responseStatus)
1610 returnValue = executor.isTrue;
1613 name: CDSDeleteResponseTask
1617 name: CDSDeleteResponseTask
1621 name: CDSDeleteResponseEvent
1623 nameSpace: org.onap.policy.apex.onap.pmcontrol
1628 - key: actionIdentifiers
1630 key: actionIdentifiers
1632 name: CDSActionIdentifiersType
1639 name: CDSResponseCommonHeaderType
1646 name: CDSDeleteResponsePayloadType
1653 name: CDSResponseStatusType
1658 - key: CDSResponseStatusEvent
1661 name: CDSResponseStatusEvent
1663 nameSpace: org.onap.policy.apex.onap.pmcontrol
1672 name: SubscriptionStatusType
1677 contextAlbumReference:
1678 - name: PMSubscriptionAlbum
1682 logicFlavour: JAVASCRIPT
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
1692 * http://www.apache.org/licenses/LICENSE-2.0
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.
1700 * SPDX-License-Identifier: Apache-2.0
1701 * ============LICENSE_END=========================================================
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"))
1716 else if ("DELETE".equals(changeType)) {
1717 responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName"))
1718 responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName"))
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")
1725 responseStatus.put("message", "failed")
1727 executor.outFields.put("status", responseStatus)
1728 returnValue = executor.isTrue;
1731 name: CreateSubscriptionPayloadTask
1735 name: CreateSubscriptionPayloadTask
1739 name: PMSubscriptionOutputEvent
1741 nameSpace: org.onap.policy.apex.onap.pmcontrol
1755 - key: CreateSubscriptionPayloadEvent
1758 name: CreateSubscriptionPayloadEvent
1760 nameSpace: org.onap.policy.apex.onap.pmcontrol
1776 name: CDSCreateSubscriptionPayloadType
1781 contextAlbumReference:
1782 - name: PMSubscriptionAlbum
1786 logicFlavour: JAVASCRIPT
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
1796 * http://www.apache.org/licenses/LICENSE-2.0
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.
1804 * SPDX-License-Identifier: Apache-2.0
1805 * ============LICENSE_END=========================================================
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"))
1819 else if ("delete".equals(changeType)) {
1820 payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName"))
1821 payloadProperties.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName"))
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;
1832 name: CreateSubscriptionRequestTask
1836 name: CreateSubscriptionRequestTask
1840 name: CreateSubscriptionPayloadEvent
1842 nameSpace: org.onap.policy.apex.onap.pmcontrol
1858 name: CDSCreateSubscriptionPayloadType
1863 - key: CDSCreateSubscriptionRequestEvent
1866 name: CDSCreateSubscriptionRequestEvent
1868 nameSpace: org.onap.policy.apex.onap.pmcontrol
1873 - key: actionIdentifiers
1875 key: actionIdentifiers
1877 name: CDSActionIdentifiersType
1884 name: CDSRequestCommonHeaderType
1891 name: CDSCreateSubscriptionPayloadType
1896 contextAlbumReference:
1897 - name: PMSubscriptionAlbum
1901 logicFlavour: JAVASCRIPT
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
1911 * http://www.apache.org/licenses/LICENSE-2.0
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.
1919 * SPDX-License-Identifier: Apache-2.0
1920 * ============LICENSE_END=========================================================
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;
1945 name: DeleteSubscriptionPayloadTask
1949 name: DeleteSubscriptionPayloadTask
1953 name: PMSubscriptionOutputEvent
1955 nameSpace: org.onap.policy.apex.onap.pmcontrol
1969 - key: DeleteSubscriptionPayloadEvent
1972 name: DeleteSubscriptionPayloadEvent
1974 nameSpace: org.onap.policy.apex.onap.pmcontrol
1990 name: CDSDeleteSubscriptionPayloadType
1995 contextAlbumReference:
1996 - name: PMSubscriptionAlbum
2000 logicFlavour: JAVASCRIPT
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
2010 * http://www.apache.org/licenses/LICENSE-2.0
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.
2018 * SPDX-License-Identifier: Apache-2.0
2019 * ============LICENSE_END=========================================================
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"))
2033 else if ("delete".equals(changeType)) {
2034 payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName"))
2035 payloadProperties.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName"))
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;
2046 name: DeleteSubscriptionRequestTask
2050 name: DeleteSubscriptionRequestTask
2054 name: DeleteSubscriptionPayloadEvent
2056 nameSpace: org.onap.policy.apex.onap.pmcontrol
2072 name: CDSDeleteSubscriptionPayloadType
2077 - key: CDSDeleteSubscriptionRequestEvent
2080 name: CDSDeleteSubscriptionRequestEvent
2082 nameSpace: org.onap.policy.apex.onap.pmcontrol
2087 - key: actionIdentifiers
2089 key: actionIdentifiers
2091 name: CDSActionIdentifiersType
2098 name: CDSRequestCommonHeaderType
2105 name: CDSDeleteSubscriptionPayloadType
2110 contextAlbumReference:
2111 - name: PMSubscriptionAlbum
2115 logicFlavour: JAVASCRIPT
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
2125 * http://www.apache.org/licenses/LICENSE-2.0
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.
2133 * SPDX-License-Identifier: Apache-2.0
2134 * ============LICENSE_END=========================================================
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;
2159 name: ReceiveSubscriptionTask
2163 name: ReceiveSubscriptionTask
2167 name: pmsh-operational-policy
2169 nameSpace: org.onap.policy.apex.onap.pmcontrol
2174 - key: blueprintName
2178 name: SimpleStringType
2181 - key: blueprintVersion
2183 key: blueprintVersion
2185 name: SimpleStringType
2192 name: SimpleStringType
2195 - key: controlLoopName
2197 key: controlLoopName
2199 name: SimpleStringType
2206 name: SimpleStringType
2209 - key: measurementGroupName
2211 key: measurementGroupName
2213 name: SimpleStringType
2220 name: SimpleStringType
2223 - key: operationalPolicyName
2225 key: operationalPolicyName
2227 name: SimpleStringType
2234 name: SubscriptionType
2237 - key: subscriptionName
2239 key: subscriptionName
2241 name: SimpleStringType
2246 - key: PMSubscriptionOutputEvent
2249 name: PMSubscriptionOutputEvent
2251 nameSpace: org.onap.policy.apex.onap.pmcontrol
2265 contextAlbumReference:
2266 - name: PMSubscriptionAlbum
2270 logicFlavour: JAVASCRIPT
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
2280 * http://www.apache.org/licenses/LICENSE-2.0
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.
2288 * SPDX-License-Identifier: Apache-2.0
2289 * ============LICENSE_END=========================================================
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"))
2319 executor.getContextAlbum("PMSubscriptionAlbum").put(albumID.toString(), pmSubscriptionInfo);
2320 executor.outFields.put("albumID", albumID)
2322 executor.message = "Received invalid event"
2323 returnValue = false;
2328 name: PMControlPolicy_Events
2333 name: CDSCreateResponseEvent
2337 name: CDSCreateResponseEvent
2339 nameSpace: org.onap.policy.apex.onap.pmcontrol
2344 - key: actionIdentifiers
2346 key: actionIdentifiers
2348 name: CDSActionIdentifiersType
2355 name: CDSResponseCommonHeaderType
2362 name: CDSCreateResponsePayloadType
2369 name: CDSResponseStatusType
2373 name: CDSCreateSubscriptionRequestEvent
2377 name: CDSCreateSubscriptionRequestEvent
2379 nameSpace: org.onap.policy.apex.onap.pmcontrol
2384 - key: actionIdentifiers
2386 key: actionIdentifiers
2388 name: CDSActionIdentifiersType
2395 name: CDSRequestCommonHeaderType
2402 name: CDSCreateSubscriptionPayloadType
2406 name: CDSDeleteResponseEvent
2410 name: CDSDeleteResponseEvent
2412 nameSpace: org.onap.policy.apex.onap.pmcontrol
2417 - key: actionIdentifiers
2419 key: actionIdentifiers
2421 name: CDSActionIdentifiersType
2428 name: CDSResponseCommonHeaderType
2435 name: CDSDeleteResponsePayloadType
2442 name: CDSResponseStatusType
2446 name: CDSDeleteSubscriptionRequestEvent
2450 name: CDSDeleteSubscriptionRequestEvent
2452 nameSpace: org.onap.policy.apex.onap.pmcontrol
2457 - key: actionIdentifiers
2459 key: actionIdentifiers
2461 name: CDSActionIdentifiersType
2468 name: CDSRequestCommonHeaderType
2475 name: CDSDeleteSubscriptionPayloadType
2479 name: CDSResponseStatusEvent
2483 name: CDSResponseStatusEvent
2485 nameSpace: org.onap.policy.apex.onap.pmcontrol
2494 name: SubscriptionStatusType
2498 name: CreateSubscriptionPayloadEvent
2502 name: CreateSubscriptionPayloadEvent
2504 nameSpace: org.onap.policy.apex.onap.pmcontrol
2520 name: CDSCreateSubscriptionPayloadType
2524 name: DeleteSubscriptionPayloadEvent
2528 name: DeleteSubscriptionPayloadEvent
2530 nameSpace: org.onap.policy.apex.onap.pmcontrol
2546 name: CDSDeleteSubscriptionPayloadType
2550 name: MRResponseEvent
2554 name: MRResponseEvent
2556 nameSpace: org.onap.policy.apex.onap.pmcontrol
2576 name: PMSubscriptionOutputEvent
2580 name: PMSubscriptionOutputEvent
2582 nameSpace: org.onap.policy.apex.onap.pmcontrol
2595 name: pmsh-operational-policy
2599 name: pmsh-operational-policy
2601 nameSpace: org.onap.policy.apex.onap.pmcontrol
2606 - key: blueprintName
2610 name: SimpleStringType
2613 - key: blueprintVersion
2615 key: blueprintVersion
2617 name: SimpleStringType
2624 name: SimpleStringType
2627 - key: controlLoopName
2629 key: controlLoopName
2631 name: SimpleStringType
2638 name: SimpleStringType
2641 - key: measurementGroupName
2643 key: measurementGroupName
2645 name: SimpleStringType
2652 name: SimpleStringType
2655 - key: operationalPolicyName
2657 key: operationalPolicyName
2659 name: SimpleStringType
2666 name: SubscriptionType
2669 - key: subscriptionName
2671 key: subscriptionName
2673 name: SimpleStringType
2678 name: PMControlPolicy_Albums
2683 name: PMSubscriptionAlbum
2687 name: PMSubscriptionAlbum
2692 name: PMSubscriptionType
2696 name: PMControlPolicy_Schemas
2701 name: CDSActionIdentifiersType
2705 name: CDSActionIdentifiersType
2708 schemaDefinition: |-
2711 "name": "ActionIdentifiers_Type",
2712 "namespace": "org.onap.policy.apex.onap.helloworld",
2715 "name": "actionName",
2719 "name": "blueprintName",
2723 "name": "blueprintVersion",
2733 name: CDSCreateResponsePayloadType
2737 name: CDSCreateResponsePayloadType
2740 schemaDefinition: |-
2742 "name": "CreateResponsePayloadEntry",
2744 "namespace": "com.acme.avro",
2747 "name": "create_DasH_subscription_DasH_response",
2749 "name": "create_DasH_subscription_DasH_response",
2753 "name": "odl_DasH_response",
2755 "name": "odl_DasH_response",
2771 name: CDSCreateSubscriptionPayloadType
2775 name: CDSCreateSubscriptionPayloadType
2778 schemaDefinition: |-
2783 "name":"CDSRequestPayloadEntry",
2786 "name":"create_DasH_subscription_DasH_properties",
2788 "name":"create_DasH_subscription_DasH_properties_record",
2800 "name":"subscriptionName",
2804 "name":"fileBasedGP",
2808 "name":"fileLocation",
2812 "name":"measurementGroup",
2814 "name":"Measurement_Group_Type",
2818 "name":"measurementGroupName",
2822 "name":"measurementTypes",
2826 "name":"Measurement_Types_Type",
2830 "name":"measurementType",
2838 "name":"managedObjectDNsBasic",
2842 "name":"Managed_Object_Dns_Basic_Type",
2863 name: CDSDeleteResponsePayloadType
2867 name: CDSDeleteResponsePayloadType
2870 schemaDefinition: |-
2872 "name": "DeleteResponsePayloadEntry",
2874 "namespace": "com.acme.avro",
2877 "name": "delete_DasH_subscription_DasH_response",
2879 "name": "delete_DasH_subscription_DasH_response",
2883 "name": "odl_DasH_response",
2885 "name": "odl_DasH_response",
2901 name: CDSDeleteSubscriptionPayloadType
2905 name: CDSDeleteSubscriptionPayloadType
2908 schemaDefinition: |-
2913 "name":"CDSRequestPayloadEntry",
2916 "name":"delete_DasH_subscription_DasH_properties",
2918 "name":"delete_DasH_subscription_DasH_properties_record",
2930 "name":"subscriptionName",
2934 "name":"measurementGroupName",
2944 name: CDSRequestCommonHeaderType
2948 name: CDSRequestCommonHeaderType
2951 schemaDefinition: |-
2954 "name": "RequestCommonHeader_Type",
2955 "namespace": "org.onap.policy.apex.onap.helloworld",
2958 "name": "originatorId",
2962 "name": "requestId",
2966 "name": "subRequestId",
2972 name: CDSResponseCommonHeaderType
2976 name: CDSResponseCommonHeaderType
2979 schemaDefinition: |-
2982 "name": "ResponseCommonHeader_Type",
2983 "namespace": "org.onap.policy.apex.onap.helloworld",
2986 "name": "originatorId",
2990 "name": "requestId",
2994 "name": "subRequestId",
2998 "name": "timestamp",
3003 "type": ["null", "string"]
3008 name: CDSResponseStatusType
3012 name: CDSResponseStatusType
3015 schemaDefinition: |-
3018 "name": "ResponseStatus_Type",
3019 "namespace": "org.onap.policy.apex.onap.helloworld",
3026 "name": "eventType",
3030 "name": "timestamp",
3040 name: PMSubscriptionType
3044 name: PMSubscriptionType
3047 schemaDefinition: |-
3049 "name": "PMSubscription",
3051 "namespace": "org.onap.policy.apex.onap.pmcontrol",
3058 "name": "ipAddress",
3062 "name": "changeType",
3066 "name": "controlLoopName",
3070 "name": "operationalPolicyName",
3074 "name": "blueprintName",
3078 "name": "blueprintVersion",
3082 "name": "subscriptionName",
3086 "name": "measurementGroupName",
3090 "name": "subscription",
3092 "name": "subscription",
3096 "name": "subscriptionName",
3100 "name": "fileBasedGP",
3104 "name": "fileLocation",
3108 "name": "measurementGroup",
3110 "name": "Measurement_Group_Type",
3114 "name": "measurementGroupName",
3118 "name": "measurementTypes",
3122 "name": "Measurement_Types_Type",
3126 "name": "measurementType",
3134 "name": "managedObjectDNsBasic",
3138 "name": "Managed_Object_Dns_Basic_Type",
3165 schemaDefinition: java.lang.Integer
3167 name: SimpleStringType
3171 name: SimpleStringType
3174 schemaDefinition: java.lang.String
3176 name: SubscriptionStatusType
3180 name: SubscriptionStatusType
3183 schemaDefinition: |-
3186 "name": "ActivateSubscriptionStatus_Type",
3187 "namespace": "org.onap.policy.apex.onap.helloworld",
3190 "name": "subscriptionName",
3194 "name": "measurementGroupName",
3202 "name": "changeType",
3212 name: SubscriptionType
3216 name: SubscriptionType
3219 schemaDefinition: |-
3221 "name": "subscription",
3226 "name": "subscriptionName",
3230 "name": "fileBasedGP",
3234 "name": "fileLocation",
3238 "name": "measurementGroup",
3240 "name": "Measurement_Group_Type",
3244 "name": "measurementGroupName",
3248 "name": "measurementTypes",
3252 "name": "Measurement_Types_Type",
3256 "name": "measurementType",
3264 "name": "managedObjectDNsBasic",
3268 "name": "Managed_Object_Dns_Basic_Type",
3292 schemaDefinition: java.util.UUID
3293 eventInputParameters:
3295 carrierTechnologyParameters:
3296 carrierTechnology: RESTCLIENT
3297 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
3299 consumerPollTime: '50'
3300 url: https://message-router:3905/events/unauthenticated.DCAE_CL_OUTPUT/cg1/sg1
3301 eventProtocolParameters:
3304 nameAlias: operationalPolicyName
3305 eventName: pmsh-operational-policy
3306 eventNameFilter: pmsh-operational-policy
3308 carrierTechnologyParameters:
3309 carrierTechnology: RESTREQUESTOR
3310 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters
3312 url: http://cds-blueprints-processor-http:8080/api/v1/execution-service/process
3314 restRequestTimeout: 2000
3317 - Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
3318 eventProtocolParameters:
3320 eventName: CDSCreateResponseEvent
3321 eventNameFilter: CDSCreateResponseEvent
3323 requestorPeer: CDSRequestProducer
3324 requestorTimeout: 500
3325 CDSDeleteRequestConsumer:
3326 carrierTechnologyParameters:
3327 carrierTechnology: RESTREQUESTOR
3328 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters
3330 url: http://cds-blueprints-processor-http:8080/api/v1/execution-service/process
3332 restRequestTimeout: 2000
3335 - Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
3336 eventProtocolParameters:
3338 eventName: CDSDeleteResponseEvent
3339 eventNameFilter: CDSDeleteResponseEvent
3341 requestorPeer: CDSDeleteRequestProducer
3342 requestorTimeout: 500
3343 eventOutputParameters:
3345 carrierTechnologyParameters:
3346 carrierTechnology: FILE
3349 eventProtocolParameters:
3352 carrierTechnologyParameters:
3353 carrierTechnology: FILE
3356 eventProtocolParameters:
3359 carrierTechnologyParameters:
3360 carrierTechnology: RESTREQUESTOR
3361 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters
3362 eventProtocolParameters:
3364 eventNameFilter: CDSCreateSubscriptionRequestEvent
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:
3374 eventNameFilter: CDSDeleteSubscriptionRequestEvent
3376 requestorPeer: CDSDeleteRequestConsumer
3377 requestorTimeout: 500
3379 carrierTechnologyParameters:
3380 carrierTechnology: RESTCLIENT
3381 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
3383 url: https://message-router:3905/events/unauthenticated.PMSH_CL_INPUT
3385 restRequestTimeout: 2000
3386 eventProtocolParameters:
3388 eventNameFilter: CDSResponseStatusEvent