CSIT fixes for frankfurt breakage
CSITs as per the latest policy type validation changes.
Drools and drools apps fixes.
Removed policy-health.
Change-Id: I086bf747059435e12d15e0481b00c97c20eaadc1
Issue-ID: POLICY-1402
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
diff --git a/tests/policy/api/api-test.robot b/tests/policy/api/api-test.robot
index 19aa18a..76c1bdc 100644
--- a/tests/policy/api/api-test.robot
+++ b/tests/policy/api/api-test.robot
@@ -39,7 +39,7 @@
Should Be Equal As Strings ${resp.json()['version']} 1.0.0
CreateTCAPolicyTypeV1
- [Documentation] Create TCA Policy Type Version 1
+ [Documentation] Create TCA Policy Type Version 1. Trying to create an existing policy type with any change and same version should cause error.
${auth}= Create List healthcheck zb!XztG34
${postjson}= Get file ${CURDIR}/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json
Log Creating session https://${POLICY_API_IP}:6969
@@ -90,9 +90,9 @@
Dictionary Should Contain Key ${postjsonobject['topology_template']['policies'][0]} onap.restart.tca
SimpleCreateNewMonitoringPolicyV1
- [Documentation] Create a new Monitoring TCA policiy version 1 using simple endpoint
+ [Documentation] Create a new Monitoring TCA policiy version 1 using simple endpoint. Trying to create an existing policy with any change and same version should cause error.
${auth}= Create List healthcheck zb!XztG34
- ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v1.json
+ ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v1_2.json
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
diff --git a/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json b/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json
index f06247d..1db64f8 100644
--- a/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json
+++ b/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json
@@ -3,6 +3,7 @@
"policy_types": {
"onap.policies.Monitoring": {
"derived_from": "tosca.policies.Root",
+ "version": "1.0.0",
"description": "a base policy type for all policies that governs monitoring provisioning"
},
"onap.policies.monitoring.cdap.tca.hi.lo.app": {
@@ -210,4 +211,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1_2.json b/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1_2.json
new file mode 100644
index 0000000..a3faae4
--- /dev/null
+++ b/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1_2.json
@@ -0,0 +1,52 @@
+{
+ "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.restart.tca": {
+ "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "description": "monitoring policy",
+ "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"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+}