Fix loop submit bugs
Update the payload for policy creation and pdp group activation and
update the policy url accordingly.
Issue-ID: CLAMP-787
Change-Id: If39eeaccf780f1222b99ffc4dd5d7ef1460c4962
Signed-off-by: xuegao <xg353y@intl.att.com>
diff --git a/src/test/resources/tosca/micro-service-policy-payload.json b/src/test/resources/tosca/micro-service-policy-payload.json
index 2de06b0..2533a54 100644
--- a/src/test/resources/tosca/micro-service-policy-payload.json
+++ b/src/test/resources/tosca/micro-service-policy-payload.json
@@ -5,6 +5,7 @@
{
"testPolicy": {
"type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "type_version": "1.0.0",
"version": "1.0.0",
"metadata": {
"policy-id": "testPolicy"
diff --git a/src/test/resources/tosca/micro-service-policy-properties.json b/src/test/resources/tosca/micro-service-policy-properties.json
index 6baa329..04fe0cc 100644
--- a/src/test/resources/tosca/micro-service-policy-properties.json
+++ b/src/test/resources/tosca/micro-service-policy-properties.json
@@ -1,23 +1,25 @@
{
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "policyVersion": "1.0.0",
- "thresholds": [
- {
- "severity": "CRITICAL",
- "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
- "thresholdValue": 1,
- "closedLoopEventStatus": "ONSET",
- "closedLoopControlName": "test",
- "version": "1.0.0",
- "direction": "LESS"
- }
- ],
- "policyName": "test",
- "controlLoopSchemaType": "VM",
- "policyScope": "test",
- "eventName": "test"
- }
- ]
+ "tca_policy": {
+ "domain": "measurementsForVfScaling",
+ "metricsPerEventName": [
+ {
+ "policyVersion": "1.0.0",
+ "thresholds": [
+ {
+ "severity": "CRITICAL",
+ "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
+ "thresholdValue": 1,
+ "closedLoopEventStatus": "ONSET",
+ "closedLoopControlName": "test",
+ "version": "1.0.0",
+ "direction": "LESS"
+ }
+ ],
+ "policyName": "test",
+ "controlLoopSchemaType": "VM",
+ "policyScope": "test",
+ "eventName": "test"
+ }
+ ]
+ }
}
diff --git a/src/test/resources/tosca/pdp-group-policy-payload.json b/src/test/resources/tosca/pdp-group-policy-payload.json
index 93a8545..4ea746d 100644
--- a/src/test/resources/tosca/pdp-group-policy-payload.json
+++ b/src/test/resources/tosca/pdp-group-policy-payload.json
@@ -1,21 +1,6 @@
{
"groups": [
{
- "name": "pdpGroup2",
- "deploymentSubgroups": [
- {
- "pdpType": "pdpSubgroup2",
- "action": "POST",
- "policies": [
- {
- "name": "onap.policies.controlloop.Operational",
- "version": "1.0.0"
- }
- ]
- }
- ]
- },
- {
"name": "pdpGroup1",
"deploymentSubgroups": [
{
@@ -23,7 +8,22 @@
"action": "POST",
"policies": [
{
- "name": "onap.policies.monitoring.test",
+ "name": "configPolicyTest",
+ "version": "1.0.0"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "pdpGroup2",
+ "deploymentSubgroups": [
+ {
+ "pdpType": "pdpSubgroup2",
+ "action": "POST",
+ "policies": [
+ {
+ "name": "opPolicy",
"version": "1.0.0"
}
]