2 "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
6 "operational.apex.vCPE": {
7 "type": "onap.policies.controlloop.operational.common.Apex",
8 "type_version": "1.0.0",
9 "derived_from": "tosca.policies.Root",
10 "name": "operational.apex.vCPE",
13 "engineServiceParameters": {
14 "name": "MyApexEngine",
18 "deploymentPort": 12561,
22 "name": "ONAPvCPEPolicyModel",
27 "name": "ONAPvCPEPolicyModel_KeyInfo",
34 "name": "AAILookupTask",
39 "name": "AAILookupTask",
42 "UUID": "bc77813f-e2fa-33e0-aef0-c5b6a8832698",
43 "description": "Generated description for concept referred to by key \"AAILookupTask:0.0.1\""
48 "name": "APPCLCMRequestType",
53 "name": "APPCLCMRequestType",
56 "UUID": "ab26e475-d09d-36cd-a65c-8a8b556f0fa2",
57 "description": "Generated description for concept referred to by key \"APPCLCMRequestType:0.0.1\""
62 "name": "APPCLCMResponseType",
67 "name": "APPCLCMResponseType",
70 "UUID": "a60b42bb-c308-30ea-be59-5bc54864508b",
71 "description": "Generated description for concept referred to by key \"APPCLCMResponseType:0.0.1\""
76 "name": "APPCRestartVNFRequestEvent",
81 "name": "APPCRestartVNFRequestEvent",
84 "UUID": "0b16f8d9-6ee9-30d7-bcd2-e4ded9fccf9b",
85 "description": "Generated description for concept referred to by key \"APPCRestartVNFRequestEvent:2.0.0\""
90 "name": "APPCRestartVNFRequestTask",
95 "name": "APPCRestartVNFRequestTask",
98 "UUID": "719ae90e-ab01-322e-ace3-8c379e7c1fbf",
99 "description": "Generated description for concept referred to by key \"APPCRestartVNFRequestTask:0.0.1\""
104 "name": "APPCRestartVNFResponseEvent",
109 "name": "APPCRestartVNFResponseEvent",
112 "UUID": "7034c5a9-2ea7-3e9e-9ccf-3610c3bf80d9",
113 "description": "Generated description for concept referred to by key \"APPCRestartVNFResponseEvent:2.0.0\""
118 "name": "APPCRestartVNFResponseTask",
123 "name": "APPCRestartVNFResponseTask",
126 "UUID": "fe641fd9-6583-37c5-b317-2a33a3ca5ac7",
127 "description": "Generated description for concept referred to by key \"APPCRestartVNFResponseTask:0.0.1\""
132 "name": "AbatedTask",
137 "name": "AbatedTask",
140 "UUID": "0eb3974f-4fdc-3c90-b351-34e7e18ff1ab",
141 "description": "Generated description for concept referred to by key \"AbatedTask:0.0.1\""
146 "name": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
151 "name": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
154 "UUID": "63ff5c25-f245-37e9-a580-6ac274ced3a7",
155 "description": "Generated description for concept referred to by key \"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e:1.0.2\""
160 "name": "ControlLoopExecutionIDAlbum",
165 "name": "ControlLoopExecutionIDAlbum",
168 "UUID": "5b2bc0cf-0807-3ab1-9004-f21806d800f0",
169 "description": "Generated description for concept referred to by key \"ControlLoopExecutionIDAlbum:0.0.1\""
174 "name": "ControlLoopLogEvent",
179 "name": "ControlLoopLogEvent",
182 "UUID": "ed8a82ad-52c2-3d58-8c08-601606894b86",
183 "description": "Generated description for concept referred to by key \"ControlLoopLogEvent:0.0.1\""
188 "name": "ControlLoopLogTask",
193 "name": "ControlLoopLogTask",
196 "UUID": "1b175691-6b5d-31f6-bf2d-4be95a01f92e",
197 "description": "Generated description for concept referred to by key \"ControlLoopLogTask:0.0.1\""
202 "name": "DeniedTask",
207 "name": "DeniedTask",
210 "UUID": "00142e3c-ee3b-323f-9490-6e4b7f34b09f",
211 "description": "Generated description for concept referred to by key \"DeniedTask:0.0.1\""
216 "name": "GetVCPEStateTask",
221 "name": "GetVCPEStateTask",
224 "UUID": "644d2a3d-0f3a-3664-8000-280c400a5cc1",
225 "description": "Generated description for concept referred to by key \"GetVCPEStateTask:0.0.1\""
230 "name": "GuardDecisionAttributesType",
235 "name": "GuardDecisionAttributesType",
238 "UUID": "5f6dff51-c183-322f-9aba-c6074aa0ece5",
239 "description": "Generated description for concept referred to by key \"GuardDecisionAttributesType:0.0.1\""
244 "name": "GuardRequestEvent",
249 "name": "GuardRequestEvent",
252 "UUID": "fb383a58-715b-3972-a3e6-38010a8de234",
253 "description": "Generated description for concept referred to by key \"GuardRequestEvent:0.0.1\""
258 "name": "GuardRequestTask",
263 "name": "GuardRequestTask",
266 "UUID": "0427d63c-da78-334c-a5bd-95fbbb162398",
267 "description": "Generated description for concept referred to by key \"GuardRequestTask:0.0.1\""
272 "name": "GuardResponseEvent",
277 "name": "GuardResponseEvent",
280 "UUID": "395f6d46-cf24-3d3e-b1fd-1a189a58993d",
281 "description": "Generated description for concept referred to by key \"GuardResponseEvent:0.0.1\""
286 "name": "GuardResponseTask",
291 "name": "GuardResponseTask",
294 "UUID": "1a8b3f30-a7aa-330b-8131-4aea06ad6934",
295 "description": "Generated description for concept referred to by key \"GuardResponseTask:0.0.1\""
300 "name": "NoAAILookupTask",
305 "name": "NoAAILookupTask",
308 "UUID": "648bc8f9-ad2b-3a1b-abe2-89401645f191",
309 "description": "Generated description for concept referred to by key \"NoAAILookupTask:0.0.1\""
314 "name": "ONAPvCPEPolicyModel",
319 "name": "ONAPvCPEPolicyModel",
322 "UUID": "cf1aa7f4-6fe3-3cba-90b4-49dcf46f0d57",
323 "description": "Generated description for concept referred to by key \"ONAPvCPEPolicyModel:0.0.1\""
328 "name": "ONAPvCPEPolicyModel_Albums",
333 "name": "ONAPvCPEPolicyModel_Albums",
336 "UUID": "13f8471b-2b9c-32e0-940b-fe640ea442cf",
337 "description": "Generated description for concept referred to by key \"ONAPvCPEPolicyModel_Albums:0.0.1\""
342 "name": "ONAPvCPEPolicyModel_Events",
347 "name": "ONAPvCPEPolicyModel_Events",
350 "UUID": "4b8e6653-731d-38c5-a195-0cadf533a7a1",
351 "description": "Generated description for concept referred to by key \"ONAPvCPEPolicyModel_Events:0.0.1\""
356 "name": "ONAPvCPEPolicyModel_KeyInfo",
361 "name": "ONAPvCPEPolicyModel_KeyInfo",
364 "UUID": "87a9d6da-7d4b-3041-8a70-49442750d590",
365 "description": "Generated description for concept referred to by key \"ONAPvCPEPolicyModel_KeyInfo:0.0.1\""
370 "name": "ONAPvCPEPolicyModel_Policies",
375 "name": "ONAPvCPEPolicyModel_Policies",
378 "UUID": "6220cca4-66f5-3d1b-9f19-688a9b4b70f5",
379 "description": "Generated description for concept referred to by key \"ONAPvCPEPolicyModel_Policies:0.0.1\""
384 "name": "ONAPvCPEPolicyModel_Schemas",
389 "name": "ONAPvCPEPolicyModel_Schemas",
392 "UUID": "3df4eef8-e764-3398-afe9-86730e20905a",
393 "description": "Generated description for concept referred to by key \"ONAPvCPEPolicyModel_Schemas:0.0.1\""
398 "name": "ONAPvCPEPolicyModel_Tasks",
403 "name": "ONAPvCPEPolicyModel_Tasks",
406 "UUID": "1781b875-a3e8-3407-98bd-ba9580cfc543",
407 "description": "Generated description for concept referred to by key \"ONAPvCPEPolicyModel_Tasks:0.0.1\""
412 "name": "ReceiveEventPolicy",
417 "name": "ReceiveEventPolicy",
420 "UUID": "568b7345-9de1-36d3-b6a3-9b857e6809a1",
421 "description": "Generated description for concept referred to by key \"ReceiveEventPolicy:0.0.1\""
426 "name": "RequestIDVNFIDAlbum",
431 "name": "RequestIDVNFIDAlbum",
434 "UUID": "5d8e8298-ded6-30a5-9825-48111dc17a58",
435 "description": "Generated description for concept referred to by key \"RequestIDVNFIDAlbum:0.0.1\""
440 "name": "RestartAPPCRequestPolicy",
445 "name": "RestartAPPCRequestPolicy",
448 "UUID": "33d02162-314b-352b-b8b9-2862e8883894",
449 "description": "Generated description for concept referred to by key \"RestartAPPCRequestPolicy:0.0.1\""
454 "name": "RestartAPPCResponsePolicy",
459 "name": "RestartAPPCResponsePolicy",
462 "UUID": "ef4fcbd2-1609-377c-9875-8d27f7a901df",
463 "description": "Generated description for concept referred to by key \"RestartAPPCResponsePolicy:0.0.1\""
468 "name": "SimpleBooleanType",
473 "name": "SimpleBooleanType",
476 "UUID": "7218fb2f-59e3-321d-9ae1-bc97b19eb4ae",
477 "description": "Generated description for concept referred to by key \"SimpleBooleanType:0.0.1\""
482 "name": "SimpleLongType",
487 "name": "SimpleLongType",
490 "UUID": "2dfcd9ec-a6f9-3f9f-958f-9b36cf4ac574",
491 "description": "Generated description for concept referred to by key \"SimpleLongType:0.0.1\""
496 "name": "SimpleStringType",
501 "name": "SimpleStringType",
504 "UUID": "8a4957cf-9493-3a76-8c22-a208e23259af",
505 "description": "Generated description for concept referred to by key \"SimpleStringType:0.0.1\""
518 "UUID": "6a8cc68e-dfc8-3403-9c6d-071c886b319c",
519 "description": "Generated description for concept referred to by key \"UUIDType:0.0.1\""
524 "name": "VCPEClosedLoopStatusAlbum",
529 "name": "VCPEClosedLoopStatusAlbum",
532 "UUID": "47a4403e-3074-3964-83ef-93eefaffd192",
533 "description": "Generated description for concept referred to by key \"VCPEClosedLoopStatusAlbum:0.0.1\""
538 "name": "VCPEClosedLoopStatusType",
543 "name": "VCPEClosedLoopStatusType",
546 "UUID": "6e7dced1-53f1-39e2-b4e6-412b75d5b9e6",
547 "description": "Generated description for concept referred to by key \"VCPEClosedLoopStatusType:0.0.1\""
552 "name": "VCPEStateUpdatedEvent",
557 "name": "VCPEStateUpdatedEvent",
560 "UUID": "5e56a3fd-f82a-3ced-821b-b9fbaf65d367",
561 "description": "Generated description for concept referred to by key \"VCPEStateUpdatedEvent:0.0.1\""
566 "name": "VirtualControlLoopEventType",
571 "name": "VirtualControlLoopEventType",
574 "UUID": "15aca887-8f6c-3713-8114-0f49f03adab7",
575 "description": "Generated description for concept referred to by key \"VirtualControlLoopEventType:0.0.1\""
580 "name": "VirtualControlLoopNotificationType",
585 "name": "VirtualControlLoopNotificationType",
588 "UUID": "283f5b0d-d8cd-31b0-91fa-89b9de2e1fda",
589 "description": "Generated description for concept referred to by key \"VirtualControlLoopNotificationType:0.0.1\""
597 "name": "ONAPvCPEPolicyModel_Policies",
604 "name": "ReceiveEventPolicy",
609 "name": "ReceiveEventPolicy",
612 "template": "Freestyle",
616 "key": "AbatedState",
619 "parentKeyName": "ReceiveEventPolicy",
620 "parentKeyVersion": "0.0.1",
621 "parentLocalName": "NULL",
622 "localName": "AbatedState"
625 "name": "VCPEStateUpdatedEvent",
631 "key": "AbatedOutput",
634 "parentKeyName": "ReceiveEventPolicy",
635 "parentKeyVersion": "0.0.1",
636 "parentLocalName": "AbatedState",
637 "localName": "AbatedOutput"
640 "name": "ControlLoopLogEvent",
644 "parentKeyName": "NULL",
645 "parentKeyVersion": "0.0.0",
646 "parentLocalName": "NULL",
653 "contextAlbumReference": [],
654 "taskSelectionLogic": {
656 "logicFlavour": "UNDEFINED",
659 "stateFinalizerLogicMap": {
663 "name": "ControlLoopLogTask",
670 "name": "ControlLoopLogTask",
675 "parentKeyName": "ReceiveEventPolicy",
676 "parentKeyVersion": "0.0.1",
677 "parentLocalName": "AbatedState",
678 "localName": "ReceiveEventPolicy"
680 "outputType": "DIRECT",
682 "parentKeyName": "ReceiveEventPolicy",
683 "parentKeyVersion": "0.0.1",
684 "parentLocalName": "AbatedState",
685 "localName": "AbatedOutput"
694 "key": "GetVCPEState",
697 "parentKeyName": "ReceiveEventPolicy",
698 "parentKeyVersion": "0.0.1",
699 "parentLocalName": "NULL",
700 "localName": "GetVCPEState"
703 "name": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
709 "key": "GetVCPEStateOutput",
712 "parentKeyName": "ReceiveEventPolicy",
713 "parentKeyVersion": "0.0.1",
714 "parentLocalName": "GetVCPEState",
715 "localName": "GetVCPEStateOutput"
718 "name": "VCPEStateUpdatedEvent",
722 "parentKeyName": "ReceiveEventPolicy",
723 "parentKeyVersion": "0.0.1",
724 "parentLocalName": "NULL",
725 "localName": "RequestAAIState"
731 "contextAlbumReference": [],
732 "taskSelectionLogic": {
734 "logicFlavour": "UNDEFINED",
737 "stateFinalizerLogicMap": {
741 "name": "GetVCPEStateTask",
748 "name": "GetVCPEStateTask",
753 "parentKeyName": "ReceiveEventPolicy",
754 "parentKeyVersion": "0.0.1",
755 "parentLocalName": "GetVCPEState",
756 "localName": "ReceiveEventPolicy"
758 "outputType": "DIRECT",
760 "parentKeyName": "ReceiveEventPolicy",
761 "parentKeyVersion": "0.0.1",
762 "parentLocalName": "GetVCPEState",
763 "localName": "GetVCPEStateOutput"
772 "key": "OnsetOrAbatedState",
775 "parentKeyName": "ReceiveEventPolicy",
776 "parentKeyVersion": "0.0.1",
777 "parentLocalName": "NULL",
778 "localName": "OnsetOrAbatedState"
781 "name": "VCPEStateUpdatedEvent",
787 "key": "AbatedOutput",
790 "parentKeyName": "ReceiveEventPolicy",
791 "parentKeyVersion": "0.0.1",
792 "parentLocalName": "OnsetOrAbatedState",
793 "localName": "AbatedOutput"
796 "name": "VCPEStateUpdatedEvent",
800 "parentKeyName": "ReceiveEventPolicy",
801 "parentKeyVersion": "0.0.1",
802 "parentLocalName": "NULL",
803 "localName": "AbatedState"
808 "key": "OnsetOutput",
811 "parentKeyName": "ReceiveEventPolicy",
812 "parentKeyVersion": "0.0.1",
813 "parentLocalName": "OnsetOrAbatedState",
814 "localName": "OnsetOutput"
817 "name": "GuardRequestEvent",
821 "parentKeyName": "NULL",
822 "parentKeyVersion": "0.0.0",
823 "parentLocalName": "NULL",
830 "contextAlbumReference": [
832 "name": "VCPEClosedLoopStatusAlbum",
836 "taskSelectionLogic": {
837 "key": "TaskSelectionLogic",
838 "logicFlavour": "JAVASCRIPT",
839 "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar returnValue = true;\nvar status = null;\n\nif( executor.inFields.get(\"vnfID\") == null) {\n executor.logger.info(\"OnsetOrAbatedStateTSL: vnfID is null\");\n var vnfName = executor.inFields.get(\"vnfName\");\n var vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n executor.inFields.get(\"vnfName\"));\n status = vcpeClosedLoopStatus.get(\"closedLoopEventStatus\").toString();\n} else {\n var vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n executor.inFields.get(\"vnfID\").toString());\n status = vcpeClosedLoopStatus.get(\"closedLoopEventStatus\").toString();\n}\n\nif (status == \"ONSET\") {\n executor.subject.getTaskKey(\"GuardRequestTask\").copyTo(executor.selectedTask);\n} else if (status == \"ABATED\") {\n executor.subject.getTaskKey(\"AbatedTask\").copyTo(executor.selectedTask);\n onsetFlag = executor.isFalse;\n} else {\n executor.message = \"closedLoopEventStatus is \\\"\" + status + \"\\\", it must be either \\\"ONSET\\\" or \\\"ABATED\\\"\";\n returnValue = false;\n}\n\nexecutor.logger.info(\"ReceiveEventPolicyOnsetOrAbatedStateTSL State Selected Task:\" + executor.selectedTask);\n\nreturnValue;"
841 "stateFinalizerLogicMap": {
845 "name": "AbatedTask",
852 "name": "AbatedTask",
857 "parentKeyName": "ReceiveEventPolicy",
858 "parentKeyVersion": "0.0.1",
859 "parentLocalName": "OnsetOrAbatedState",
860 "localName": "ReceiveEventPolicy"
862 "outputType": "DIRECT",
864 "parentKeyName": "ReceiveEventPolicy",
865 "parentKeyVersion": "0.0.1",
866 "parentLocalName": "OnsetOrAbatedState",
867 "localName": "AbatedOutput"
873 "name": "GuardRequestTask",
878 "parentKeyName": "ReceiveEventPolicy",
879 "parentKeyVersion": "0.0.1",
880 "parentLocalName": "OnsetOrAbatedState",
881 "localName": "ReceiveEventPolicy"
883 "outputType": "DIRECT",
885 "parentKeyName": "ReceiveEventPolicy",
886 "parentKeyVersion": "0.0.1",
887 "parentLocalName": "OnsetOrAbatedState",
888 "localName": "OnsetOutput"
897 "key": "RequestAAIState",
900 "parentKeyName": "ReceiveEventPolicy",
901 "parentKeyVersion": "0.0.1",
902 "parentLocalName": "NULL",
903 "localName": "RequestAAIState"
906 "name": "VCPEStateUpdatedEvent",
912 "key": "RequestAAIStateOutput",
915 "parentKeyName": "ReceiveEventPolicy",
916 "parentKeyVersion": "0.0.1",
917 "parentLocalName": "RequestAAIState",
918 "localName": "RequestAAIStateOutput"
921 "name": "VCPEStateUpdatedEvent",
925 "parentKeyName": "ReceiveEventPolicy",
926 "parentKeyVersion": "0.0.1",
927 "parentLocalName": "NULL",
928 "localName": "OnsetOrAbatedState"
934 "contextAlbumReference": [
936 "name": "VCPEClosedLoopStatusAlbum",
940 "taskSelectionLogic": {
942 "logicFlavour": "UNDEFINED",
945 "stateFinalizerLogicMap": {
949 "name": "AAILookupTask",
956 "name": "AAILookupTask",
961 "parentKeyName": "ReceiveEventPolicy",
962 "parentKeyVersion": "0.0.1",
963 "parentLocalName": "RequestAAIState",
964 "localName": "ReceiveEventPolicy"
966 "outputType": "DIRECT",
968 "parentKeyName": "ReceiveEventPolicy",
969 "parentKeyVersion": "0.0.1",
970 "parentLocalName": "RequestAAIState",
971 "localName": "RequestAAIStateOutput"
981 "firstState": "GetVCPEState"
986 "name": "RestartAPPCRequestPolicy",
991 "name": "RestartAPPCRequestPolicy",
994 "template": "Freestyle",
998 "key": "DeniedState",
1001 "parentKeyName": "RestartAPPCRequestPolicy",
1002 "parentKeyVersion": "0.0.1",
1003 "parentLocalName": "NULL",
1004 "localName": "DeniedState"
1007 "name": "VCPEStateUpdatedEvent",
1013 "key": "DeniedOutput",
1016 "parentKeyName": "RestartAPPCRequestPolicy",
1017 "parentKeyVersion": "0.0.1",
1018 "parentLocalName": "DeniedState",
1019 "localName": "DeniedOutput"
1022 "name": "ControlLoopLogEvent",
1026 "parentKeyName": "NULL",
1027 "parentKeyVersion": "0.0.0",
1028 "parentLocalName": "NULL",
1035 "contextAlbumReference": [],
1036 "taskSelectionLogic": {
1038 "logicFlavour": "UNDEFINED",
1041 "stateFinalizerLogicMap": {
1045 "name": "ControlLoopLogTask",
1052 "name": "ControlLoopLogTask",
1057 "parentKeyName": "RestartAPPCRequestPolicy",
1058 "parentKeyVersion": "0.0.1",
1059 "parentLocalName": "DeniedState",
1060 "localName": "RestartAPPCRequestPolicy"
1062 "outputType": "DIRECT",
1064 "parentKeyName": "RestartAPPCRequestPolicy",
1065 "parentKeyVersion": "0.0.1",
1066 "parentLocalName": "DeniedState",
1067 "localName": "DeniedOutput"
1076 "key": "PermitOrDenyState",
1079 "parentKeyName": "RestartAPPCRequestPolicy",
1080 "parentKeyVersion": "0.0.1",
1081 "parentLocalName": "NULL",
1082 "localName": "PermitOrDenyState"
1085 "name": "VCPEStateUpdatedEvent",
1091 "key": "DenyOutput",
1094 "parentKeyName": "RestartAPPCRequestPolicy",
1095 "parentKeyVersion": "0.0.1",
1096 "parentLocalName": "PermitOrDenyState",
1097 "localName": "DenyOutput"
1100 "name": "VCPEStateUpdatedEvent",
1104 "parentKeyName": "RestartAPPCRequestPolicy",
1105 "parentKeyVersion": "0.0.1",
1106 "parentLocalName": "NULL",
1107 "localName": "DeniedState"
1112 "key": "PermitOutput",
1115 "parentKeyName": "RestartAPPCRequestPolicy",
1116 "parentKeyVersion": "0.0.1",
1117 "parentLocalName": "PermitOrDenyState",
1118 "localName": "PermitOutput"
1121 "name": "APPCRestartVNFRequestEvent",
1125 "parentKeyName": "NULL",
1126 "parentKeyVersion": "0.0.0",
1127 "parentLocalName": "NULL",
1134 "contextAlbumReference": [
1136 "name": "VCPEClosedLoopStatusAlbum",
1140 "taskSelectionLogic": {
1141 "key": "TaskSelectionLogic",
1142 "logicFlavour": "JAVASCRIPT",
1143 "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n executor.inFields.get(\"vnfID\").toString());\n\nvar guardResult = vcpeClosedLoopStatus.get(\"notification\");\n\nif (guardResult == \"OPERATION: GUARD_PERMIT\") {\n executor.subject.getTaskKey(\"APPCRestartVNFRequestTask\").copyTo(executor.selectedTask);\n} else {\n executor.subject.getTaskKey(\"DeniedTask\").copyTo(executor.selectedTask);\n}\n\nexecutor.logger.info(\"RestartAPPCRequestPolicyPermitOrDenyTSL State Selected Task:\" + executor.selectedTask);\n\ntrue;"
1145 "stateFinalizerLogicMap": {
1149 "name": "DeniedTask",
1156 "name": "APPCRestartVNFRequestTask",
1161 "parentKeyName": "RestartAPPCRequestPolicy",
1162 "parentKeyVersion": "0.0.1",
1163 "parentLocalName": "PermitOrDenyState",
1164 "localName": "RestartAPPCRequestPolicy"
1166 "outputType": "DIRECT",
1168 "parentKeyName": "RestartAPPCRequestPolicy",
1169 "parentKeyVersion": "0.0.1",
1170 "parentLocalName": "PermitOrDenyState",
1171 "localName": "PermitOutput"
1177 "name": "DeniedTask",
1182 "parentKeyName": "RestartAPPCRequestPolicy",
1183 "parentKeyVersion": "0.0.1",
1184 "parentLocalName": "PermitOrDenyState",
1185 "localName": "RestartAPPCRequestPolicy"
1187 "outputType": "DIRECT",
1189 "parentKeyName": "RestartAPPCRequestPolicy",
1190 "parentKeyVersion": "0.0.1",
1191 "parentLocalName": "PermitOrDenyState",
1192 "localName": "DenyOutput"
1201 "key": "PolicyGuardResponseState",
1204 "parentKeyName": "RestartAPPCRequestPolicy",
1205 "parentKeyVersion": "0.0.1",
1206 "parentLocalName": "NULL",
1207 "localName": "PolicyGuardResponseState"
1210 "name": "GuardResponseEvent",
1216 "key": "GuardResponseOutput",
1219 "parentKeyName": "RestartAPPCRequestPolicy",
1220 "parentKeyVersion": "0.0.1",
1221 "parentLocalName": "PolicyGuardResponseState",
1222 "localName": "GuardResponseOutput"
1225 "name": "VCPEStateUpdatedEvent",
1229 "parentKeyName": "RestartAPPCRequestPolicy",
1230 "parentKeyVersion": "0.0.1",
1231 "parentLocalName": "NULL",
1232 "localName": "PermitOrDenyState"
1238 "contextAlbumReference": [],
1239 "taskSelectionLogic": {
1241 "logicFlavour": "UNDEFINED",
1244 "stateFinalizerLogicMap": {
1248 "name": "GuardResponseTask",
1255 "name": "GuardResponseTask",
1260 "parentKeyName": "RestartAPPCRequestPolicy",
1261 "parentKeyVersion": "0.0.1",
1262 "parentLocalName": "PolicyGuardResponseState",
1263 "localName": "RestartAPPCRequestPolicy"
1265 "outputType": "DIRECT",
1267 "parentKeyName": "RestartAPPCRequestPolicy",
1268 "parentKeyVersion": "0.0.1",
1269 "parentLocalName": "PolicyGuardResponseState",
1270 "localName": "GuardResponseOutput"
1280 "firstState": "PolicyGuardResponseState"
1285 "name": "RestartAPPCResponsePolicy",
1290 "name": "RestartAPPCResponsePolicy",
1293 "template": "Freestyle",
1297 "key": "ResponseLogState",
1300 "parentKeyName": "RestartAPPCResponsePolicy",
1301 "parentKeyVersion": "0.0.1",
1302 "parentLocalName": "NULL",
1303 "localName": "ResponseLogState"
1306 "name": "VCPEStateUpdatedEvent",
1312 "key": "ResponseLogOutput",
1315 "parentKeyName": "RestartAPPCResponsePolicy",
1316 "parentKeyVersion": "0.0.1",
1317 "parentLocalName": "ResponseLogState",
1318 "localName": "ResponseLogOutput"
1321 "name": "ControlLoopLogEvent",
1325 "parentKeyName": "NULL",
1326 "parentKeyVersion": "0.0.0",
1327 "parentLocalName": "NULL",
1334 "contextAlbumReference": [],
1335 "taskSelectionLogic": {
1337 "logicFlavour": "UNDEFINED",
1340 "stateFinalizerLogicMap": {
1344 "name": "ControlLoopLogTask",
1351 "name": "ControlLoopLogTask",
1356 "parentKeyName": "RestartAPPCResponsePolicy",
1357 "parentKeyVersion": "0.0.1",
1358 "parentLocalName": "ResponseLogState",
1359 "localName": "RestartAPPCResponsePolicy"
1361 "outputType": "DIRECT",
1363 "parentKeyName": "RestartAPPCResponsePolicy",
1364 "parentKeyVersion": "0.0.1",
1365 "parentLocalName": "ResponseLogState",
1366 "localName": "ResponseLogOutput"
1375 "key": "RestartAPPCResponseState",
1378 "parentKeyName": "RestartAPPCResponsePolicy",
1379 "parentKeyVersion": "0.0.1",
1380 "parentLocalName": "NULL",
1381 "localName": "RestartAPPCResponseState"
1384 "name": "APPCRestartVNFResponseEvent",
1390 "key": "APPCRestartVNFResponseOutput",
1393 "parentKeyName": "RestartAPPCResponsePolicy",
1394 "parentKeyVersion": "0.0.1",
1395 "parentLocalName": "RestartAPPCResponseState",
1396 "localName": "APPCRestartVNFResponseOutput"
1399 "name": "VCPEStateUpdatedEvent",
1403 "parentKeyName": "RestartAPPCResponsePolicy",
1404 "parentKeyVersion": "0.0.1",
1405 "parentLocalName": "NULL",
1406 "localName": "ResponseLogState"
1412 "contextAlbumReference": [],
1413 "taskSelectionLogic": {
1415 "logicFlavour": "UNDEFINED",
1418 "stateFinalizerLogicMap": {
1422 "name": "APPCRestartVNFResponseTask",
1429 "name": "APPCRestartVNFResponseTask",
1434 "parentKeyName": "RestartAPPCResponsePolicy",
1435 "parentKeyVersion": "0.0.1",
1436 "parentLocalName": "RestartAPPCResponseState",
1437 "localName": "RestartAPPCResponsePolicy"
1439 "outputType": "DIRECT",
1441 "parentKeyName": "RestartAPPCResponsePolicy",
1442 "parentKeyVersion": "0.0.1",
1443 "parentLocalName": "RestartAPPCResponseState",
1444 "localName": "APPCRestartVNFResponseOutput"
1454 "firstState": "RestartAPPCResponseState"
1462 "name": "ONAPvCPEPolicyModel_Tasks",
1469 "name": "AAILookupTask",
1474 "name": "AAILookupTask",
1532 "contextAlbumReference": [
1534 "name": "VCPEClosedLoopStatusAlbum",
1540 "logicFlavour": "JAVASCRIPT",
1541 "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n executor.inFields.get(\"vnfID\").toString());\n\nexecutor.logger.info(\"Executing A&AI Lookup\");\nexecutor.logger.info(vcpeClosedLoopStatus);\n\nvar aaiInfo = vcpeClosedLoopStatus.get(\"AAI\");\nvar returnValue = true;\n\nif (aaiInfo.get(\"vserverName\") == null) {\n executor.message = \"the field vserver.vserver-name must exist in the onset control loop event\";\n executor.logger.warn(executor.message);\n returnValue = false;\n}\nelse if (aaiInfo.get(\"genericVnfVnfId\") == null && aaiInfo.get(\"genericVnfVnfName\") == null) {\n executor.message = \"either the field generic-vnf.vnf-id or generic-vnf.vnf-name must exist\"\n + \" in the onset control loop event\";\n executor.logger.warn(executor.message);\n returnValue = false;\n}\nelse {\n var restManager = new org.onap.policy.rest.RestManager;\n var aaiManager = new org.onap.policy.aai.AaiManager(restManager);\n\n // We need to instantiate the type in order to trigger the static JAXB handling\n // in the AaiCqResponse class\n var aaiCqResponseType = org.onap.policy.aai.AaiCqResponse;\n\n var aaiResponse = aaiManager.getCustomQueryResponse(\n \"http://localhost:54321/OnapVCpeSim/sim\",\n \"aai.username\",\n \"aai.password\",\n executor.inFields.get(\"requestID\"),\n vcpeClosedLoopStatus.get(\"AAI\").get(\"vserverName\")\n );\n\n var genericVnf;\n\n if (aaiInfo.get(\"genericVnfVnfId\") != null) {\n genericVnf = aaiResponse.getGenericVnfByModelInvariantId(aaiInfo.get(\"genericVnfVnfId\"));\n }\n else {\n genericVnf = aaiResponse.getGenericVnfByVnfName(aaiInfo.get(\"genericVnfVnfId\"));\n }\n\n aaiInfo.put(\"genericVnfResourceVersion\", genericVnf.getResourceVersion());\n aaiInfo.put(\"genericVnfVnfName\", genericVnf.getVnfName());\n aaiInfo.put(\"genericVnfProvStatus\", genericVnf.getProvStatus());\n aaiInfo.put(\"genericVnfIsClosedLoopDisabled\", genericVnf.isIsClosedLoopDisabled().toString());\n aaiInfo.put(\"genericVnfVnfType\", genericVnf.getVnfType());\n aaiInfo.put(\"genericVnfInMaint\", genericVnf.isInMaint().toString());\n aaiInfo.put(\"genericVnfServiceId\", genericVnf.getServiceId());\n aaiInfo.put(\"genericVnfVnfId\", genericVnf.getVnfId());\n aaiInfo.put(\"genericVnfOrchestrationStatus\",\n genericVnf.getVfModules().getVfModule().get(0).getOrchestrationStatus());\n\n executor.outFields.put(\"requestID\", executor.inFields.get(\"requestID\"));\n executor.outFields.put(\"vnfID\", executor.inFields.get(\"vnfID\"));\n\n executor.logger.info(executor.outFields);\n}\n\nreturnValue;"
1547 "name": "APPCRestartVNFRequestTask",
1552 "name": "APPCRestartVNFRequestTask",
1584 "key": "APPCLCMRequestEvent",
1586 "key": "APPCLCMRequestEvent",
1588 "name": "APPCLCMRequestType",
1599 "contextAlbumReference": [
1601 "name": "RequestIDVNFIDAlbum",
1605 "name": "VCPEClosedLoopStatusAlbum",
1611 "logicFlavour": "JAVASCRIPT",
1612 "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar appcRequest = new org.onap.policy.appclcm.AppcLcmDmaapWrapper;\nappcRequest.setBody(new org.onap.policy.appclcm.AppcLcmBody);\nappcRequest.getBody().setInput(new org.onap.policy.appclcm.AppcLcmInput);\nappcRequest.getBody().getInput().setCommonHeader(\n new org.onap.policy.appclcm.AppcLcmCommonHeader);\n\nappcRequest.setVersion(\"2.0.0\");\nappcRequest.setRpcName(\"restart\");\nappcRequest.setCorrelationId(executor.inFields.get(\"requestID\"));\nappcRequest.setType(\"request\");\n\nvar vcpeClosedLoopStatus = executor\n .getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n executor.inFields.get(\"vnfID\").toString());\n\nappcRequest.getBody().getInput().getCommonHeader().setTimeStamp(java.time.Instant.now());\nappcRequest.getBody().getInput().getCommonHeader().setApiVer(\"2.00\");\nappcRequest.getBody().getInput().getCommonHeader().setOriginatorId(\n executor.inFields.get(\"requestID\").toString());\nappcRequest.getBody().getInput().getCommonHeader().setRequestId(\n executor.inFields.get(\"requestID\"));\nappcRequest.getBody().getInput().getCommonHeader().setSubRequestId(\"1\");\nappcRequest.getBody().getInput().getCommonHeader().getFlags().put(\"ttl\", \"10000\");\nappcRequest.getBody().getInput().getCommonHeader().getFlags().put(\"force\", \"TRUE\");\nappcRequest.getBody().getInput().getCommonHeader().getFlags().put(\"mode\", \"EXCLUSIVE\");\n\nappcRequest.getBody().getInput().setAction(\"Restart\");\nappcRequest.getBody().getInput().setActionIdentifiers(new java.util.HashMap());\nappcRequest.getBody().getInput().getActionIdentifiers().put(\"vnf-id\",\n executor.inFields.get(\"vnfID\").toString());\n\nexecutor.getContextAlbum(\"RequestIDVNFIDAlbum\").put(\n executor.inFields.get(\"requestID\").toString(),\n executor.inFields.get(\"vnfID\"));\n\nvcpeClosedLoopStatus.put(\"notification\", \"OPERATION\");\nvcpeClosedLoopStatus.put(\"notificationTime\", java.lang.System\n .currentTimeMillis());\n\nexecutor.outFields.put(\"APPCLCMRequestEvent\", appcRequest);\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
1618 "name": "APPCRestartVNFResponseTask",
1623 "name": "APPCRestartVNFResponseTask",
1629 "key": "APPCLCMResponseEvent",
1631 "key": "APPCLCMResponseEvent",
1633 "name": "APPCLCMResponseType",
1670 "contextAlbumReference": [
1672 "name": "RequestIDVNFIDAlbum",
1676 "name": "VCPEClosedLoopStatusAlbum",
1682 "logicFlavour": "JAVASCRIPT",
1683 "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * APPC LCM Response code: 100 ACCEPTED\n * 200 ERROR UNEXPECTED ERROR means failure\n * 312 REJECTED DUPLICATE REQUEST\n * 400 SUCCESS\n *\n * Note: Sometimes the corelationId has a -1 at the tail, need to get rid of it when present.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar appcResponse = executor.inFields.get(\"APPCLCMResponseEvent\");\n\nvar requestIDString = appcResponse.getCorrelationId().substr(0, 36);\nexecutor.logger.info(\"requestIDString = \" + requestIDString);\nvar vnfID = executor.getContextAlbum(\"RequestIDVNFIDAlbum\")\n .get(requestIDString);\nexecutor.logger.info(\"Size of RequestIDVNFIDAlbum = \"\n + executor.getContextAlbum(\"RequestIDVNFIDAlbum\").size());\nexecutor.logger.info(\"vnfID = \" + vnfID);\n\nvar returnValue = true;\n\nif (vnfID != null) {\n var vcpeClosedLoopStatus = executor.getContextAlbum(\n \"VCPEClosedLoopStatusAlbum\").get(vnfID.toString());\n var requestId = java.util.UUID.fromString(vcpeClosedLoopStatus\n .get(\"requestID\"));\n\n vcpeClosedLoopStatus.put(\"notificationTime\", java.lang.System\n .currentTimeMillis());\n\n executor.logger.info(\"Got from APPC code: \"\n + org.onap.policy.appclcm.AppcLcmResponseCode\n .toResponseValue(appcResponse.getBody().getOutput()\n .getStatus().getCode()));\n\n if (org.onap.policy.appclcm.AppcLcmResponseCode\n .toResponseValue(appcResponse.getBody().getOutput().getStatus()\n .getCode()) == org.onap.policy.appclcm.AppcLcmResponseCode.SUCCESS) {\n vcpeClosedLoopStatus.put(\"notification\", \"OPERATION_SUCCESS\");\n vcpeClosedLoopStatus.put(\"message\", \"vCPE restarted\");\n executor.getContextAlbum(\"RequestIDVNFIDAlbum\").remove(requestIDString);\n } else if (org.onap.policy.appclcm.AppcLcmResponseCode\n .toResponseValue(appcResponse.getBody().getOutput().getStatus()\n .getCode()) == \"ACCEPTED\"\n || org.onap.policy.appclcm.AppcLcmResponseCode\n .toResponseValue(appcResponse.getBody().getOutput()\n .getStatus().getCode()) == \"REJECT\") {\n executor.logger\n .info(\"Got ACCEPTED 100 or REJECT 312, keep the context, wait for next response. Code is: \"\n + org.onap.policy.appclcm.AppcLcmResponseCode\n .toResponseValue(appcResponse.getBody()\n .getOutput().getStatus().getCode()));\n } else {\n executor.getContextAlbum(\"RequestIDVNFIDAlbum\").remove(requestIDString);\n vcpeClosedLoopStatus.put(\"notification\", \"OPERATION_FAILURE\");\n vcpeClosedLoopStatus.put(\"message\", \"vCPE restart failed\");\n }\n\n executor.outFields.put(\"requestID\", requestId);\n executor.outFields.put(\"vnfID\", vnfID);\n} else {\n executor.message = \"VNF ID not found in context album for request ID \"\n + requestIDString;\n returnValue = false\n}\n\nexecutor.logger.info(executor.outFields);\n\nreturnValue;"
1689 "name": "AbatedTask",
1694 "name": "AbatedTask",
1726 "name": "SimpleStringType",
1763 "name": "SimpleStringType",
1774 "contextAlbumReference": [
1776 "name": "VCPEClosedLoopStatusAlbum",
1782 "logicFlavour": "JAVASCRIPT",
1783 "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar vcpeClosedLoopStatus = null;\nif( executor.inFields.get(\"vnfID\") == null) {\n executor.logger.info(\"AbatedTask: vnfID is null\");\n var vnfName = executor.inFields.get(\"vnfName\");\n vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n executor.inFields.get(\"vnfName\"));\n} else {\n vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n executor.inFields.get(\"vnfID\").toString());\n}\n\nvcpeClosedLoopStatus.put(\"notification\", \"FINAL_SUCCESS\");\nvcpeClosedLoopStatus.put(\"notificationTime\", java.lang.System.currentTimeMillis());\nvcpeClosedLoopStatus.put(\"message\", \"situation has been abated\");\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
1789 "name": "ControlLoopLogTask",
1794 "name": "ControlLoopLogTask",
1826 "key": "VirtualControlLoopNotification",
1828 "key": "VirtualControlLoopNotification",
1830 "name": "VirtualControlLoopNotificationType",
1841 "contextAlbumReference": [
1843 "name": "VCPEClosedLoopStatusAlbum",
1849 "logicFlavour": "JAVASCRIPT",
1850 "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar vnfID = executor.inFields.get(\"vnfID\");\nif(vnfID == null) {\n vnfID = executor.inFields.get(\"vnfName\");\n}\nexecutor.logger.info(\"vnfID=\" + vnfID);\n\nvar vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(vnfID.toString());\n\nexecutor.logger.info(\"Logging context information for VNF \\\"\" + vnfID + \"\\\"\");\n\nvar clNotification = new org.onap.policy.controlloop.VirtualControlLoopNotification();\n\nclNotification.setClosedLoopControlName(vcpeClosedLoopStatus.get(\"closedLoopControlName\"));\nclNotification.setClosedLoopAlarmStart(java.time.Instant.ofEpochMilli(vcpeClosedLoopStatus.get(\"closedLoopAlarmStart\")));\nclNotification.setClosedLoopAlarmEnd(java.time.Instant.ofEpochMilli(vcpeClosedLoopStatus.get(\"closedLoopAlarmEnd\")));\nclNotification.setClosedLoopEventClient(vcpeClosedLoopStatus.get(\"closedLoopEventClient\"));\nclNotification.setVersion(vcpeClosedLoopStatus.get(\"version\"));\nclNotification.setRequestId(java.util.UUID.fromString(vcpeClosedLoopStatus.get(\"requestID\")));\nclNotification.setTargetType(vcpeClosedLoopStatus.get(\"target_type\"));\nclNotification.setTarget(vcpeClosedLoopStatus.get(\"target\"));\nclNotification.setFrom(vcpeClosedLoopStatus.get(\"from\"));\nclNotification.setPolicyScope(vcpeClosedLoopStatus.get(\"policyScope\"));\nclNotification.setPolicyName(vcpeClosedLoopStatus.get(\"policyName\"));\nclNotification.setPolicyVersion(vcpeClosedLoopStatus.get(\"policyVersion\"));\nclNotification.setNotification(org.onap.policy.controlloop.ControlLoopNotificationType.toType(vcpeClosedLoopStatus.get(\"notification\")));\nclNotification.setMessage(vcpeClosedLoopStatus.get(\"message\"));\n\nvar notificationInstant = java.time.Instant.ofEpochSecond(vcpeClosedLoopStatus.get(\"notificationTime\"));\nvar notificationTime = java.time.ZonedDateTime.ofInstant(notificationInstant, java.time.ZoneOffset.UTC);\nclNotification.setNotificationTime(notificationTime);\n\nvar aaiInfo = vcpeClosedLoopStatus.get(\"AAI\");\n\nclNotification.getAai().put(\"generic-vnf.resource-version\", aaiInfo.get(\"genericVnfResourceVersion\"));\nclNotification.getAai().put(\"generic-vnf.vnf-name\", aaiInfo.get(\"genericVnfVnfName\"));\nclNotification.getAai().put(\"generic-vnf.prov-status\", aaiInfo.get(\"genericVnfProvStatus\"));\nclNotification.getAai().put(\"generic-vnf.is-closed-loop-disabled\", aaiInfo.get(\"genericVnfIsClosedLoopDisabled\"));\nclNotification.getAai().put(\"generic-vnf.orchestration-status\", aaiInfo.get(\"genericVnfOrchestrationStatus\"));\nclNotification.getAai().put(\"generic-vnf.vnf-type\", aaiInfo.get(\"genericVnfVnfType\"));\nclNotification.getAai().put(\"generic-vnf.in-maint\", aaiInfo.get(\"genericVnfInMaint\"));\nclNotification.getAai().put(\"generic-vnf.service-id\", aaiInfo.get(\"genericVnfServiceId\"));\n\nif(vnfID != null) {\n clNotification.getAai().put(\"generic-vnf.vnf-id\", aaiInfo.get(\"genericVnfVnfId\"));\n}\nexecutor.outFields.put(\"VirtualControlLoopNotification\", clNotification);\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
1856 "name": "DeniedTask",
1861 "name": "DeniedTask",
1919 "contextAlbumReference": [
1921 "name": "VCPEClosedLoopStatusAlbum",
1927 "logicFlavour": "JAVASCRIPT",
1928 "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n executor.inFields.get(\"vnfID\").toString());\n\nvcpeClosedLoopStatus.put(\"notification\", \"REJECTED\");\nvcpeClosedLoopStatus.put(\"notificationTime\", java.lang.System.currentTimeMillis());\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
1934 "name": "GetVCPEStateTask",
1939 "name": "GetVCPEStateTask",
1945 "key": "VirtualControlLoopEvent",
1947 "key": "VirtualControlLoopEvent",
1949 "name": "VirtualControlLoopEventType",
1986 "name": "SimpleStringType",
1997 "contextAlbumReference": [
1999 "name": "RequestIDVNFIDAlbum",
2003 "name": "VCPEClosedLoopStatusAlbum",
2009 "logicFlavour": "JAVASCRIPT",
2010 "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Note: The incoming closedloop message can be ONSET with both VNF-name and VNF-ID\n * or ABATED with only VNF-name. So need to handle differently. For ABATED case,\n * since we still keep the RequireIDVNFID context album, we can get it from there.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar clEventType = org.onap.policy.controlloop.VirtualControlLoopEvent;\nvar longType = java.lang.Long;\nvar uuidType = java.util.UUID;\n\nvar clEvent = executor.inFields.get(\"VirtualControlLoopEvent\");\n\nexecutor.logger.info(clEvent.toString());\nexecutor.logger.info(clEvent.getClosedLoopControlName());\n\nvar requestID = clEvent.getRequestId();\nexecutor.logger.info(\"requestID = \" + requestID);\nvar vnfID = null;\nvar vcpeClosedLoopStatus = null;\n\nif (clEvent.getAai().get(\"generic-vnf.vnf-id\") != null) {\n vnfID = uuidType.fromString(clEvent.getAai().get(\"generic-vnf.vnf-id\"));\n executor.logger.info(\"vnfID = \" + vnfID);\n vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(vnfID);\n\n if (vcpeClosedLoopStatus == null) {\n executor.logger.info(\"Creating context information for new vCPE VNF \\\"\" + vnfID.toString() + \"\\\"\");\n\n vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").getSchemaHelper().createNewInstance();\n\n vcpeClosedLoopStatus.put(\"closedLoopControlName\", clEvent.getClosedLoopControlName());\n vcpeClosedLoopStatus.put(\"closedLoopAlarmStart\", clEvent.getClosedLoopAlarmStart().toEpochMilli());\n vcpeClosedLoopStatus.put(\"closedLoopEventClient\", clEvent.getClosedLoopEventClient());\n vcpeClosedLoopStatus.put(\"closedLoopEventStatus\", clEvent.getClosedLoopEventStatus().toString());\n vcpeClosedLoopStatus.put(\"version\", clEvent.getVersion());\n vcpeClosedLoopStatus.put(\"requestID\", clEvent.getRequestId().toString());\n vcpeClosedLoopStatus.put(\"target_type\", clEvent.getTargetType().toString());\n vcpeClosedLoopStatus.put(\"target\", clEvent.getTarget());\n vcpeClosedLoopStatus.put(\"from\", clEvent.getFrom());\n vcpeClosedLoopStatus.put(\"policyScope\", \"vCPE\");\n vcpeClosedLoopStatus.put(\"policyName\", \"ONAPvCPEPolicyModel\");\n vcpeClosedLoopStatus.put(\"policyVersion\", \"0.0.1\");\n vcpeClosedLoopStatus.put(\"notification\", \"ACTIVE\");\n vcpeClosedLoopStatus.put(\"notificationTime\", java.lang.System.currentTimeMillis());\n vcpeClosedLoopStatus.put(\"message\", \"\");\n\n var aaiInfo = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").getSchemaHelper().createNewSubInstance(\"VCPE_AAI_Type\");\n\n aaiInfo.put(\"genericVnfResourceVersion\", clEvent.getAai().get(\"generic-vnf.resource-version\"));\n aaiInfo.put(\"genericVnfVnfName\", clEvent.getAai().get(\"generic-vnf.vnf-name\"));\n aaiInfo.put(\"genericVnfProvStatus\", clEvent.getAai().get(\"generic-vnf.prov-status\"));\n aaiInfo.put(\"genericVnfIsClosedLoopDisabled\", clEvent.getAai().get(\"generic-vnf.is-closed-loop-disabled\"));\n aaiInfo.put(\"genericVnfOrchestrationStatus\", clEvent.getAai().get(\"generic-vnf.orchestration-status\"));\n aaiInfo.put(\"genericVnfVnfType\", clEvent.getAai().get(\"generic-vnf.vnf-type\"));\n aaiInfo.put(\"genericVnfInMaint\", clEvent.getAai().get(\"generic-vnf.in-maint\"));\n aaiInfo.put(\"genericVnfServiceId\", clEvent.getAai().get(\"generic-vnf.service-id\"));\n aaiInfo.put(\"genericVnfVnfId\", clEvent.getAai().get(\"generic-vnf.vnf-id\"));\n aaiInfo.put(\"vserverIsClosedLoopDisabled\", clEvent.getAai().get(\"vserver.is-closed-loop-disabled\"));\n aaiInfo.put(\"vserverProvStatus\", clEvent.getAai().get(\"vserver.prov-status\"));\n aaiInfo.put(\"vserverName\", clEvent.getAai().get(\"vserver.vserver-name\"));\n\n vcpeClosedLoopStatus.put(\"AAI\", aaiInfo);\n\n if (clEvent.getClosedLoopAlarmEnd() != null) {\n vcpeClosedLoopStatus.put(\"closedLoopAlarmEnd\", clEvent.getClosedLoopAlarmEnd().toEpochMilli());\n } else {\n vcpeClosedLoopStatus.put(\"closedLoopAlarmEnd\", java.lang.Long.valueOf(0));\n }\n\n executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").put(vnfID.toString(), vcpeClosedLoopStatus);\n\n executor.logger.info(\"Created context information for new vCPE VNF \\\"\" + vnfID.toString() + \"\\\"\");\n }\n\n executor.outFields.put(\"requestID\", requestID);\n executor.outFields.put(\"vnfID\", vnfID);\n\n executor.logger.info(executor.outFields);\n}\nelse {\n executor.logger.info(\"No vnf-id in VirtualControlLoopEvent, status:\" + clEvent.getClosedLoopEventStatus().toString());\n var vnfName = clEvent.getAai().get(\"generic-vnf.vnf-name\");\n executor.logger.info(\"No vnf-id in VirtualControlLoopEvent for \" + vnfName);\n\n vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(vnfName.toString());\n\n if (vcpeClosedLoopStatus == null) {\n executor.logger.info(\"Creating context information for new vCPE VNF \\\"\" + vnfName.toString() + \"\\\"\");\n\n vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").getSchemaHelper().createNewInstance();\n\n vcpeClosedLoopStatus.put(\"closedLoopControlName\", clEvent.getClosedLoopControlName());\n vcpeClosedLoopStatus.put(\"closedLoopAlarmStart\", clEvent.getClosedLoopAlarmStart().toEpochMilli());\n vcpeClosedLoopStatus.put(\"closedLoopEventClient\", clEvent.getClosedLoopEventClient());\n vcpeClosedLoopStatus.put(\"closedLoopEventStatus\", clEvent.getClosedLoopEventStatus().toString());\n vcpeClosedLoopStatus.put(\"version\", clEvent.getVersion());\n vcpeClosedLoopStatus.put(\"requestID\", clEvent.getRequestId().toString());\n vcpeClosedLoopStatus.put(\"target_type\", clEvent.getTargetType().toString());\n vcpeClosedLoopStatus.put(\"target\", clEvent.getTarget());\n vcpeClosedLoopStatus.put(\"from\", clEvent.getFrom());\n vcpeClosedLoopStatus.put(\"policyScope\", \"vCPE\");\n vcpeClosedLoopStatus.put(\"policyName\", \"ONAPvCPEPolicyModel\");\n vcpeClosedLoopStatus.put(\"policyVersion\", \"0.0.1\");\n vcpeClosedLoopStatus.put(\"notification\", \"ACTIVE\");\n vcpeClosedLoopStatus.put(\"notificationTime\", java.lang.System.currentTimeMillis());\n vcpeClosedLoopStatus.put(\"message\", \"\");\n\n var aaiInfo = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").getSchemaHelper().createNewSubInstance(\"VCPE_AAI_Type\");\n\n aaiInfo.put(\"genericVnfVnfName\", clEvent.getAai().get(\"generic-vnf.vnf-name\"));\n vcpeClosedLoopStatus.put(\"AAI\", aaiInfo);\n\n if (clEvent.getClosedLoopAlarmEnd() != null) {\n vcpeClosedLoopStatus.put(\"closedLoopAlarmEnd\", clEvent.getClosedLoopAlarmEnd().toEpochMilli());\n } else {\n vcpeClosedLoopStatus.put(\"closedLoopAlarmEnd\", java.lang.Long.valueOf(0));\n }\n\n executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").put(vnfName.toString(), vcpeClosedLoopStatus);\n\n executor.logger.info(\"Created context information for new vCPE VNF \\\"\" + vnfName.toString() + \"\\\"\");\n }\n executor.outFields.put(\"requestID\", requestID);\n executor.outFields.put(\"vnfName\", vnfName);\n executor.logger.info(executor.outFields);\n}\n\ntrue;"
2016 "name": "GuardRequestTask",
2021 "name": "GuardRequestTask",
2053 "key": "decisionAttributes",
2055 "key": "decisionAttributes",
2057 "name": "GuardDecisionAttributesType",
2068 "name": "SimpleStringType",
2079 "contextAlbumReference": [
2081 "name": "ControlLoopExecutionIDAlbum",
2085 "name": "VCPEClosedLoopStatusAlbum",
2091 "logicFlavour": "JAVASCRIPT",
2092 "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n executor.inFields.get(\"vnfID\").toString());\n\nvar guardDecisionAttributes = executor.subject.getOutFieldSchemaHelper(\"decisionAttributes\").createNewInstance();\n\nguardDecisionAttributes.put(\"actor\", \"APPC\");\nguardDecisionAttributes.put(\"recipe\", \"Restart\");\nguardDecisionAttributes.put(\"target\", executor.inFields.get(\"vnfID\").toString());\nguardDecisionAttributes.put(\"clname\", \"APEXvCPEImplementation\");\n\nexecutor.logger.info(guardDecisionAttributes);\n\nexecutor.outFields.put(\"decisionAttributes\", guardDecisionAttributes);\nexecutor.outFields.put(\"onapName\", \"PDPD\");\n\nexecutor.getContextAlbum(\"ControlLoopExecutionIDAlbum\").put(executor.executionId.toString(),\n executor.inFields.get(\"vnfID\"));\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
2098 "name": "GuardResponseTask",
2103 "name": "GuardResponseTask",
2113 "name": "SimpleStringType",
2124 "name": "SimpleStringType",
2161 "contextAlbumReference": [
2163 "name": "ControlLoopExecutionIDAlbum",
2167 "name": "VCPEClosedLoopStatusAlbum",
2173 "logicFlavour": "JAVASCRIPT",
2174 "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar vnfID = executor.getContextAlbum(\"ControlLoopExecutionIDAlbum\").remove(executor.executionId.toString());\n\nexecutor.logger.info(\"Continuing execution with VNF ID: \" + vnfID);\n\nvar vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(vnfID.toString());\nexecutor.logger.info(vcpeClosedLoopStatus);\n\nvar guardResult = executor.inFields.get(\"decision\");\nvar returnValue = true;\n\nif (guardResult == \"PERMIT\") {\n vcpeClosedLoopStatus.put(\"notification\", \"OPERATION: GUARD_PERMIT\");\n} else if (guardResult == \"DENY\") {\n vcpeClosedLoopStatus.put(\"notification\", \"OPERATION: GUARD_DENY\");\n} else {\n executor.message = \"guard result must be either \\\"PERMIT\\\" or \\\"DENY\\\"\";\n returnValue = false;\n}\n\nvar uuidType = java.util.UUID;\nvar requestID = uuidType.fromString(vcpeClosedLoopStatus.get(\"requestID\"));\n\nexecutor.outFields.put(\"requestID\", requestID);\nexecutor.outFields.put(\"vnfID\", vnfID);\n\nexecutor.logger.info(executor.outFields);\n\n\nreturnValue;"
2180 "name": "NoAAILookupTask",
2185 "name": "NoAAILookupTask",
2243 "contextAlbumReference": [],
2246 "logicFlavour": "JAVASCRIPT",
2247 "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
2256 "name": "ONAPvCPEPolicyModel_Events",
2263 "name": "APPCRestartVNFRequestEvent",
2268 "name": "APPCRestartVNFRequestEvent",
2271 "nameSpace": "org.onap.policy.apex.onap.vcpe",
2277 "key": "APPCLCMRequestEvent",
2279 "key": "APPCLCMRequestEvent",
2281 "name": "APPCLCMRequestType",
2293 "name": "APPCRestartVNFResponseEvent",
2298 "name": "APPCRestartVNFResponseEvent",
2301 "nameSpace": "org.onap.policy.apex.onap.vcpe",
2307 "key": "APPCLCMResponseEvent",
2309 "key": "APPCLCMResponseEvent",
2311 "name": "APPCLCMResponseType",
2323 "name": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
2328 "name": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
2331 "nameSpace": "org.onap.policy.apex.onap.vcpe",
2337 "key": "VirtualControlLoopEvent",
2339 "key": "VirtualControlLoopEvent",
2341 "name": "VirtualControlLoopEventType",
2353 "name": "ControlLoopLogEvent",
2358 "name": "ControlLoopLogEvent",
2361 "nameSpace": "org.onap.policy.apex.onap.vcpe",
2367 "key": "VirtualControlLoopNotification",
2369 "key": "VirtualControlLoopNotification",
2371 "name": "VirtualControlLoopNotificationType",
2383 "name": "GuardRequestEvent",
2388 "name": "GuardRequestEvent",
2391 "nameSpace": "org.onap.policy.apex.onap.vcpe",
2397 "key": "decisionAttributes",
2399 "key": "decisionAttributes",
2401 "name": "GuardDecisionAttributesType",
2412 "name": "SimpleStringType",
2424 "name": "GuardResponseEvent",
2429 "name": "GuardResponseEvent",
2432 "nameSpace": "org.onap.policy.apex.onap.vcpe",
2442 "name": "SimpleStringType",
2453 "name": "SimpleStringType",
2465 "name": "VCPEStateUpdatedEvent",
2470 "name": "VCPEStateUpdatedEvent",
2473 "nameSpace": "org.onap.policy.apex.onap.vcpe",
2505 "name": "SimpleStringType",
2520 "name": "ONAPvCPEPolicyModel_Albums",
2527 "name": "ControlLoopExecutionIDAlbum",
2532 "name": "ControlLoopExecutionIDAlbum",
2545 "name": "RequestIDVNFIDAlbum",
2550 "name": "RequestIDVNFIDAlbum",
2563 "name": "VCPEClosedLoopStatusAlbum",
2568 "name": "VCPEClosedLoopStatusAlbum",
2574 "name": "VCPEClosedLoopStatusType",
2584 "name": "ONAPvCPEPolicyModel_Schemas",
2591 "name": "APPCLCMRequestType",
2596 "name": "APPCLCMRequestType",
2599 "schemaFlavour": "Java",
2600 "schemaDefinition": "org.onap.policy.appclcm.AppcLcmDmaapWrapper"
2605 "name": "APPCLCMResponseType",
2610 "name": "APPCLCMResponseType",
2613 "schemaFlavour": "Java",
2614 "schemaDefinition": "org.onap.policy.appclcm.AppcLcmDmaapWrapper"
2619 "name": "GuardDecisionAttributesType",
2624 "name": "GuardDecisionAttributesType",
2627 "schemaFlavour": "Avro",
2628 "schemaDefinition": "{\n \"type\": \"record\",\n \"name\": \"GuardDecisionAttributes_Type\",\n \"namespace\": \"org.onap.policy.apex.onap.vcpe\",\n \"fields\": [\n {\n \"name\": \"actor\",\n \"type\": \"string\"\n },\n {\n \"name\": \"recipe\",\n \"type\": \"string\"\n },\n {\n \"name\": \"target\",\n \"type\": \"string\"\n },\n {\n \"name\": \"clname\",\n \"type\": \"string\"\n }\n ]\n}"
2633 "name": "SimpleBooleanType",
2638 "name": "SimpleBooleanType",
2641 "schemaFlavour": "Java",
2642 "schemaDefinition": "java.lang.Boolean"
2647 "name": "SimpleLongType",
2652 "name": "SimpleLongType",
2655 "schemaFlavour": "Java",
2656 "schemaDefinition": "java.lang.Long"
2661 "name": "SimpleStringType",
2666 "name": "SimpleStringType",
2669 "schemaFlavour": "Java",
2670 "schemaDefinition": "java.lang.String"
2683 "schemaFlavour": "Java",
2684 "schemaDefinition": "java.util.UUID"
2689 "name": "VCPEClosedLoopStatusType",
2694 "name": "VCPEClosedLoopStatusType",
2697 "schemaFlavour": "Avro",
2698 "schemaDefinition": "{\n \"type\": \"record\",\n \"name\": \"VCPEClosedLoopStatus\",\n \"fields\": [\n {\n \"name\": \"AAI\",\n \"type\": {\n \"type\": \"record\",\n \"name\": \"VCPE_AAI_Type\",\n \"namespace\": \"org.onap.policy.apex.onap.vcpe\",\n \"fields\": [\n {\n \"name\": \"genericVnfResourceVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"genericVnfVnfName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"genericVnfProvStatus\",\n \"type\": \"string\"\n },\n {\n \"name\": \"genericVnfIsClosedLoopDisabled\",\n \"type\": \"string\"\n },\n {\n \"name\": \"genericVnfOrchestrationStatus\",\n \"type\": \"string\"\n },\n {\n \"name\": \"genericVnfVnfType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"genericVnfInMaint\",\n \"type\": \"string\"\n },\n {\n \"name\": \"genericVnfServiceId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"genericVnfVnfId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"vserverIsClosedLoopDisabled\",\n \"type\": \"string\"\n },\n {\n \"name\": \"vserverName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"vserverProvStatus\",\n \"type\": \"string\"\n }\n ]\n }\n },\n {\n \"name\": \"closedLoopAlarmStart\",\n \"type\": \"long\"\n },\n {\n \"name\": \"closedLoopAlarmEnd\",\n \"type\": \"long\"\n },\n {\n \"name\": \"closedLoopControlName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"name\": \"requestID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"closedLoopEventClient\",\n \"type\": \"string\"\n },\n {\n \"name\": \"closedLoopEventStatus\",\n \"type\": \"string\"\n },\n {\n \"name\": \"target_type\",\n \"type\": \"string\"\n },\n {\n \"name\": \"target\",\n \"type\": \"string\"\n },\n {\n \"name\": \"from\",\n \"type\": \"string\"\n },\n {\n \"name\": \"policyScope\",\n \"type\": \"string\"\n },\n {\n \"name\": \"policyName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"policyVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"notification\",\n \"type\": \"string\"\n },\n {\n \"name\": \"notificationTime\",\n \"type\": \"long\"\n },\n {\n \"name\": \"message\",\n \"type\": \"string\"\n }\n ]\n}"
2703 "name": "VirtualControlLoopEventType",
2708 "name": "VirtualControlLoopEventType",
2711 "schemaFlavour": "Java",
2712 "schemaDefinition": "org.onap.policy.controlloop.VirtualControlLoopEvent"
2717 "name": "VirtualControlLoopNotificationType",
2722 "name": "VirtualControlLoopNotificationType",
2725 "schemaFlavour": "Java",
2726 "schemaDefinition": "org.onap.policy.controlloop.VirtualControlLoopNotification"
2734 "engineParameters": {
2735 "executorParameters": {
2737 "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
2740 "contextParameters": {
2741 "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
2742 "schemaParameters": {
2744 "parameterClassName": "org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters"
2747 "parameterClassName": "org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters",
2750 "adaptedClass": "java.time.Instant",
2751 "adaptorClass": "org.onap.policy.controlloop.util.Serialization$GsonInstantAdapter"
2759 "key": "ParameterKey1",
2760 "value": "ParameterValue1"
2763 "taskId": "AAILookupTask:0.0.1",
2764 "key": "SomeKeyForThisTask",
2770 "eventInputParameters": {
2771 "GuardRequestorConsumer": {
2772 "carrierTechnologyParameters": {
2773 "carrierTechnology": "RESTREQUESTOR",
2774 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
2776 "url": "http://111.222.333.444:5555/pdp/api/getDecision",
2777 "httpMethod": "POST",
2778 "restRequestTimeout": 2000,
2779 "httpHeader": "Authorization:aaaaaaaaa== ClientAuth:bbbbbbbbb="
2782 "eventProtocolParameters": {
2783 "eventProtocol": "JSON"
2785 "eventName": "GuardResponseEvent",
2786 "eventNameFilter": "GuardResponseEvent",
2787 "requestorMode": true,
2788 "requestorPeer": "GuardRequestorProducer",
2789 "requestorTimeout": 500
2792 "carrierTechnologyParameters": {
2793 "carrierTechnology": "RESTCLIENT",
2794 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
2796 "url": "http://message-router:3904/events/unauthenticated.DCAE_CL_OUTPUT/APEX/1?timeout=60000"
2799 "eventProtocolParameters": {
2800 "eventProtocol": "JSON",
2802 "nameAlias": "closedLoopControlName",
2803 "versionAlias": "version",
2804 "sourceAlias": "from",
2805 "pojoField": "VirtualControlLoopEvent"
2808 "eventName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e"
2811 "carrierTechnologyParameters": {
2812 "carrierTechnology": "RESTCLIENT",
2813 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
2815 "url": "http://message-router:3904/events/APPC-LCM-WRITE/APEX/1?timeout=60000"
2818 "eventProtocolParameters": {
2819 "eventProtocol": "JSON",
2821 "versionAlias": "version",
2822 "pojoField": "APPCLCMResponseEvent"
2825 "eventName": "APPCRestartVNFResponseEvent",
2826 "eventNameFilter": "APPCRestartVNFResponseEvent"
2829 "eventOutputParameters": {
2831 "carrierTechnologyParameters": {
2832 "carrierTechnology": "FILE",
2834 "fileName": "/tmp/VCPEEventsOut.json"
2837 "eventProtocolParameters": {
2838 "eventProtocol": "JSON"
2841 "GuardRequestorProducer": {
2842 "carrierTechnologyParameters": {
2843 "carrierTechnology": "RESTREQUESTOR",
2844 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
2846 "eventProtocolParameters": {
2847 "eventProtocol": "JSON"
2849 "eventNameFilter": "GuardRequestEvent",
2850 "requestorMode": true,
2851 "requestorPeer": "GuardRequestorConsumer",
2852 "requestorTimeout": 500
2855 "carrierTechnologyParameters": {
2856 "carrierTechnology": "RESTCLIENT",
2857 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
2859 "url": "http://message-router:3904/events/APPC-LCM-READ"
2862 "eventProtocolParameters": {
2863 "eventProtocol": "JSON",
2865 "versionAlias": "version",
2866 "sourceAlias": "from",
2867 "pojoField": "APPCLCMRequestEvent"
2870 "eventNameFilter": "APPCRestartVNFRequestEvent"
2872 "PolicyLogProducer": {
2873 "carrierTechnologyParameters": {
2874 "carrierTechnology": "RESTCLIENT",
2875 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
2877 "url": "http://message-router:3904/events/POLICY-CL-MGT"
2880 "eventProtocolParameters": {
2881 "eventProtocol": "JSON",
2883 "versionAlias": "version",
2884 "sourceAlias": "from",
2885 "pojoField": "VirtualControlLoopNotification"
2888 "eventNameFilter": "ControlLoopLogEvent"