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
208 description: Specifies the organization that provides the control loop element
210 type: onap.datatypes.ToscaConceptIdentifier
215 type: onap.datatypes.ToscaConceptIdentifier
219 description: The identity of the participant type that hosts this type of Control Loop Element
224 - greater_or_equal: 0
227 description: A value indicating the start phase in which this control loop element will be started, the
228 first start phase is zero. Control Loop Elements are started in their start_phase order and stopped
229 in reverse start phase order. Control Loop Elements with the same start phase are started and
230 stopped simultaneously
231 uninitializedToPassiveTimeout:
235 - greater_or_equal: 0
239 description: The maximum time in seconds to wait for a state chage from uninitialized to passive
240 passiveToRunningTimeout:
244 - greater_or_equal: 0
248 description: The maximum time in seconds to wait for a state chage from passive to running
249 runningToPassiveTimeout:
253 - greater_or_equal: 0
257 description: The maximum time in seconds to wait for a state chage from running to passive
258 passiveToUninitializedTimeout:
262 - greater_or_equal: 0
266 description: The maximum time in seconds to wait for a state chage from passive to uninitialized
267 org.onap.policy.clamp.controlloop.ControlLoop:
269 derived_from: tosca.nodetypes.Root
276 description: Specifies the organization that provides the control loop element
283 type: onap.datatypes.ToscaConceptIdentifier
284 description: Specifies a list of control loop element definitions that make up this control loop definition
285 org.onap.policy.clamp.controlloop.PolicyControlLoopElement:
287 derived_from: org.onap.policy.clamp.controlloop.ControlLoopElement
290 type: onap.datatypes.ToscaConceptIdentifier
293 type: onap.datatypes.ToscaConceptIdentifier
297 org.onap.domain.linkmonitor.LinkMonitorPolicyControlLoopElement:
299 type: org.onap.policy.clamp.controlloop.PolicyControlLoopElement
301 description: Control loop element for the Link Monitor
305 name: org.onap.PM_Policy
308 name: org.onap.policy.controlloop.PolicyControlLoopParticipant
311 name: onap.policies.controlloop.operational.common.Apex
314 name: operational.apex.linkmonitor
316 pdpGroup: defaultGroup
317 org.onap.domain.linkmonitor.LinkMonitorControlLoopDefinition0:
319 type: org.onap.policy.clamp.controlloop.ControlLoop
321 description: Control loop for Link Monitor
325 - name: org.onap.domain.linkmonitor.LinkMonitorPolicyControlLoopElement
327 org.onap.policy.controlloop.PolicyControlLoopParticipant:
329 type: org.onap.policy.clamp.controlloop.Participant
331 description: Participant for policy framework
335 - operational.apex.linkmonitor:
336 type: onap.policies.controlloop.operational.common.Apex
340 policy-id: operational.apex.linkmonitor
341 policy-version: 1.0.0
343 engineServiceParameters:
344 name: LinkMonitorApexEngine
348 deploymentPort: 12345
352 parameterClassName: org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters
354 parameterClassName: org.onap.policy.apex.context.parameters.ContextParameters
357 parameterClassName: org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters
361 {"ERICSSON-O-RU-11220": "HCL-O-DU-1122",
362 "ERICSSON-O-RU-11221": "HCL-O-DU-1122",
363 "ERICSSON-O-RU-11222": "HCL-O-DU-1122",
364 "ERICSSON-O-RU-11223": "HCL-O-DU-1122",
365 "ERICSSON-O-RU-11224": "HCL-O-DU-1123",
366 "ERICSSON-O-RU-11225": "HCL-O-DU-1123",
367 "ERICSSON-O-RU-11226": "HCL-O-DU-1123",
368 "ERICSSON-O-RU-11227": "HCL-O-DU-1124",
369 "ERICSSON-O-RU-11228": "HCL-O-DU-1125",
370 "ERICSSON-O-RU-11229": "HCL-O-DU-1125"}
374 name: LinkMonitorModel
378 name: LinkMonitorModel_KeyInfo
383 name: ApexMessageOutputEvent
387 name: ApexMessageOutputEvent
389 UUID: cca47d74-7754-4a61-b163-ca31f66b157b
390 description: Generated description for concept referred to by
391 key "ApexMessageOutputEvent:0.0.1"
393 name: CreateLinkClearedOutfieldsEvent
397 name: CreateLinkClearedOutfieldsEvent
399 UUID: a295d6a3-1b73-387e-abba-b41e9b608802
400 description: Generated description for concept referred to by
401 key "CreateLinkClearedOutfieldsEvent:0.0.1"
403 name: CreateLinkClearedOutfieldsTask
407 name: CreateLinkClearedOutfieldsTask
409 UUID: fd594e88-411d-4a94-b2be-697b3a0d7adf
410 description: This task creates the output fields when link failure
413 name: CreateLinkFailureOutfieldsEvent
417 name: CreateLinkFailureOutfieldsEvent
419 UUID: 02be2b5d-45b7-3c54-ae54-97f2b5c30125
420 description: Generated description for concept referred to by
421 key "CreateLinkFailureOutfieldsEvent:0.0.1"
423 name: CreateLinkFailureOutfieldsTask
427 name: CreateLinkFailureOutfieldsTask
429 UUID: ac3d9842-80af-4a98-951c-bd79a431c613
430 description: This task the output fields when link failure is
433 name: LinkClearedTask
437 name: LinkClearedTask
439 UUID: eecfde90-896c-4343-8f9c-2603ced94e2d
440 description: This task sends a message to the output when link
443 name: LinkFailureInputEvent
447 name: LinkFailureInputEvent
449 UUID: c4500941-3f98-4080-a9cc-5b9753ed050b
450 description: Generated description for concept referred to by
451 key "LinkFailureInputEvent:0.0.1"
453 name: LinkFailureInputSchema
457 name: LinkFailureInputSchema
459 UUID: 3b3974fc-3012-3b02-9f33-c9d8eefe4dc1
460 description: Generated description for concept referred to by
461 key "LinkFailureInputSchema:0.0.1"
463 name: LinkFailureOutputEvent
467 name: LinkFailureOutputEvent
469 UUID: 4f04aa98-e917-4f4a-882a-c75ba5a99374
470 description: Generated description for concept referred to by
471 key "LinkFailureOutputEvent:0.0.1"
473 name: LinkFailureOutputSchema
477 name: LinkFailureOutputSchema
479 UUID: 2d1a7f6e-eb9a-3984-be1f-283d98111b84
480 description: Generated description for concept referred to by
481 key "LinkFailureOutputSchema:0.0.1"
483 name: LinkFailureTask
487 name: LinkFailureTask
489 UUID: 3351b0f4-cf06-4fa2-8823-edf67bd30223
490 description: This task updates the config for O-RU when link
493 name: LinkMonitorModel
497 name: LinkMonitorModel
499 UUID: 540226fb-55ee-4f0e-a444-983a0494818e
500 description: This is the Apex Policy Model for link monitoring.
502 name: LinkMonitorModel_Events
506 name: LinkMonitorModel_Events
508 UUID: 27ad3e7e-fe3b-3bd6-9081-718705c2bcea
509 description: Generated description for concept referred to by
510 key "LinkMonitorModel_Events:0.0.1"
512 name: LinkMonitorModel_KeyInfo
516 name: LinkMonitorModel_KeyInfo
518 UUID: ea0b5f58-eefd-358a-9660-840c640bf981
519 description: Generated description for concept referred to by
520 key "LinkMonitorModel_KeyInfo:0.0.1"
522 name: LinkMonitorModel_Policies
526 name: LinkMonitorModel_Policies
528 UUID: ee9e0b0f-2b7d-3ab7-9a98-c5ec05ed823d
529 description: Generated description for concept referred to by
530 key "LinkMonitorModel_Policies:0.0.1"
532 name: LinkMonitorModel_Schemas
536 name: LinkMonitorModel_Schemas
538 UUID: fa5f9b8f-796c-3c70-84e9-5140c958c4bb
539 description: Generated description for concept referred to by
540 key "LinkMonitorModel_Schemas:0.0.1"
542 name: LinkMonitorModel_Tasks
546 name: LinkMonitorModel_Tasks
548 UUID: eec592f7-69d5-39a9-981a-e552f787ed01
549 description: Generated description for concept referred to by
550 key "LinkMonitorModel_Tasks:0.0.1"
552 name: LinkMonitorPolicy
556 name: LinkMonitorPolicy
558 UUID: 6c5e410f-489a-46ff-964e-982ce6e8b6d0
559 description: Generated description for concept referred to by
560 key "LinkMonitorPolicy:0.0.1"
568 UUID: ac4b34ac-39d6-3393-a267-8d5b84854018
569 description: A schema for messages from apex
571 name: NoPolicyDefinedTask
575 name: NoPolicyDefinedTask
577 UUID: d48b619e-d00d-4008-b884-02d76ea4350b
578 description: This task sends a message to the output when an
579 event is received for which no policy has been defined.
587 UUID: 50662174-a88b-3cbd-91bd-8e91b40b2660
588 description: A schema for O-DU-ID
596 UUID: 54daf32b-015f-39cd-8530-a1175c5553e9
597 description: A schema for O-RU-ID
600 name: LinkMonitorModel_Policies
605 name: LinkMonitorPolicy
609 name: LinkMonitorPolicy
614 - key: LinkClearedState
617 parentKeyName: LinkMonitorPolicy
618 parentKeyVersion: 0.0.1
619 parentLocalName: 'NULL'
620 localName: LinkClearedState
622 name: CreateLinkClearedOutfieldsEvent
626 - key: LinkClearedLogic_Output_Direct
629 parentKeyName: LinkMonitorPolicy
630 parentKeyVersion: 0.0.1
631 parentLocalName: LinkClearedState
632 localName: LinkClearedLogic_Output_Direct
634 name: ApexMessageOutputEvent
637 parentKeyName: 'NULL'
638 parentKeyVersion: 0.0.0
639 parentLocalName: 'NULL'
641 contextAlbumReference: []
644 logicFlavour: UNDEFINED
646 stateFinalizerLogicMap:
649 name: LinkClearedTask
654 name: LinkClearedTask
658 parentKeyName: LinkMonitorPolicy
659 parentKeyVersion: 0.0.1
660 parentLocalName: LinkClearedState
661 localName: LinkClearedTask
664 parentKeyName: LinkMonitorPolicy
665 parentKeyVersion: 0.0.1
666 parentLocalName: LinkClearedState
667 localName: LinkClearedLogic_Output_Direct
668 - key: LinkFailureOrClearedState
671 parentKeyName: LinkMonitorPolicy
672 parentKeyVersion: 0.0.1
673 parentLocalName: 'NULL'
674 localName: LinkFailureOrClearedState
676 name: LinkFailureInputEvent
680 - key: CreateLinkClearedOutfieldsLogic_Output_Direct
683 parentKeyName: LinkMonitorPolicy
684 parentKeyVersion: 0.0.1
685 parentLocalName: LinkFailureOrClearedState
686 localName: CreateLinkClearedOutfieldsLogic_Output_Direct
688 name: CreateLinkClearedOutfieldsEvent
691 parentKeyName: LinkMonitorPolicy
692 parentKeyVersion: 0.0.1
693 parentLocalName: 'NULL'
694 localName: LinkClearedState
695 - key: CreateLinkFailureOutfieldsLogic_Output_Direct
698 parentKeyName: LinkMonitorPolicy
699 parentKeyVersion: 0.0.1
700 parentLocalName: LinkFailureOrClearedState
701 localName: CreateLinkFailureOutfieldsLogic_Output_Direct
703 name: CreateLinkFailureOutfieldsEvent
706 parentKeyName: LinkMonitorPolicy
707 parentKeyVersion: 0.0.1
708 parentLocalName: 'NULL'
709 localName: LinkFailureState
710 - key: NoPolicyDefinedLogic_Output_Direct
713 parentKeyName: LinkMonitorPolicy
714 parentKeyVersion: 0.0.1
715 parentLocalName: LinkFailureOrClearedState
716 localName: NoPolicyDefinedLogic_Output_Direct
718 name: ApexMessageOutputEvent
721 parentKeyName: 'NULL'
722 parentKeyVersion: 0.0.0
723 parentLocalName: 'NULL'
725 contextAlbumReference: []
727 key: TaskSelectionLogic
728 logicFlavour: JAVASCRIPT
731 * ============LICENSE_START=======================================================
732 * Copyright (C) 2021 Nordix Foundation.
733 * ================================================================================
734 * Licensed under the Apache License, Version 2.0 (the "License");
735 * you may not use this file except in compliance with the License.
736 * You may obtain a copy of the License at
738 * http://www.apache.org/licenses/LICENSE-2.0
740 * Unless required by applicable law or agreed to in writing, software
741 * distributed under the License is distributed on an "AS IS" BASIS,
742 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
743 * See the License for the specific language governing permissions and
744 * limitations under the License.
746 * SPDX-License-Identifier: Apache-2.0
747 * ============LICENSE_END=========================================================
750 executor.logger.info("Task Selection Execution: '"+executor.subject.id+
751 "'. InputFields: '"+executor.inFields+"'");
753 var linkFailureInput = executor.inFields.get("LinkFailureInput");
754 var commonEventHeader = linkFailureInput.get("event").get("commonEventHeader");
755 var domain = commonEventHeader.get("domain");
757 taskFailure = executor.subject.getTaskKey("CreateLinkFailureOutfieldsTask");
758 taskCleared = executor.subject.getTaskKey("CreateLinkClearedOutfieldsTask");
759 taskDefault = executor.subject.getDefaultTaskKey();
761 if (domain == "fault") {
762 var faultFields = linkFailureInput.get("event").get("faultFields");
763 var alarmCondition = faultFields.get("alarmCondition");
764 var eventSeverity = faultFields.get("eventSeverity");
765 if (alarmCondition == "28" && eventSeverity != "NORMAL") {
766 taskFailure.copyTo(executor.selectedTask);
767 } else if (alarmCondition == "28" && eventSeverity == "NORMAL") {
768 taskCleared.copyTo(executor.selectedTask);
770 taskDefault.copyTo(executor.selectedTask);
773 taskDefault.copyTo(executor.selectedTask);
777 stateFinalizerLogicMap:
780 name: NoPolicyDefinedTask
785 name: CreateLinkClearedOutfieldsTask
789 parentKeyName: LinkMonitorPolicy
790 parentKeyVersion: 0.0.1
791 parentLocalName: LinkFailureOrClearedState
792 localName: CreateLinkClearedOutfieldsTask
795 parentKeyName: LinkMonitorPolicy
796 parentKeyVersion: 0.0.1
797 parentLocalName: LinkFailureOrClearedState
798 localName: CreateLinkClearedOutfieldsLogic_Output_Direct
800 name: CreateLinkFailureOutfieldsTask
804 parentKeyName: LinkMonitorPolicy
805 parentKeyVersion: 0.0.1
806 parentLocalName: LinkFailureOrClearedState
807 localName: CreateLinkFailureOutfieldsTask
810 parentKeyName: LinkMonitorPolicy
811 parentKeyVersion: 0.0.1
812 parentLocalName: LinkFailureOrClearedState
813 localName: CreateLinkFailureOutfieldsLogic_Output_Direct
815 name: NoPolicyDefinedTask
819 parentKeyName: LinkMonitorPolicy
820 parentKeyVersion: 0.0.1
821 parentLocalName: LinkFailureOrClearedState
822 localName: NoPolicyDefinedTask
825 parentKeyName: LinkMonitorPolicy
826 parentKeyVersion: 0.0.1
827 parentLocalName: LinkFailureOrClearedState
828 localName: NoPolicyDefinedLogic_Output_Direct
829 - key: LinkFailureState
832 parentKeyName: LinkMonitorPolicy
833 parentKeyVersion: 0.0.1
834 parentLocalName: 'NULL'
835 localName: LinkFailureState
837 name: CreateLinkFailureOutfieldsEvent
841 - key: LinkFailureLogic_Output_Direct
844 parentKeyName: LinkMonitorPolicy
845 parentKeyVersion: 0.0.1
846 parentLocalName: LinkFailureState
847 localName: LinkFailureLogic_Output_Direct
849 name: LinkFailureOutputEvent
852 parentKeyName: 'NULL'
853 parentKeyVersion: 0.0.0
854 parentLocalName: 'NULL'
856 contextAlbumReference: []
859 logicFlavour: UNDEFINED
861 stateFinalizerLogicMap:
864 name: LinkFailureTask
869 name: LinkFailureTask
873 parentKeyName: LinkMonitorPolicy
874 parentKeyVersion: 0.0.1
875 parentLocalName: LinkFailureState
876 localName: LinkFailureTask
879 parentKeyName: LinkMonitorPolicy
880 parentKeyVersion: 0.0.1
881 parentLocalName: LinkFailureState
882 localName: LinkFailureLogic_Output_Direct
883 firstState: LinkFailureOrClearedState
886 name: LinkMonitorModel_Tasks
891 name: CreateLinkClearedOutfieldsTask
895 name: CreateLinkClearedOutfieldsTask
899 - key: LinkFailureInput
901 key: LinkFailureInput
903 name: LinkFailureInputSchema
917 contextAlbumReference: []
920 logicFlavour: JAVASCRIPT
923 * ============LICENSE_START=======================================================
924 * Copyright (C) 2021 Nordix Foundation.
925 * ================================================================================
926 * Licensed under the Apache License, Version 2.0 (the "License");
927 * you may not use this file except in compliance with the License.
928 * You may obtain a copy of the License at
930 * http://www.apache.org/licenses/LICENSE-2.0
932 * Unless required by applicable law or agreed to in writing, software
933 * distributed under the License is distributed on an "AS IS" BASIS,
934 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
935 * See the License for the specific language governing permissions and
936 * limitations under the License.
938 * SPDX-License-Identifier: Apache-2.0
939 * ============LICENSE_END=========================================================
942 executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
944 var linkFailureInput = executor.inFields.get("LinkFailureInput");
945 var oruId = linkFailureInput.get("event").get("commonEventHeader").get("sourceName");
947 executor.outFields.put("OruId", oruId);
949 executor.logger.info(executor.outFields);
953 name: CreateLinkFailureOutfieldsTask
957 name: CreateLinkFailureOutfieldsTask
961 - key: LinkFailureInput
963 key: LinkFailureInput
965 name: LinkFailureInputSchema
986 contextAlbumReference: []
989 logicFlavour: JAVASCRIPT
992 * ============LICENSE_START=======================================================
993 * Copyright (C) 2021 Nordix Foundation.
994 * ================================================================================
995 * Licensed under the Apache License, Version 2.0 (the "License");
996 * you may not use this file except in compliance with the License.
997 * You may obtain a copy of the License at
999 * http://www.apache.org/licenses/LICENSE-2.0
1001 * Unless required by applicable law or agreed to in writing, software
1002 * distributed under the License is distributed on an "AS IS" BASIS,
1003 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1004 * See the License for the specific language governing permissions and
1005 * limitations under the License.
1007 * SPDX-License-Identifier: Apache-2.0
1008 * ============LICENSE_END=========================================================
1011 executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
1013 var returnValue = true;
1014 var linkFailureInput = executor.inFields.get("LinkFailureInput");
1015 var oruId = linkFailureInput.get("event").get("commonEventHeader").get("sourceName");
1016 var oruOduMap = JSON.parse(executor.parameters.get("ORU-ODU-Map"));
1018 if (oruId in oruOduMap) {
1019 var oduId = oruOduMap[oruId];
1020 executor.outFields.put("OruId", oruId);
1021 executor.outFields.put("OduId", oduId);
1022 executor.logger.info(executor.outFields);
1024 executor.message = "No O-RU found in the config with this ID: " + oruId;
1025 returnValue = false;
1030 name: LinkClearedTask
1034 name: LinkClearedTask
1056 contextAlbumReference: []
1059 logicFlavour: JAVASCRIPT
1062 * ============LICENSE_START=======================================================
1063 * Copyright (C) 2021 Nordix Foundation.
1064 * ================================================================================
1065 * Licensed under the Apache License, Version 2.0 (the "License");
1066 * you may not use this file except in compliance with the License.
1067 * You may obtain a copy of the License at
1069 * http://www.apache.org/licenses/LICENSE-2.0
1071 * Unless required by applicable law or agreed to in writing, software
1072 * distributed under the License is distributed on an "AS IS" BASIS,
1073 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1074 * See the License for the specific language governing permissions and
1075 * limitations under the License.
1077 * SPDX-License-Identifier: Apache-2.0
1078 * ============LICENSE_END=========================================================
1081 executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
1083 var oruId = executor.inFields.get("OruId");
1085 executor.outFields.put("message", "CLEARED link failure for O-RU: " + oruId);
1087 executor.logger.info(executor.outFields);
1091 name: LinkFailureTask
1095 name: LinkFailureTask
1115 - key: LinkFailureOutput
1117 key: LinkFailureOutput
1119 name: LinkFailureOutputSchema
1124 contextAlbumReference: []
1127 logicFlavour: JAVASCRIPT
1130 * ============LICENSE_START=======================================================
1131 * Copyright (C) 2021 Nordix Foundation.
1132 * ================================================================================
1133 * Licensed under the Apache License, Version 2.0 (the "License");
1134 * you may not use this file except in compliance with the License.
1135 * You may obtain a copy of the License at
1137 * http://www.apache.org/licenses/LICENSE-2.0
1139 * Unless required by applicable law or agreed to in writing, software
1140 * distributed under the License is distributed on an "AS IS" BASIS,
1141 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1142 * See the License for the specific language governing permissions and
1143 * limitations under the License.
1145 * SPDX-License-Identifier: Apache-2.0
1146 * ============LICENSE_END=========================================================
1149 executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
1151 var linkFailureOutput = executor.subject.getOutFieldSchemaHelper("LinkFailureOutput").createNewInstance();
1153 var oruId = executor.inFields.get("OruId");
1154 var oduId = executor.inFields.get("OduId");
1156 var unlockMessageArray = new java.util.ArrayList();
1157 for (var i = 0; i < 1; i++) {
1158 unlockMessageArray.add({
1160 "administrative_DasH_state" : "UNLOCKED"
1164 linkFailureOutput.put("o_DasH_ran_DasH_sc_DasH_du_DasH_hello_DasH_world_ColoN_du_DasH_to_DasH_ru_DasH_connection", unlockMessageArray);
1165 executor.outFields.put("LinkFailureOutput", linkFailureOutput.toString());
1167 executor.getExecutionProperties().setProperty("OduId", oduId);
1168 executor.getExecutionProperties().setProperty("OruId", oruId);
1170 executor.logger.info(executor.outFields);
1174 name: NoPolicyDefinedTask
1178 name: NoPolicyDefinedTask
1182 - key: LinkFailureInput
1184 key: LinkFailureInput
1186 name: LinkFailureInputSchema
1200 contextAlbumReference: []
1203 logicFlavour: JAVASCRIPT
1206 * ============LICENSE_START=======================================================
1207 * Copyright (C) 2021 Nordix Foundation.
1208 * ================================================================================
1209 * Licensed under the Apache License, Version 2.0 (the "License");
1210 * you may not use this file except in compliance with the License.
1211 * You may obtain a copy of the License at
1213 * http://www.apache.org/licenses/LICENSE-2.0
1215 * Unless required by applicable law or agreed to in writing, software
1216 * distributed under the License is distributed on an "AS IS" BASIS,
1217 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1218 * See the License for the specific language governing permissions and
1219 * limitations under the License.
1221 * SPDX-License-Identifier: Apache-2.0
1222 * ============LICENSE_END=========================================================
1225 executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
1227 executor.outFields.put("message", "No policy defined for this event");
1229 executor.logger.info(executor.outFields);
1234 name: LinkMonitorModel_Events
1239 name: ApexMessageOutputEvent
1243 name: ApexMessageOutputEvent
1245 nameSpace: org.onap.policy.apex.auth.clieditor
1258 name: CreateLinkClearedOutfieldsEvent
1262 name: CreateLinkClearedOutfieldsEvent
1264 nameSpace: org.onap.policy.apex.auth.clieditor
1277 name: CreateLinkFailureOutfieldsEvent
1281 name: CreateLinkFailureOutfieldsEvent
1283 nameSpace: org.onap.policy.apex.auth.clieditor
1303 name: LinkFailureInputEvent
1307 name: LinkFailureInputEvent
1309 nameSpace: org.onap.policy.apex.auth.clieditor
1314 - key: LinkFailureInput
1316 key: LinkFailureInput
1318 name: LinkFailureInputSchema
1322 name: LinkFailureOutputEvent
1326 name: LinkFailureOutputEvent
1328 nameSpace: org.onap.policy.apex.auth.clieditor
1333 - key: LinkFailureOutput
1335 key: LinkFailureOutput
1337 name: LinkFailureOutputSchema
1342 name: LinkMonitorModel_Schemas
1347 name: LinkFailureInputSchema
1351 name: LinkFailureInputSchema
1354 schemaDefinition: |-
1357 "name": "Link_Failure_Input",
1363 "name": "Event_Type",
1366 "name": "commonEventHeader",
1369 "name": "Common_Event_Header_Type",
1380 "name": "eventName",
1384 "name": "eventType",
1396 "name": "reportingEntityId",
1400 "name": "reportingEntityName",
1408 "name": "sourceName",
1412 "name": "startEpochMicrosec",
1416 "name": "lastEpochMicrosec",
1420 "name": "nfNamingCode",
1424 "name": "nfVendorName",
1428 "name": "timeZoneOffset",
1436 "name": "vesEventListenerVersion",
1443 "name": "faultFields",
1446 "name": "Fault_Fields_Type",
1449 "name": "faultFieldsVersion",
1453 "name": "alarmCondition",
1457 "name": "alarmInterfaceA",
1461 "name": "eventSourceType",
1465 "name": "specificProblem",
1469 "name": "eventSeverity",
1477 "name": "alarmAdditionalInformation",
1480 "name": "Alarm_Additional_Information_Type",
1483 "name": "eventTime",
1487 "name": "equipType",
1510 name: LinkFailureOutputSchema
1514 name: LinkFailureOutputSchema
1517 schemaDefinition: "{\n \"type\": \"record\",\n \"name\":
1518 \"Link_Failure_Output\",\n \"fields\": [\n {\n \"name\":
1519 \"o_DasH_ran_DasH_sc_DasH_du_DasH_hello_DasH_world_ColoN_du_DasH_to_DasH_ru_DasH_connection\",\n
1520 \ \"type\": {\n \t\"type\": \"array\",\n
1521 \ \t\"items\": {\n\t\t \"name\": \"Config_Change_Message\",\n
1522 \ \"type\": \"record\",\n \"fields\":
1524 \"name\",\n \"type\": \"string\"\n
1525 \ },\n\t\t\t{\n \"name\":
1526 \"administrative_DasH_state\",\n \"type\":
1527 \"string\"\n }\n ]\n
1528 \ }\n\t }\n }\n ]\n}"
1537 schemaDefinition: java.lang.String
1546 schemaDefinition: java.lang.String
1555 schemaDefinition: java.lang.String
1556 eventOutputParameters:
1558 carrierTechnologyParameters:
1559 carrierTechnology: RESTCLIENT
1560 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
1562 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}
1566 - Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==
1567 eventProtocolParameters:
1570 pojoField: LinkFailureOutput
1571 eventNameFilter: LinkFailureOutputEvent
1573 carrierTechnologyParameters:
1574 carrierTechnology: FILE
1577 eventProtocolParameters:
1581 eventNameFilter: ApexMessageOutputEvent
1582 eventInputParameters:
1584 carrierTechnologyParameters:
1585 carrierTechnology: RESTCLIENT
1586 parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
1588 url: http://onap-dmaap:3904/events/unauthenticated.SEC_FAULT_OUTPUT/users/link-monitor-nonrtric?timeout=15000&limit=100
1589 eventProtocolParameters:
1592 versionAlias: version
1593 pojoField: LinkFailureInput
1594 eventName: LinkFailureInputEvent