diff options
Diffstat (limited to 'main/src/test/resources')
-rw-r--r-- | main/src/test/resources/e2e/PapConfigParameters.json | 29 | ||||
-rw-r--r-- | main/src/test/resources/e2e/createGroups.json | 61 | ||||
-rw-r--r-- | main/src/test/resources/e2e/deleteGroup.json | 56 | ||||
-rw-r--r-- | main/src/test/resources/e2e/deployPolicies.json | 56 | ||||
-rw-r--r-- | main/src/test/resources/e2e/deployPoliciesReq.json | 7 | ||||
-rw-r--r-- | main/src/test/resources/e2e/monitoring.policy-type.yaml | 164 | ||||
-rw-r--r-- | main/src/test/resources/e2e/monitoring.policy.yaml | 105 | ||||
-rw-r--r-- | main/src/test/resources/e2e/queryGroup.json | 98 | ||||
-rw-r--r-- | main/src/test/resources/e2e/stateChangeGroupDeactivate.json | 56 | ||||
-rw-r--r-- | main/src/test/resources/e2e/undeployPolicy.json | 56 | ||||
-rw-r--r-- | main/src/test/resources/e2e/undeployPolicyVersion.json | 56 | ||||
-rw-r--r-- | main/src/test/resources/logback-test.xml | 37 | ||||
-rw-r--r-- | main/src/test/resources/parameters/PapConfigParametersStd.json | 29 |
13 files changed, 810 insertions, 0 deletions
diff --git a/main/src/test/resources/e2e/PapConfigParameters.json b/main/src/test/resources/e2e/PapConfigParameters.json new file mode 100644 index 00000000..4e085f76 --- /dev/null +++ b/main/src/test/resources/e2e/PapConfigParameters.json @@ -0,0 +1,29 @@ +{ + "name": "PapGroup", + "restServerParameters": { + "host": "0.0.0.0", + "port": ${port}, + "userName": "healthcheck", + "password": "zb!XztG34", + "https": true + }, + "pdpParameters": { + "updateParameters": { + "maxRetryCount": 0, + "maxWaitMs": 5000 + }, + "stateChangeParameters": { + "maxRetryCount": 0, + "maxWaitMs": 5000 + } + }, + "databaseProviderParameters": { + "name": "PolicyModelsProviderParameters", + "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", + "databaseDriver": "org.h2.Driver", + "databaseUrl": "${dbName}", + "databaseUser": "policy", + "databasePassword": "UDAxaWNZ", + "persistenceUnit": "ToscaConceptTest" + } +} diff --git a/main/src/test/resources/e2e/createGroups.json b/main/src/test/resources/e2e/createGroups.json new file mode 100644 index 00000000..1c8774be --- /dev/null +++ b/main/src/test/resources/e2e/createGroups.json @@ -0,0 +1,61 @@ +{ + "groups": [ + { + "name": "createGroups", + "pdpGroupState": "PASSIVE", + "properties": { + "hello": "world" + }, + "pdpSubgroups": [ + { + "pdpType": "pdpTypeA", + "desiredInstanceCount": 2, + "properties": {}, + "pdpInstances": [ + { + "instanceId": "pdpAA_1", + "pdpState": "ACTIVE", + "healthy": "HEALTHY" + }, + { + "instanceId": "pdpAA_2", + "pdpState": "ACTIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [ + { + "name": "onap.restart.tca", + "version": "1.0.0" + } + ] + }, + { + "pdpType": "pdpTypeB", + "desiredInstanceCount": 1, + "properties": {}, + "pdpInstances": [ + { + "instanceId": "pdpAB_1", + "pdpState": "ACTIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [] + } + ] + } + ] +} diff --git a/main/src/test/resources/e2e/deleteGroup.json b/main/src/test/resources/e2e/deleteGroup.json new file mode 100644 index 00000000..4351d5c1 --- /dev/null +++ b/main/src/test/resources/e2e/deleteGroup.json @@ -0,0 +1,56 @@ +{ + "groups": [ + { + "name": "deleteGroup", + "pdpGroupState": "PASSIVE", + "pdpSubgroups": [ + { + "pdpType": "pdpTypeA", + "desiredInstanceCount": 2, + "pdpInstances": [ + { + "instanceId": "pdpAA_1", + "pdpState": "PASSIVE", + "healthy": "HEALTHY" + }, + { + "instanceId": "pdpAA_2", + "pdpState": "PASSIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [ + { + "name": "onap.restart.tca", + "version": "1.0.0" + } + ] + }, + { + "pdpType": "pdpTypeB", + "desiredInstanceCount": 1, + "pdpInstances": [ + { + "instanceId": "pdpAB_1", + "pdpState": "PASSIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [] + } + ] + } + ] +} diff --git a/main/src/test/resources/e2e/deployPolicies.json b/main/src/test/resources/e2e/deployPolicies.json new file mode 100644 index 00000000..4cafe77b --- /dev/null +++ b/main/src/test/resources/e2e/deployPolicies.json @@ -0,0 +1,56 @@ +{ + "groups": [ + { + "name": "deployPolicies", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "pdpType": "pdpTypeA", + "desiredInstanceCount": 2, + "pdpInstances": [ + { + "instanceId": "pdpBA_1", + "pdpState": "ACTIVE", + "healthy": "HEALTHY" + }, + { + "instanceId": "pdpBA_2", + "pdpState": "ACTIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [] + }, + { + "pdpType": "pdpTypeB", + "desiredInstanceCount": 1, + "pdpInstances": [ + { + "instanceId": "pdpBB_1", + "pdpState": "ACTIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [ + { + "name": "onap.restart.tca", + "version": "1.0.0" + } + ] + } + ] + } + ] +} diff --git a/main/src/test/resources/e2e/deployPoliciesReq.json b/main/src/test/resources/e2e/deployPoliciesReq.json new file mode 100644 index 00000000..c6139516 --- /dev/null +++ b/main/src/test/resources/e2e/deployPoliciesReq.json @@ -0,0 +1,7 @@ +{ + "policies": [ + { + "policy-id": "onap.restart.tca" + } + ] +}
\ No newline at end of file diff --git a/main/src/test/resources/e2e/monitoring.policy-type.yaml b/main/src/test/resources/e2e/monitoring.policy-type.yaml new file mode 100644 index 00000000..98b64522 --- /dev/null +++ b/main/src/test/resources/e2e/monitoring.policy-type.yaml @@ -0,0 +1,164 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +policy_types: + - + onap.policies.Monitoring: + derived_from: tosca.policies.Root + description: a base policy type for all policies that governs monitoring provisioning + version: 1.0.0 + - + onap.policy.monitoring.cdap.tca.hi.lo.app: + derived_from: onap.policies.Monitoring + version: 1.0.0 + properties: + tca_policy: + type: map + description: TCA Policy JSON + entry_schema: + type: onap.datatypes.monitoring.tca_policy +data_types: + - + onap.datatypes.monitoring.metricsPerEventName: + derived_from: tosca.datatypes.Root + properties: + controlLoopSchemaType: + type: string + required: true + description: Specifies Control Loop Schema Type for the event Name e.g. VNF, VM + constraints: + - valid_values: + - VM + - VNF + eventName: + type: string + required: true + description: Event name to which thresholds need to be applied + policyName: + type: string + required: true + description: TCA Policy Scope Name + policyScope: + type: string + required: true + description: TCA Policy Scope + policyVersion: + type: string + required: true + description: TCA Policy Scope Version + thresholds: + type: list + required: true + description: Thresholds associated with eventName + entry_schema: + type: onap.datatypes.monitoring.thresholds + - + onap.datatypes.monitoring.tca_policy: + derived_from: tosca.datatypes.Root + properties: + domain: + type: string + required: true + description: Domain name to which TCA needs to be applied + default: measurementsForVfScaling + constraints: + - equal: measurementsForVfScaling + metricsPerEventName: + type: list + required: true + description: Contains eventName and threshold details that need to be applied to given eventName + entry_schema: + type: onap.datatypes.monitoring.metricsPerEventName + - + onap.datatypes.monitoring.thresholds: + derived_from: tosca.datatypes.Root + properties: + closedLoopControlName: + type: string + required: true + description: Closed Loop Control Name associated with the threshold + closedLoopEventStatus: + type: string + required: true + description: Closed Loop Event Status of the threshold + constraints: + - valid_values: + - ONSET + - ABATED + direction: + type: string + required: true + description: Direction of the threshold + constraints: + - valid_values: + - LESS + - LESS_OR_EQUAL + - GREATER + - GREATER_OR_EQUAL + - EQUAL + fieldPath: + type: string + required: true + description: Json field Path as per CEF message which needs to be analyzed for TCA + constraints: + - valid_values: + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated + - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated + - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle + - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt + - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice + - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq + - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal + - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem + - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait + - $.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage + - $.event.measurementsForVfScalingFields.meanRequestLatency + - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered + - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached + - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured + - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree + - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed + - $.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value + severity: + type: string + required: true + description: Threshold Event Severity + constraints: + - valid_values: + - CRITICAL + - MAJOR + - MINOR + - WARNING + - NORMAL + thresholdValue: + type: integer + required: true + description: Threshold value for the field Path inside CEF message + version: + type: string + required: true + description: Version number associated with the threshold
\ No newline at end of file diff --git a/main/src/test/resources/e2e/monitoring.policy.yaml b/main/src/test/resources/e2e/monitoring.policy.yaml new file mode 100644 index 00000000..fe15b479 --- /dev/null +++ b/main/src/test/resources/e2e/monitoring.policy.yaml @@ -0,0 +1,105 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +topology_template: + policies: + - + onap.restart.tca: + type: onap.policies.monitoring.cdap.tca.hi.lo.app + type_version: 1.0.0 + version: 1.0.0 + metadata: + policy-id: onap.restart.tca + properties: + tca_policy: + domain: measurementsForVfScaling + metricsPerEventName: + - + eventName: Measurement_vGMUX + controlLoopSchemaType: VNF + policyScope: DCAE + policyName: "DCAE.Config_tca-hi-lo" + policyVersion: "v0.0.1" + thresholds: + - + closedLoopControlName: "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e" + version: "1.0.2" + fieldPath: "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value" + thresholdValue: 0 + direction: EQUAL + severity: MAJOR + closedLoopEventStatus: ABATED + - + closedLoopControlName: "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e" + version: "1.0.2" + fieldPath: "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value" + thresholdValue: 0 + direction: GREATER + severity: CRITICAL + closedLoopEventStatus: ONSET + - + onap.restart.tcaB: + type: onap.policies.monitoring.cdap.tca.hi.lo.app + type_version: 1.0.0 + version: 1.0.0 + metadata: + policy-id: onap.restart.tca + properties: + tca_policy: + domain: measurementsForVfScaling + metricsPerEventName: + - + eventName: Measurement_vGMUX + controlLoopSchemaType: VNF + policyScope: DCAE + policyName: "DCAE.Config_tca-hi-lo" + policyVersion: "v0.0.1" + thresholds: + - + closedLoopControlName: "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e" + version: "1.0.2" + fieldPath: "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value" + thresholdValue: 0 + direction: EQUAL + severity: MAJOR + closedLoopEventStatus: ABATED + - + closedLoopControlName: "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e" + version: "1.0.2" + fieldPath: "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value" + thresholdValue: 0 + direction: GREATER + severity: CRITICAL + closedLoopEventStatus: ONSET + - + onap.restart.tcaC: + type: onap.policies.monitoring.cdap.tca.hi.lo.app + type_version: 1.0.0 + version: 1.0.0 + metadata: + policy-id: onap.restart.tca + properties: + tca_policy: + domain: measurementsForVfScaling + metricsPerEventName: + - + eventName: Measurement_vGMUX + controlLoopSchemaType: VNF + policyScope: DCAE + policyName: "DCAE.Config_tca-hi-lo" + policyVersion: "v0.0.1" + thresholds: + - + closedLoopControlName: "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e" + version: "1.0.2" + fieldPath: "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value" + thresholdValue: 0 + direction: EQUAL + severity: MAJOR + closedLoopEventStatus: ABATED + - + closedLoopControlName: "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e" + version: "1.0.2" + fieldPath: "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value" + thresholdValue: 0 + direction: GREATER + severity: CRITICAL + closedLoopEventStatus: ONSET diff --git a/main/src/test/resources/e2e/queryGroup.json b/main/src/test/resources/e2e/queryGroup.json new file mode 100644 index 00000000..2a7b4edc --- /dev/null +++ b/main/src/test/resources/e2e/queryGroup.json @@ -0,0 +1,98 @@ +{ + "groups": [ + { + "name": "queryGroup1", + "description": "my description", + "pdpGroupState": "PASSIVE", + "properties": { + "abc": "def" + }, + "pdpSubgroups": [ + { + "pdpType": "pdpTypeA", + "currentInstanceCount": 3, + "desiredInstanceCount": 2, + "properties": { + "ten": 10 + }, + "pdpInstances": [ + { + "instanceId": "pdpAA_1", + "pdpState": "PASSIVE", + "healthy": "HEALTHY" + }, + { + "instanceId": "pdpAA_2", + "pdpState": "PASSIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [ + { + "name": "onap.restart.tca", + "version": "1.0.0" + } + ] + }, + { + "pdpType": "pdpTypeB", + "desiredInstanceCount": 1, + "pdpInstances": [ + { + "instanceId": "pdpAB_1", + "pdpState": "PASSIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [] + } + ] + }, + { + "name": "queryGroup2", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "pdpType": "pdpTypeA", + "desiredInstanceCount": 2, + "pdpInstances": [ + { + "instanceId": "pdpBA_1", + "pdpState": "PASSIVE", + "healthy": "HEALTHY" + }, + { + "instanceId": "pdpBA_2", + "pdpState": "PASSIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [ + { + "name": "onap.restart.tcaB", + "version": "1.0.0" + } + ] + } + ] + } + ] +} diff --git a/main/src/test/resources/e2e/stateChangeGroupDeactivate.json b/main/src/test/resources/e2e/stateChangeGroupDeactivate.json new file mode 100644 index 00000000..00ed9639 --- /dev/null +++ b/main/src/test/resources/e2e/stateChangeGroupDeactivate.json @@ -0,0 +1,56 @@ +{ + "groups": [ + { + "name": "stateChangeGroupDeactivate", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "pdpType": "pdpTypeA", + "desiredInstanceCount": 2, + "pdpInstances": [ + { + "instanceId": "pdpAA_1", + "pdpState": "ACTIVE", + "healthy": "HEALTHY" + }, + { + "instanceId": "pdpAA_2", + "pdpState": "ACTIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [ + { + "name": "onap.restart.tca", + "version": "1.0.0" + } + ] + }, + { + "pdpType": "pdpTypeB", + "desiredInstanceCount": 1, + "pdpInstances": [ + { + "instanceId": "pdpAB_1", + "pdpState": "ACTIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [] + } + ] + } + ] +} diff --git a/main/src/test/resources/e2e/undeployPolicy.json b/main/src/test/resources/e2e/undeployPolicy.json new file mode 100644 index 00000000..d2443d38 --- /dev/null +++ b/main/src/test/resources/e2e/undeployPolicy.json @@ -0,0 +1,56 @@ +{ + "groups": [ + { + "name": "undeployPolicy", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "pdpType": "pdpTypeA", + "desiredInstanceCount": 2, + "pdpInstances": [ + { + "instanceId": "pdpBA_1", + "pdpState": "PASSIVE", + "healthy": "HEALTHY" + }, + { + "instanceId": "pdpBA_2", + "pdpState": "PASSIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [ + { + "name": "onap.restart.tcaB", + "version": "1.0.0" + } + ] + }, + { + "pdpType": "pdpTypeB", + "desiredInstanceCount": 1, + "pdpInstances": [ + { + "instanceId": "pdpBB_1", + "pdpState": "PASSIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [] + } + ] + } + ] +} diff --git a/main/src/test/resources/e2e/undeployPolicyVersion.json b/main/src/test/resources/e2e/undeployPolicyVersion.json new file mode 100644 index 00000000..54aa8a00 --- /dev/null +++ b/main/src/test/resources/e2e/undeployPolicyVersion.json @@ -0,0 +1,56 @@ +{ + "groups": [ + { + "name": "undeployPolicyVersion", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "pdpType": "pdpTypeA", + "desiredInstanceCount": 2, + "pdpInstances": [ + { + "instanceId": "pdpCA_1", + "pdpState": "PASSIVE", + "healthy": "HEALTHY" + }, + { + "instanceId": "pdpCA_2", + "pdpState": "PASSIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [ + { + "name": "onap.restart.tcaC", + "version": "1.0.0" + } + ] + }, + { + "pdpType": "pdpTypeB", + "desiredInstanceCount": 1, + "pdpInstances": [ + { + "instanceId": "pdpCB_1", + "pdpState": "PASSIVE", + "healthy": "HEALTHY" + } + ], + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0" + } + ], + "policies": [] + } + ] + } + ] +} diff --git a/main/src/test/resources/logback-test.xml b/main/src/test/resources/logback-test.xml new file mode 100644 index 00000000..c170cc41 --- /dev/null +++ b/main/src/test/resources/logback-test.xml @@ -0,0 +1,37 @@ +<!-- + ============LICENSE_START======================================================= + ONAP - Common Modules + ================================================================================ + Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> + +<!-- Controls the output of logs for JUnit tests --> + +<configuration> + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> + <Pattern> + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M\(%line\) - %msg%n + </Pattern> + </encoder> + </appender> + + <root level="info"> + <appender-ref ref="STDOUT" /> + </root> + +</configuration> diff --git a/main/src/test/resources/parameters/PapConfigParametersStd.json b/main/src/test/resources/parameters/PapConfigParametersStd.json new file mode 100644 index 00000000..6089c0b7 --- /dev/null +++ b/main/src/test/resources/parameters/PapConfigParametersStd.json @@ -0,0 +1,29 @@ +{ + "name": "PapGroup", + "restServerParameters": { + "host": "0.0.0.0", + "port": ${port}, + "userName": "healthcheck", + "password": "zb!XztG34", + "https": true + }, + "pdpParameters": { + "updateParameters": { + "maxRetryCount": 1, + "maxWaitMs": 2 + }, + "stateChangeParameters": { + "maxRetryCount": 1, + "maxWaitMs": 5 + } + }, + "databaseProviderParameters": { + "name": "PolicyModelsProviderParameters", + "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", + "databaseDriver": "org.h2.Driver", + "databaseUrl": "${dbName}", + "databaseUser": "policy", + "databasePassword": "UDAxaWNZ", + "persistenceUnit": "ToscaConceptTest" + } +} |