From e8401780120dc035b074d932b89445cfce228634 Mon Sep 17 00:00:00 2001 From: jhh Date: Thu, 23 Apr 2020 13:18:48 -0500 Subject: transaction tracking improvements with telemetry Issue-ID: POLICY-2456 Signed-off-by: jhh Change-Id: I75b7e8e787d567cf120d7ae7d65d1bff12e8e24e Signed-off-by: jhh --- .../src/test/resources/logback.xml | 148 +++++++++++++++++++++ .../src/test/resources/policy-cl-mgt-active.json | 21 +++ .../resources/policy-cl-mgt-final-success.json | 32 +++++ .../test/resources/policy-cl-mgt-operation.json | 22 +++ .../src/test/resources/policy-cl-mgt-permit.json | 22 +++ .../resources/policy-cl-mgt-restart-success.json | 33 +++++ .../src/test/resources/policy-cl-mgt-restart.json | 22 +++ 7 files changed, 300 insertions(+) create mode 100644 controlloop/common/feature-controlloop-trans/src/test/resources/logback.xml create mode 100644 controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-active.json create mode 100644 controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-final-success.json create mode 100644 controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-operation.json create mode 100644 controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-permit.json create mode 100644 controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-restart-success.json create mode 100644 controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-restart.json (limited to 'controlloop/common/feature-controlloop-trans/src/test/resources') diff --git a/controlloop/common/feature-controlloop-trans/src/test/resources/logback.xml b/controlloop/common/feature-controlloop-trans/src/test/resources/logback.xml new file mode 100644 index 000000000..6a25769e3 --- /dev/null +++ b/controlloop/common/feature-controlloop-trans/src/test/resources/logback.xml @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + ${logDir}/${errorLog}.log + + ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip + 50MB + 30 + 10GB + + + WARN + + + ${errorPattern} + + + + + + + + + ${logDir}/${debugLog}.log + + ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip + 50MB + 30 + 10GB + + + ${debugPattern} + + + + + + + + + ${logDir}/${networkLog}.log + + ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip + 50MB + 30 + 10GB + + + ${networkPattern} + + + + + + + + + ${logDir}/${metricLog}.log + + ${logDir}/${metricLog}.%d{yyyy-MM-dd}.%i.log.zip + 50MB + 30 + 10GB + + + + ${metricPattern} + + + + + + + + + ${logDir}/${transactionLog}.log + + ${logDir}/${transactionLog}.%d{yyyy-MM-dd}.%i.log.zip + 50MB + 30 + 10GB + + + + ${transactionPattern} + + + + + + + + + + + + + + + + + + + + + + + diff --git a/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-active.json b/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-active.json new file mode 100644 index 000000000..9430327c3 --- /dev/null +++ b/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-active.json @@ -0,0 +1,21 @@ +{ + "AAI": { + "vserver.prov-status": "ACTIVE", + "vserver.is-closed-loop-disabled": "false", + "generic-vnf.vnf-id": "vCPE_Infrastructure_vGMUX_demo_app" + }, + "closedLoopAlarmStart": 1463679805324, + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", + "version": "1.0.2", + "requestId": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", + "targetType": "VNF", + "target": "generic-vnf.vnf-id", + "from": "policy", + "policyScope": "onap.policies.controlloop.operational.common.Drools:1.0.0", + "policyName": "operational.restart.EVENT", + "policyVersion": "1.0.0", + "notification": "ACTIVE", + "notificationTime": "2020-04-20 19:12:17.223175+00:00", + "history": [] +} diff --git a/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-final-success.json b/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-final-success.json new file mode 100644 index 000000000..e1f98de28 --- /dev/null +++ b/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-final-success.json @@ -0,0 +1,32 @@ +{ + "AAI": { + "vserver.prov-status": "ACTIVE", + "vserver.is-closed-loop-disabled": "false", + "generic-vnf.vnf-id": "vCPE_Infrastructure_vGMUX_demo_app" + }, + "closedLoopAlarmStart": 1463679805324, + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", + "version": "1.0.2", + "requestId": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", + "targetType": "VNF", + "target": "generic-vnf.vnf-id", + "from": "policy", + "policyScope": "onap.policies.controlloop.operational.common.Drools:1.0.0", + "policyName": "operational.restart.EVENT.MANAGER.FINAL", + "policyVersion": "1.0.0", + "notification": "FINAL: SUCCESS", + "notificationTime": "2020-04-20 19:12:17.684718+00:00", + "history": [ + { + "actor": "APPC", + "operation": "Restart", + "target": "Target [type=VM, resourceId=null]", + "start": 1587409937614, + "end": 1587409937679, + "subRequestId": "38ce5fcb-f16a-4cfc-abc6-8d8b78e2f959", + "outcome": "Success", + "message": "Restart Successful" + } + ] +} diff --git a/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-operation.json b/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-operation.json new file mode 100644 index 000000000..567af4893 --- /dev/null +++ b/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-operation.json @@ -0,0 +1,22 @@ +{ + "AAI": { + "vserver.prov-status": "ACTIVE", + "vserver.is-closed-loop-disabled": "false", + "generic-vnf.vnf-id": "vCPE_Infrastructure_vGMUX_demo_app" + }, + "closedLoopAlarmStart": 1463679805324, + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", + "version": "1.0.2", + "requestId": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", + "targetType": "VNF", + "target": "generic-vnf.vnf-id", + "from": "policy", + "policyScope": "onap.policies.controlloop.operational.common.Drools:1.0.0", + "policyName": "operational.restart.EVENT.MANAGER.PROCESSING", + "policyVersion": "1.0.0", + "notification": "OPERATION", + "message": "Sending guard query for APPC Restart", + "notificationTime": "2020-04-20 19:12:17.244277+00:00", + "history": [] +} diff --git a/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-permit.json b/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-permit.json new file mode 100644 index 000000000..d8c28be61 --- /dev/null +++ b/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-permit.json @@ -0,0 +1,22 @@ +{ + "AAI": { + "vserver.prov-status": "ACTIVE", + "vserver.is-closed-loop-disabled": "false", + "generic-vnf.vnf-id": "vCPE_Infrastructure_vGMUX_demo_app" + }, + "closedLoopAlarmStart": 1463679805324, + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", + "version": "1.0.2", + "requestId": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", + "targetType": "VNF", + "target": "generic-vnf.vnf-id", + "from": "policy", + "policyScope": "onap.policies.controlloop.operational.common.Drools:1.0.0", + "policyName": "operational.restart.EVENT.MANAGER.PROCESSING", + "policyVersion": "1.0.0", + "notification": "OPERATION", + "message": "Guard result for APPC Restart is Permit", + "notificationTime": "2020-04-20 19:12:17.608770+00:00", + "history": [] +} diff --git a/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-restart-success.json b/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-restart-success.json new file mode 100644 index 000000000..80686452d --- /dev/null +++ b/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-restart-success.json @@ -0,0 +1,33 @@ +{ + "AAI": { + "vserver.prov-status": "ACTIVE", + "vserver.is-closed-loop-disabled": "false", + "generic-vnf.vnf-id": "vCPE_Infrastructure_vGMUX_demo_app" + }, + "closedLoopAlarmStart": 1463679805324, + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", + "version": "1.0.2", + "requestId": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", + "targetType": "VNF", + "target": "generic-vnf.vnf-id", + "from": "policy", + "policyScope": "onap.policies.controlloop.operational.common.Drools:1.0.0", + "policyName": "operational.restart.EVENT.MANAGER.PROCESSING", + "policyVersion": "1.0.0", + "notification": "OPERATION: SUCCESS", + "message": "actor=APPC,operation=Restart,target=Target [type=VM, resourceId=null],start=2020-04-20T19:12:17.614106Z,end=2020-04-20T19:12:17.679500Z,subRequestId=38ce5fcb-f16a-4cfc-abc6-8d8b78e2f959,outcome=Success,message=Restart Successful", + "notificationTime": "2020-04-20 19:12:17.680716+00:00", + "history": [ + { + "actor": "APPC", + "operation": "Restart", + "target": "Target [type=VM, resourceId=null]", + "start": 1587409937614, + "end": 1587409937679, + "subRequestId": "38ce5fcb-f16a-4cfc-abc6-8d8b78e2f959", + "outcome": "Success", + "message": "Restart Successful" + } + ] +} diff --git a/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-restart.json b/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-restart.json new file mode 100644 index 000000000..1825a02be --- /dev/null +++ b/controlloop/common/feature-controlloop-trans/src/test/resources/policy-cl-mgt-restart.json @@ -0,0 +1,22 @@ +{ + "AAI": { + "vserver.prov-status": "ACTIVE", + "vserver.is-closed-loop-disabled": "false", + "generic-vnf.vnf-id": "vCPE_Infrastructure_vGMUX_demo_app" + }, + "closedLoopAlarmStart": 1463679805324, + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", + "version": "1.0.2", + "requestId": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", + "targetType": "VNF", + "target": "generic-vnf.vnf-id", + "from": "policy", + "policyScope": "onap.policies.controlloop.operational.common.Drools:1.0.0", + "policyName": "operational.restart.EVENT.MANAGER.PROCESSING", + "policyVersion": "1.0.0", + "notification": "OPERATION", + "message": "actor=APPC,operation=Restart,target=Target [type=VM, resourceId=null],subRequestId=38ce5fcb-f16a-4cfc-abc6-8d8b78e2f959", + "notificationTime": "2020-04-20 19:12:17.614625+00:00", + "history": [] +} -- cgit 1.2.3-korg