Fix Policy Yaml
Fix Policy Yaml generation, remove service and resource section + update
the actor/recipe
Issue-ID: CLAMP-243
Change-Id: Ia1adad6e653e7e85576858f2971f60f7903bfae2
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
diff --git a/src/test/resources/clds/templates/globalProperties.json b/src/test/resources/clds/templates/globalProperties.json
index e677abe..067063e 100644
--- a/src/test/resources/clds/templates/globalProperties.json
+++ b/src/test/resources/clds/templates/globalProperties.json
@@ -9,8 +9,8 @@
"Measurement_vGMUX":"Measurement_vGMUX"
},
"fieldPathM": {
- "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value": "Packet-loss-rate",
- "$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta":"receivedTotalPacketsDelta"
+ "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value": "packetLossRate",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta":"receivedTotalPacketsDelta"
},
"operator": {
">": "GREATER",
@@ -49,12 +49,14 @@
"timeout": 345,
"vnfRecipe": {
"": "",
- "restart": "Restart",
- "rebuild": "Rebuild",
- "migrate": "Migrate",
- "healthCheck": "Health Check",
- "modifyConfig": "ModifyConfig",
- "vfModuleCreate":"VF Module Create"
+ "Restart": "Restart",
+ "Rebuild": "Rebuild",
+ "Migrate": "Migrate",
+ "HealthCheck": "Health Check",
+ "ModifyConfig": "Modify Config",
+ "VF Module Create":"VF Module Create",
+ "VF Module Delete":"VF Module Delete",
+ "Reroute":"Reroute"
},
"maxRetries": "3",
"retryTimeLimit": 180,
diff --git a/src/test/resources/example/operational-policy/yaml-policy-chain-1.yaml b/src/test/resources/example/operational-policy/yaml-policy-chain-1.yaml
index 3d0252a..19ee585 100644
--- a/src/test/resources/example/operational-policy/yaml-policy-chain-1.yaml
+++ b/src/test/resources/example/operational-policy/yaml-policy-chain-1.yaml
@@ -1,17 +1,8 @@
controlLoop:
abatement: false
controlLoopName: controlNameTest
- resources:
- - resourceInvariantUUID: null
- resourceName: 6c7aaec2-59eb-41d9-8681-b7f976ab668d
- resourceType: VF
- resourceUUID: null
- resourceVersion: null
- services:
- - serviceInvariantUUID: null
- serviceName: 0f983e18-4603-4bb4-a98c-e29691fb16a1
- serviceUUID: null
- serviceVersion: null
+ resources: null
+ services: null
timeout: 500
trigger_policy: <generatedId>
version: 2.0.0
diff --git a/src/test/resources/example/operational-policy/yaml-policy-chain-2.yaml b/src/test/resources/example/operational-policy/yaml-policy-chain-2.yaml
index 3d0252a..19ee585 100644
--- a/src/test/resources/example/operational-policy/yaml-policy-chain-2.yaml
+++ b/src/test/resources/example/operational-policy/yaml-policy-chain-2.yaml
@@ -1,17 +1,8 @@
controlLoop:
abatement: false
controlLoopName: controlNameTest
- resources:
- - resourceInvariantUUID: null
- resourceName: 6c7aaec2-59eb-41d9-8681-b7f976ab668d
- resourceType: VF
- resourceUUID: null
- resourceVersion: null
- services:
- - serviceInvariantUUID: null
- serviceName: 0f983e18-4603-4bb4-a98c-e29691fb16a1
- serviceUUID: null
- serviceVersion: null
+ resources: null
+ services: null
timeout: 500
trigger_policy: <generatedId>
version: 2.0.0
diff --git a/src/test/resources/example/sdc/expected-result/sdc-properties-4cc5b45a.json b/src/test/resources/example/sdc/expected-result/sdc-properties-4cc5b45a.json
index c695ae0..26454c3 100644
--- a/src/test/resources/example/sdc/expected-result/sdc-properties-4cc5b45a.json
+++ b/src/test/resources/example/sdc/expected-result/sdc-properties-4cc5b45a.json
@@ -9,8 +9,8 @@
"Measurement_vGMUX":"Measurement_vGMUX"
},
"fieldPathM": {
- "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value": "Packet-loss-rate",
- "$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta":"receivedTotalPacketsDelta"
+ "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value": "packetLossRate",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta":"receivedTotalPacketsDelta"
},
"operator": {
">": "GREATER",
@@ -49,12 +49,14 @@
"timeout": 345,
"vnfRecipe": {
"": "",
- "restart": "Restart",
- "rebuild": "Rebuild",
- "migrate": "Migrate",
- "healthCheck": "Health Check",
- "modifyConfig": "ModifyConfig",
- "vfModuleCreate":"VF Module Create"
+ "Restart": "Restart",
+ "Rebuild": "Rebuild",
+ "Migrate": "Migrate",
+ "HealthCheck": "Health Check",
+ "ModifyConfig": "Modify Config",
+ "VF Module Create":"VF Module Create",
+ "VF Module Delete":"VF Module Delete",
+ "Reroute":"Reroute"
},
"maxRetries": "3",
"retryTimeLimit": 180,
diff --git a/src/test/resources/example/sdc/expected-result/sdc-properties-global.json b/src/test/resources/example/sdc/expected-result/sdc-properties-global.json
index f81784d..be46dbc 100644
--- a/src/test/resources/example/sdc/expected-result/sdc-properties-global.json
+++ b/src/test/resources/example/sdc/expected-result/sdc-properties-global.json
@@ -9,8 +9,8 @@
"Measurement_vGMUX": "Measurement_vGMUX"
},
"fieldPathM": {
- "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value": "Packet-loss-rate",
- "$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta": "receivedTotalPacketsDelta"
+ "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value": "packetLossRate",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta": "receivedTotalPacketsDelta"
},
"operator": {
">": "GREATER",
@@ -49,12 +49,14 @@
"timeout": 345,
"vnfRecipe": {
"": "",
- "restart": "Restart",
- "rebuild": "Rebuild",
- "migrate": "Migrate",
- "healthCheck": "Health Check",
- "modifyConfig": "ModifyConfig",
- "vfModuleCreate": "VF Module Create"
+ "Restart": "Restart",
+ "Rebuild": "Rebuild",
+ "Migrate": "Migrate",
+ "HealthCheck": "Health Check",
+ "ModifyConfig": "Modify Config",
+ "VF Module Create":"VF Module Create",
+ "VF Module Delete":"VF Module Delete",
+ "Reroute":"Reroute"
},
"maxRetries": "3",
"retryTimeLimit": 180,