1 # Copyright (C) 2021 Nordix Foundation. All rights reserved.
2 # ========================================================================
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 # ============LICENSE_END=================================================
16 tosca_definitions_version: tosca_simple_yaml_1_1_0
18 onap.datatypes.ToscaConceptIdentifier:
19 derived_from: tosca.datatypes.Root
27 onap.datatype.controlloop.Target:
28 derived_from: tosca.datatypes.Root
29 description: Definition for a entity in A&AI to perform a control loop operation on
33 description: Category for the target type
44 Map of values that identify the resource. If none are provided, it is assumed that the
45 entity that generated the ONSET event will be the target.
48 clamp_possible_values: ClampExecution:CSAR_RESOURCES
51 onap.datatype.controlloop.Actor:
52 derived_from: tosca.datatypes.Root
53 description: An actor/operation/target definition
57 description: The actor performing the operation.
60 clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor
63 description: The operation the actor is performing.
65 clamp_possible_values: Dictionary:DefaultOperations,ClampExecution:CDS/operation
68 type: onap.datatype.controlloop.Target
69 description: The resource the operation should be performed on.
73 description: Name/value pairs of payload information passed by Policy to the actor
76 clamp_possible_values: ClampExecution:CDS/payload
79 onap.datatype.controlloop.Operation:
80 derived_from: tosca.datatypes.Root
81 description: An operation supported by an actor
85 description: Unique identifier for the operation
89 description: A user-friendly description of the intent for the operation
92 type: onap.datatype.controlloop.Actor
93 description: The definition of the operation to be performed.
97 description: The amount of time for the actor to perform the operation.
101 description: The number of retries the actor should attempt to perform the operation.
106 description: Points to the operation to invoke on success. A value of "final_success" indicates and end to the operation.
108 default: final_success
111 description: Points to the operation to invoke on Actor operation failure.
113 default: final_failure
116 description: Points to the operation to invoke when the time out for the operation occurs.
118 default: final_failure_timeout
121 description: Points to the operation to invoke when the current operation has exceeded its max retries.
123 default: final_failure_retries
126 description: Points to the operation to invoke when the current operation causes an exception.
128 default: final_failure_exception
131 description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.
133 default: final_failure_guard
135 onap.policies.controlloop.operational.Common:
136 derived_from: tosca.policies.Root
138 name: onap.policies.controlloop.operational.Common
140 Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant
141 Policy Types. This does NOT support the legacy Policy YAML policy type.
145 description: The unique control loop id.
150 Overall timeout for executing all the operations. This timeout should equal or exceed the total
151 timeout for each operation listed.
155 description: Whether an abatement event message will be expected for the control loop from DCAE.
160 description: Initial operation to execute upon receiving an Onset event message for the Control Loop.
164 description: List of operations to be performed when Control Loop is triggered.
167 type: onap.datatype.controlloop.Operation
168 onap.policies.controlloop.operational.common.Apex:
169 derived_from: onap.policies.controlloop.operational.Common
172 name: onap.policies.controlloop.operational.common.Apex
173 description: Operational policies for Apex PDP
175 engineServiceParameters:
177 description: The engine parameters like name, instanceCount, policy implementation, parameters etc.
179 eventInputParameters:
181 description: The event input parameters.
183 eventOutputParameters:
185 description: The event output parameters.
189 description: Name/value pairs of properties to be set for APEX if needed.
192 org.onap.policy.clamp.controlloop.Participant:
194 derived_from: tosca.nodetypes.Root
199 org.onap.policy.clamp.controlloop.ControlLoopElement:
201 derived_from: tosca.nodetypes.Root
207 type: onap.datatypes.ToscaConceptIdentifier
209 org.onap.policy.clamp.controlloop.ControlLoop:
211 derived_from: tosca.nodetypes.Root
220 type: onap.datatypes.ToscaConceptIdentifier
221 org.onap.policy.clamp.controlloop.PolicyControlLoopElement:
223 derived_from: org.onap.policy.clamp.controlloop.ControlLoopElement
226 type: onap.datatypes.ToscaConceptIdentifier
229 type: onap.datatypes.ToscaConceptIdentifier
233 org.onap.domain.linkmonitor.LinkMonitorPolicyControlLoopElement:
235 type: org.onap.policy.clamp.controlloop.PolicyControlLoopElement
237 description: Control loop element for the Link Monitor
240 participantType: org.onap.policy.controlloop.PolicyControlLoopParticipant:2.3.1
242 policyType: onap.policies.controlloop.operational.common.Apex:1.0.0
243 policyId: operational.apex.linkmonitor:1.0.0
244 org.onap.domain.linkmonitor.LinkMonitorControlLoopDefinition:
246 type: org.onap.policy.clamp.controlloop.ControlLoop
248 description: Control loop for Link Monitor
252 - name: org.onap.domain.linkmonitor.LinkMonitorPolicyControlLoopElement
254 org.onap.policy.controlloop.PolicyControlLoopParticipant:
256 type: org.onap.policy.clamp.controlloop.Participant
258 description: Participant for policy framework
262 - operational.apex.linkmonitor:
263 type: onap.policies.controlloop.operational.common.Apex
267 policy-id: operational.apex.linkmonitor
268 policy-version: 1.0.0
270 engineServiceParameters:
271 name: LinkMonitorApexEngine
275 deploymentPort: 12345
279 parameterClassName: org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters
281 parameterClassName: org.onap.policy.apex.context.parameters.ContextParameters
284 parameterClassName: org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters
288 {"ERICSSON-O-RU-11220": "HCL-O-DU-1122",
289 "ERICSSON-O-RU-11221": "HCL-O-DU-1122",
290 "ERICSSON-O-RU-11222": "HCL-O-DU-1122",
291 "ERICSSON-O-RU-11223": "HCL-O-DU-1122",
292 "ERICSSON-O-RU-11224": "HCL-O-DU-1123",
293 "ERICSSON-O-RU-11225": "HCL-O-DU-1123",
294 "ERICSSON-O-RU-11226": "HCL-O-DU-1123",
295 "ERICSSON-O-RU-11227": "HCL-O-DU-1124",
296 "ERICSSON-O-RU-11228": "HCL-O-DU-1125",
297 "ERICSSON-O-RU-11229": "HCL-O-DU-1125"}
301 name: LinkMonitorModel
305 name: LinkMonitorModel_KeyInfo
310 name: ApexMessageOutputEvent
314 name: ApexMessageOutputEvent
316 UUID: cca47d74-7754-4a61-b163-ca31f66b157b
317 description: Generated description for concept referred to by
318 key "ApexMessageOutputEvent:0.0.1"
320 name: CreateLinkClearedOutfieldsEvent
324 name: CreateLinkClearedOutfieldsEvent
326 UUID: a295d6a3-1b73-387e-abba-b41e9b608802
327 description: Generated description for concept referred to by
328 key "CreateLinkClearedOutfieldsEvent:0.0.1"
330 name: CreateLinkClearedOutfieldsTask
334 name: CreateLinkClearedOutfieldsTask
336 UUID: fd594e88-411d-4a94-b2be-697b3a0d7adf
337 description: This task creates the output fields when link failure
340 name: CreateLinkFailureOutfieldsEvent
344 name: CreateLinkFailureOutfieldsEvent
346 UUID: 02be2b5d-45b7-3c54-ae54-97f2b5c30125
347 description: Generated description for concept referred to by
348 key "CreateLinkFailureOutfieldsEvent:0.0.1"
350 name: CreateLinkFailureOutfieldsTask
354 name: CreateLinkFailureOutfieldsTask
356 UUID: ac3d9842-80af-4a98-951c-bd79a431c613
357 description: This task the output fields when link failure is
360 name: LinkClearedTask
364 name: LinkClearedTask
366 UUID: eecfde90-896c-4343-8f9c-2603ced94e2d
367 description: This task sends a message to the output when link
370 name: LinkFailureInputEvent
374 name: LinkFailureInputEvent
376 UUID: c4500941-3f98-4080-a9cc-5b9753ed050b
377 description: Generated description for concept referred to by
378 key "LinkFailureInputEvent:0.0.1"
380 name: LinkFailureInputSchema
384 name: LinkFailureInputSchema
386 UUID: 3b3974fc-3012-3b02-9f33-c9d8eefe4dc1
387 description: Generated description for concept referred to by
388 key "LinkFailureInputSchema:0.0.1"
390 name: LinkFailureOutputEvent
394 name: LinkFailureOutputEvent
396 UUID: 4f04aa98-e917-4f4a-882a-c75ba5a99374
397 description: Generated description for concept referred to by
398 key "LinkFailureOutputEvent:0.0.1"
400 name: LinkFailureOutputSchema
404 name: LinkFailureOutputSchema
406 UUID: 2d1a7f6e-eb9a-3984-be1f-283d98111b84
407 description: Generated description for concept referred to by
408 key "LinkFailureOutputSchema:0.0.1"
410 name: LinkFailureTask
414 name: LinkFailureTask
416 UUID: 3351b0f4-cf06-4fa2-8823-edf67bd30223
417 description: This task updates the config for O-RU when link
420 name: LinkMonitorModel
424 name: LinkMonitorModel
426 UUID: 540226fb-55ee-4f0e-a444-983a0494818e
427 description: This is the Apex Policy Model for link monitoring.
429 name: LinkMonitorModel_Events
433 name: LinkMonitorModel_Events
435 UUID: 27ad3e7e-fe3b-3bd6-9081-718705c2bcea
436 description: Generated description for concept referred to by
437 key "LinkMonitorModel_Events:0.0.1"
439 name: LinkMonitorModel_KeyInfo
443 name: LinkMonitorModel_KeyInfo
445 UUID: ea0b5f58-eefd-358a-9660-840c640bf981
446 description: Generated description for concept referred to by
447 key "LinkMonitorModel_KeyInfo:0.0.1"
449 name: LinkMonitorModel_Policies
453 name: LinkMonitorModel_Policies
455 UUID: ee9e0b0f-2b7d-3ab7-9a98-c5ec05ed823d
456 description: Generated description for concept referred to by
457 key "LinkMonitorModel_Policies:0.0.1"
459 name: LinkMonitorModel_Schemas
463 name: LinkMonitorModel_Schemas
465 UUID: fa5f9b8f-796c-3c70-84e9-5140c958c4bb
466 description: Generated description for concept referred to by
467 key "LinkMonitorModel_Schemas:0.0.1"
469 name: LinkMonitorModel_Tasks
473 name: LinkMonitorModel_Tasks
475 UUID: eec592f7-69d5-39a9-981a-e552f787ed01
476 description: Generated description for concept referred to by
477 key "LinkMonitorModel_Tasks:0.0.1"
479 name: LinkMonitorPolicy
483 name: LinkMonitorPolicy
485 UUID: 6c5e410f-489a-46ff-964e-982ce6e8b6d0
486 description: Generated description for concept referred to by
487 key "LinkMonitorPolicy:0.0.1"
495 UUID: ac4b34ac-39d6-3393-a267-8d5b84854018
496 description: A schema for messages from apex
498 name: NoPolicyDefinedTask
502 name: NoPolicyDefinedTask
504 UUID: d48b619e-d00d-4008-b884-02d76ea4350b
505 description: This task sends a message to the output when an
506 event is received for which no policy has been defined.
514 UUID: 50662174-a88b-3cbd-91bd-8e91b40b2660
515 description: A schema for O-DU-ID
523 UUID: 54daf32b-015f-39cd-8530-a1175c5553e9
524 description: A schema for O-RU-ID
527 name: LinkMonitorModel_Policies
532 name: LinkMonitorPolicy
536 name: LinkMonitorPolicy
541 - key: LinkClearedState
544 parentKeyName: LinkMonitorPolicy
545 parentKeyVersion: 0.0.1
546 parentLocalName: 'NULL'
547 localName: LinkClearedState
549 name: CreateLinkClearedOutfieldsEvent
553 - key: LinkClearedLogic_Output_Direct
556 parentKeyName: LinkMonitorPolicy
557 parentKeyVersion: 0.0.1
558 parentLocalName: LinkClearedState
559 localName: LinkClearedLogic_Output_Direct
561 name: ApexMessageOutputEvent
564 parentKeyName: 'NULL'
565 parentKeyVersion: 0.0.0
566 parentLocalName: 'NULL'
568 contextAlbumReference: []
571 logicFlavour: UNDEFINED
573 stateFinalizerLogicMap:
576 name: LinkClearedTask
581 name: LinkClearedTask
585 parentKeyName: LinkMonitorPolicy
586 parentKeyVersion: 0.0.1
587 parentLocalName: LinkClearedState
588 localName: LinkClearedTask
591 parentKeyName: LinkMonitorPolicy
592 parentKeyVersion: 0.0.1
593 parentLocalName: LinkClearedState
594 localName: LinkClearedLogic_Output_Direct
595 - key: LinkFailureOrClearedState
598 parentKeyName: LinkMonitorPolicy
599 parentKeyVersion: 0.0.1
600 parentLocalName: 'NULL'
601 localName: LinkFailureOrClearedState
603 name: LinkFailureInputEvent
607 - key: CreateLinkClearedOutfieldsLogic_Output_Direct
610 parentKeyName: LinkMonitorPolicy
611 parentKeyVersion: 0.0.1
612 parentLocalName: LinkFailureOrClearedState
613 localName: CreateLinkClearedOutfieldsLogic_Output_Direct
615 name: CreateLinkClearedOutfieldsEvent
618 parentKeyName: LinkMonitorPolicy
619 parentKeyVersion: 0.0.1
620 parentLocalName: 'NULL'
621 localName: LinkClearedState
622 - key: CreateLinkFailureOutfieldsLogic_Output_Direct
625 parentKeyName: LinkMonitorPolicy
626 parentKeyVersion: 0.0.1
627 parentLocalName: LinkFailureOrClearedState
628 localName: CreateLinkFailureOutfieldsLogic_Output_Direct
630 name: CreateLinkFailureOutfieldsEvent
633 parentKeyName: LinkMonitorPolicy
634 parentKeyVersion: 0.0.1
635 parentLocalName: 'NULL'
636 localName: LinkFailureState
637 - key: NoPolicyDefinedLogic_Output_Direct
640 parentKeyName: LinkMonitorPolicy
641 parentKeyVersion: 0.0.1
642 parentLocalName: LinkFailureOrClearedState
643 localName: NoPolicyDefinedLogic_Output_Direct
645 name: ApexMessageOutputEvent
648 parentKeyName: 'NULL'
649 parentKeyVersion: 0.0.0
650 parentLocalName: 'NULL'
652 contextAlbumReference: []
654 key: TaskSelectionLogic
655 logicFlavour: JAVASCRIPT
658 * ============LICENSE_START=======================================================
659 * Copyright (C) 2021 Nordix Foundation.
660 * ================================================================================
661 * Licensed under the Apache License, Version 2.0 (the "License");
662 * you may not use this file except in compliance with the License.
663 * You may obtain a copy of the License at
665 * http://www.apache.org/licenses/LICENSE-2.0
667 * Unless required by applicable law or agreed to in writing, software
668 * distributed under the License is distributed on an "AS IS" BASIS,
669 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
670 * See the License for the specific language governing permissions and
671 * limitations under the License.
673 * SPDX-License-Identifier: Apache-2.0
674 * ============LICENSE_END=========================================================
677 executor.logger.info("Task Selection Execution: '"+executor.subject.id+
678 "'. InputFields: '"+executor.inFields+"'");
680 var linkFailureInput = executor.inFields.get("LinkFailureInput");
681 var commonEventHeader = linkFailureInput.get("event").get("commonEventHeader");
682 var domain = commonEventHeader.get("domain");
684 taskFailure = executor.subject.getTaskKey("CreateLinkFailureOutfieldsTask");
685 taskCleared = executor.subject.getTaskKey("CreateLinkClearedOutfieldsTask");
686 taskDefault = executor.subject.getDefaultTaskKey();
688 if (domain == "fault") {
689 var faultFields = linkFailureInput.get("event").get("faultFields");
690 var alarmCondition = faultFields.get("alarmCondition");
691 var eventSeverity = faultFields.get("eventSeverity");
692 if (alarmCondition == "28" && eventSeverity != "NORMAL") {
693 taskFailure.copyTo(executor.selectedTask);
694 } else if (alarmCondition == "28" && eventSeverity == "NORMAL") {
695 taskCleared.copyTo(executor.selectedTask);
697 taskDefault.copyTo(executor.selectedTask);
700 taskDefault.copyTo(executor.selectedTask);
704 stateFinalizerLogicMap:
707 name: NoPolicyDefinedTask
712 name: CreateLinkClearedOutfieldsTask
716 parentKeyName: LinkMonitorPolicy
717 parentKeyVersion: 0.0.1
718 parentLocalName: LinkFailureOrClearedState
719 localName: CreateLinkClearedOutfieldsTask
722 parentKeyName: LinkMonitorPolicy
723 parentKeyVersion: 0.0.1
724 parentLocalName: LinkFailureOrClearedState
725 localName: CreateLinkClearedOutfieldsLogic_Output_Direct
727 name: CreateLinkFailureOutfieldsTask
731 parentKeyName: LinkMonitorPolicy
732 parentKeyVersion: 0.0.1
733 parentLocalName: LinkFailureOrClearedState
734 localName: CreateLinkFailureOutfieldsTask
737 parentKeyName: LinkMonitorPolicy
738 parentKeyVersion: 0.0.1
739 parentLocalName: LinkFailureOrClearedState
740 localName: CreateLinkFailureOutfieldsLogic_Output_Direct
742 name: NoPolicyDefinedTask
746 parentKeyName: LinkMonitorPolicy
747 parentKeyVersion: 0.0.1
748 parentLocalName: LinkFailureOrClearedState
749 localName: NoPolicyDefinedTask
752 parentKeyName: LinkMonitorPolicy
753 parentKeyVersion: 0.0.1
754 parentLocalName: LinkFailureOrClearedState
755 localName: NoPolicyDefinedLogic_Output_Direct
756 - key: LinkFailureState
759 parentKeyName: LinkMonitorPolicy
760 parentKeyVersion: 0.0.1
761 parentLocalName: 'NULL'
762 localName: LinkFailureState
764 name: CreateLinkFailureOutfieldsEvent
768 - key: LinkFailureLogic_Output_Direct
771 parentKeyName: LinkMonitorPolicy
772 parentKeyVersion: 0.0.1
773 parentLocalName: LinkFailureState
774 localName: LinkFailureLogic_Output_Direct
776 name: LinkFailureOutputEvent
779 parentKeyName: 'NULL'
780 parentKeyVersion: 0.0.0
781 parentLocalName: 'NULL'
783 contextAlbumReference: []
786 logicFlavour: UNDEFINED
788 stateFinalizerLogicMap:
791 name: LinkFailureTask
796 name: LinkFailureTask
800 parentKeyName: LinkMonitorPolicy
801 parentKeyVersion: 0.0.1
802 parentLocalName: LinkFailureState
803 localName: LinkFailureTask
806 parentKeyName: LinkMonitorPolicy
807 parentKeyVersion: 0.0.1
808 parentLocalName: LinkFailureState
809 localName: LinkFailureLogic_Output_Direct
810 firstState: LinkFailureOrClearedState
813 name: LinkMonitorModel_Tasks
818 name: CreateLinkClearedOutfieldsTask
822 name: CreateLinkClearedOutfieldsTask
826 - key: LinkFailureInput
828 key: LinkFailureInput
830 name: LinkFailureInputSchema
844 contextAlbumReference: []
847 logicFlavour: JAVASCRIPT
850 * ============LICENSE_START=======================================================
851 * Copyright (C) 2021 Nordix Foundation.
852 * ================================================================================
853 * Licensed under the Apache License, Version 2.0 (the "License");
854 * you may not use this file except in compliance with the License.
855 * You may obtain a copy of the License at
857 * http://www.apache.org/licenses/LICENSE-2.0
859 * Unless required by applicable law or agreed to in writing, software
860 * distributed under the License is distributed on an "AS IS" BASIS,
861 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
862 * See the License for the specific language governing permissions and
863 * limitations under the License.
865 * SPDX-License-Identifier: Apache-2.0
866 * ============LICENSE_END=========================================================
869 executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
871 var linkFailureInput = executor.inFields.get("LinkFailureInput");
872 var oruId = linkFailureInput.get("event").get("commonEventHeader").get("sourceName");
874 executor.outFields.put("OruId", oruId);
876 executor.logger.info(executor.outFields);
880 name: CreateLinkFailureOutfieldsTask
884 name: CreateLinkFailureOutfieldsTask
888 - key: LinkFailureInput
890 key: LinkFailureInput
892 name: LinkFailureInputSchema
913 contextAlbumReference: []
916 logicFlavour: JAVASCRIPT
919 * ============LICENSE_START=======================================================
920 * Copyright (C) 2021 Nordix Foundation.
921 * ================================================================================
922 * Licensed under the Apache License, Version 2.0 (the "License");
923 * you may not use this file except in compliance with the License.
924 * You may obtain a copy of the License at
926 * http://www.apache.org/licenses/LICENSE-2.0
928 * Unless required by applicable law or agreed to in writing, software
929 * distributed under the License is distributed on an "AS IS" BASIS,
930 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
931 * See the License for the specific language governing permissions and
932 * limitations under the License.
934 * SPDX-License-Identifier: Apache-2.0
935 * ============LICENSE_END=========================================================
938 executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
940 var returnValue = true;
941 var linkFailureInput = executor.inFields.get("LinkFailureInput");
942 var oruId = linkFailureInput.get("event").get("commonEventHeader").get("sourceName");
943 var oruOduMap = JSON.parse(executor.parameters.get("ORU-ODU-Map"));
945 if (oruId in oruOduMap) {
946 var oduId = oruOduMap[oruId];
947 executor.outFields.put("OruId", oruId);
948 executor.outFields.put("OduId", oduId);
949 executor.logger.info(executor.outFields);
951 executor.message = "No O-RU found in the config with this ID: " + oruId;
957 name: LinkClearedTask
961 name: LinkClearedTask
983 contextAlbumReference: []
986 logicFlavour: JAVASCRIPT
989 * ============LICENSE_START=======================================================
990 * Copyright (C) 2021 Nordix Foundation.
991 * ================================================================================
992 * Licensed under the Apache License, Version 2.0 (the "License");
993 * you may not use this file except in compliance with the License.
994 * You may obtain a copy of the License at
996 * http://www.apache.org/licenses/LICENSE-2.0
998 * Unless required by applicable law or agreed to in writing, software
999 * distributed under the License is distributed on an "AS IS" BASIS,
1000 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1001 * See the License for the specific language governing permissions and
1002 * limitations under the License.
1004 * SPDX-License-Identifier: Apache-2.0
1005 * ============LICENSE_END=========================================================
1008 executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
1010 var oruId = executor.inFields.get("OruId");
1012 executor.outFields.put("message", "CLEARED link failure for O-RU: " + oruId);
1014 executor.logger.info(executor.outFields);
1018 name: LinkFailureTask
1022 name: LinkFailureTask
1042 - key: LinkFailureOutput
1044 key: LinkFailureOutput
1046 name: LinkFailureOutputSchema
1051 contextAlbumReference: []
1054 logicFlavour: JAVASCRIPT
1057 * ============LICENSE_START=======================================================
1058 * Copyright (C) 2021 Nordix Foundation.
1059 * ================================================================================
1060 * Licensed under the Apache License, Version 2.0 (the "License");
1061 * you may not use this file except in compliance with the License.
1062 * You may obtain a copy of the License at
1064 * http://www.apache.org/licenses/LICENSE-2.0
1066 * Unless required by applicable law or agreed to in writing, software
1067 * distributed under the License is distributed on an "AS IS" BASIS,
1068 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1069 * See the License for the specific language governing permissions and
1070 * limitations under the License.
1072 * SPDX-License-Identifier: Apache-2.0
1073 * ============LICENSE_END=========================================================
1076 executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
1078 var linkFailureOutput = executor.subject.getOutFieldSchemaHelper("LinkFailureOutput").createNewInstance();
1080 var oruId = executor.inFields.get("OruId");
1081 var oduId = executor.inFields.get("OduId");
1083 var unlockMessageArray = new java.util.ArrayList();
1084 for (var i = 0; i < 1; i++) {
1085 unlockMessageArray.add({
1087 "administrative_DasH_state" : "UNLOCKED"
1091 linkFailureOutput.put("o_DasH_ran_DasH_sc_DasH_du_DasH_hello_DasH_world_ColoN_du_DasH_to_DasH_ru_DasH_connection", unlockMessageArray);
1092 executor.outFields.put("LinkFailureOutput", linkFailureOutput.toString());
1094 executor.getExecutionProperties().setProperty("OduId", oduId);
1095 executor.getExecutionProperties().setProperty("OruId", oruId);
1097 executor.logger.info(executor.outFields);
1101 name: NoPolicyDefinedTask
1105 name: NoPolicyDefinedTask
1109 - key: LinkFailureInput
1111 key: LinkFailureInput
1113 name: LinkFailureInputSchema
1127 contextAlbumReference: []
1130 logicFlavour: JAVASCRIPT
1133 * ============LICENSE_START=======================================================
1134 * Copyright (C) 2021 Nordix Foundation.
1135 * ================================================================================
1136 * Licensed under the Apache License, Version 2.0 (the "License");
1137 * you may not use this file except in compliance with the License.
1138 * You may obtain a copy of the License at
1140 * http://www.apache.org/licenses/LICENSE-2.0
1142 * Unless required by applicable law or agreed to in writing, software
1143 * distributed under the License is distributed on an "AS IS" BASIS,
1144 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1145 * See the License for the specific language governing permissions and
1146 * limitations under the License.
1148 * SPDX-License-Identifier: Apache-2.0
1149 * ============LICENSE_END=========================================================
1152 executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
1154 executor.outFields.put("message", "No policy defined for this event");
1156 executor.logger.info(executor.outFields);
1161 name: LinkMonitorModel_Events
1166 name: ApexMessageOutputEvent
1170 name: ApexMessageOutputEvent
1172 nameSpace: org.onap.policy.apex.auth.clieditor
1185 name: CreateLinkClearedOutfieldsEvent
1189 name: CreateLinkClearedOutfieldsEvent
1191 nameSpace: org.onap.policy.apex.auth.clieditor
1204 name: CreateLinkFailureOutfieldsEvent
1208 name: CreateLinkFailureOutfieldsEvent
1210 nameSpace: org.onap.policy.apex.auth.clieditor
1230 name: LinkFailureInputEvent
1234 name: LinkFailureInputEvent
1236 nameSpace: org.onap.policy.apex.auth.clieditor
1241 - key: LinkFailureInput
1243 key: LinkFailureInput
1245 name: LinkFailureInputSchema
1249 name: LinkFailureOutputEvent
1253 name: LinkFailureOutputEvent
1255 nameSpace: org.onap.policy.apex.auth.clieditor
1260 - key: LinkFailureOutput
1262 key: LinkFailureOutput
1264 name: LinkFailureOutputSchema
1269 name: LinkMonitorModel_Schemas
1274 name: LinkFailureInputSchema
1278 name: LinkFailureInputSchema
1281 schemaDefinition: |-
1284 "name": "Link_Failure_Input",
1290 "name": "Event_Type",
1293 "name": "commonEventHeader",
1296 "name": "Common_Event_Header_Type",
1307 "name": "eventName",
1311 "name": "eventType",
1323 "name": "reportingEntityId",
1327 "name": "reportingEntityName",
1335 "name": "sourceName",
1339 "name": "startEpochMicrosec",
1343 "name": "lastEpochMicrosec",
1347 "name": "nfNamingCode",
1351 "name": "nfVendorName",
1355 "name": "timeZoneOffset",
1363 "name": "vesEventListenerVersion",
1370 "name": "faultFields",
1373 "name": "Fault_Fields_Type",
1376 "name": "faultFieldsVersion",
1380 "name": "alarmCondition",
1384 "name": "alarmInterfaceA",
1388 "name": "eventSourceType",
1392 "name": "specificProblem",
1396 "name": "eventSeverity",
1404 "name": "alarmAdditionalInformation",
1407 "name": "Alarm_Additional_Information_Type",
1410 "name": "eventTime",
1414 "name": "equipType",
1437 name: LinkFailureOutputSchema
1441 name: LinkFailureOutputSchema
1444 schemaDefinition: "{\n \"type\": \"record\",\n \"name\":
1445 \"Link_Failure_Output\",\n \"fields\": [\n {\n \"name\":
1446 \"o_DasH_ran_DasH_sc_DasH_du_DasH_hello_DasH_world_ColoN_du_DasH_to_DasH_ru_DasH_connection\",\n
1447 \ \"type\": {\n \t\"type\": \"array\",\n
1448 \ \t\"items\": {\n\t\t \"name\": \"Config_Change_Message\",\n
1449 \ \"type\": \"record\",\n \"fields\":
1451 \"name\",\n \"type\": \"string\"\n
1452 \ },\n\t\t\t{\n \"name\":
1453 \"administrative_DasH_state\",\n \"type\":
1454 \"string\"\n }\n ]\n
1455 \ }\n\t }\n }\n ]\n}"
1464 schemaDefinition: java.lang.String
1473 schemaDefinition: java.lang.String
1482 schemaDefinition: java.lang.String
1483 eventOutputParameters:
1485 carrierTechnologyParameters:
1486 carrierTechnology: RESTCLIENT
1487 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
1489 url: http://sdnr-sim:9990/rests/data/network-topology:network-topology/topology=topology-netconf/node={OduId}/yang-ext:mount/o-ran-sc-du-hello-world:network-function/du-to-ru-connection={OruId}
1493 - Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==
1494 eventProtocolParameters:
1497 pojoField: LinkFailureOutput
1498 eventNameFilter: LinkFailureOutputEvent
1500 carrierTechnologyParameters:
1501 carrierTechnology: FILE
1504 eventProtocolParameters:
1508 eventNameFilter: ApexMessageOutputEvent
1509 eventInputParameters:
1511 carrierTechnologyParameters:
1512 carrierTechnology: RESTCLIENT
1513 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
1515 url: http://onap-dmaap:3904/events/unauthenticated.SEC_FAULT_OUTPUT/users/link-monitor-nonrtric?timeout=15000&limit=100
1516 eventProtocolParameters:
1519 versionAlias: version
1520 pojoField: LinkFailureInput
1521 eventName: LinkFailureInputEvent