summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models-tosca/src/test/java/org/onap/policy/models/tosca/serialization/MonitoringPolicySerializationTest.java16
-rw-r--r--models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.json66
-rw-r--r--models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.yaml55
-rw-r--r--models-tosca/src/test/resources/policies/vCPE.policy.monitoring.output.tosca.yaml55
-rw-r--r--models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.json62
-rw-r--r--models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.yaml49
-rw-r--r--models-tosca/src/test/resources/policies/vDNS.policy.monitoring.output.tosca.yaml49
-rw-r--r--models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.json62
-rw-r--r--models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml51
-rw-r--r--models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.output.tosca.yaml37
10 files changed, 275 insertions, 227 deletions
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/serialization/MonitoringPolicySerializationTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/serialization/MonitoringPolicySerializationTest.java
index 07f5bca7d..8d0c8d440 100644
--- a/models-tosca/src/test/java/org/onap/policy/models/tosca/serialization/MonitoringPolicySerializationTest.java
+++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/serialization/MonitoringPolicySerializationTest.java
@@ -66,10 +66,10 @@ public class MonitoringPolicySerializationTest {
LOGGER.info(serviceTemplate.validate(new PfValidationResult()).toString());
assertTrue(serviceTemplate.validate(new PfValidationResult()).isValid());
- assertEquals("onap.vcpe.tca:1.0.0",
- serviceTemplate.getTopologyTemplate().getPolicies().get("onap.vcpe.tca").getId());
- assertEquals("onap.vcpe.tca:1.0.0",
- serviceTemplate.getTopologyTemplate().getPolicies().get("onap.vcpe.tca").getId());
+ assertEquals("onap.restart.tca:1.0.0",
+ serviceTemplate.getTopologyTemplate().getPolicies().get("onap.restart.tca").getId());
+ assertEquals("onap.restart.tca:1.0.0",
+ serviceTemplate.getTopologyTemplate().getPolicies().get("onap.restart.tca").getId());
}
@Test
@@ -86,9 +86,9 @@ public class MonitoringPolicySerializationTest {
LOGGER.info(serviceTemplate.validate(new PfValidationResult()).toString());
assertTrue(serviceTemplate.validate(new PfValidationResult()).isValid());
- assertEquals("onap.vcpe.tca:1.0.0",
- serviceTemplate.getTopologyTemplate().getPolicies().get("onap.vcpe.tca").getId());
- assertEquals("onap.vcpe.tca:1.0.0",
- serviceTemplate.getTopologyTemplate().getPolicies().get("onap.vcpe.tca").getId());
+ assertEquals("onap.restart.tca:1.0.0",
+ serviceTemplate.getTopologyTemplate().getPolicies().get("onap.restart.tca").getId());
+ assertEquals("onap.restart.tca:1.0.0",
+ serviceTemplate.getTopologyTemplate().getPolicies().get("onap.restart.tca").getId());
}
}
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.json b/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.json
index 27de380c2..0eabb573a 100644
--- a/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.json
+++ b/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.json
@@ -3,43 +3,45 @@
"topology_template": {
"policies": [
{
- "onap.vcpe.tca": {
+ "onap.restart.tca": {
"type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
"version": "1.0.0",
"metadata": {
- "policy-id": "onap.vcpe.tca"
+ "policy-id": "onap.restart.tca"
},
"properties": {
- "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"
- }
- ]
- }
- ]
+ "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/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.yaml b/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.yaml
index a193cba41..00afec393 100644
--- a/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.yaml
+++ b/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.yaml
@@ -2,34 +2,35 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0
topology_template:
policies:
-
- onap.vcpe.tca:
+ onap.restart.tca:
type: onap.policies.monitoring.cdap.tca.hi.lo.app
version: 1.0.0
metadata:
- policy-id: onap.vcpe.tca
+ policy-id: onap.restart.tca
properties:
- 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 \ No newline at end of file
+ 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 \ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.output.tosca.yaml b/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.output.tosca.yaml
index 53ac55d28..a8a1cdac1 100644
--- a/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.output.tosca.yaml
+++ b/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.output.tosca.yaml
@@ -2,35 +2,36 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0
topology_template:
policies:
-
- onap.vcpe.tca:
+ onap.restart.tca:
type: onap.policies.monitoring.cdap.tca.hi.lo.app
version: 1.0.0
metadata:
- policy-id: onap.vcpe.tca
+ policy-id: onap.restart.tca
policy-version: 1
properties:
- 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 \ No newline at end of file
+ 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 \ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.json b/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.json
index 69b52129b..2188cb2e8 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.json
+++ b/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.json
@@ -9,36 +9,38 @@
"policy-id": "onap.scaleout.tca"
},
"properties": {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "vLoadBalancer",
- "controlLoopSchemaType": "VNF",
- "policyScope": "type=configuration",
- "policyName": "onap.scaleout.tca",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
- "closedLoopEventStatus": "ONSET",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
- "thresholdValue": 500,
- "direction": "LESS_OR_EQUAL",
- "severity": "MAJOR"
- },
- {
- "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
- "closedLoopEventStatus": "ONSET",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
- "thresholdValue": 5000,
- "direction": "GREATER_OR_EQUAL",
- "severity": "CRITICAL"
- }
- ]
- }
- ]
+ "tca_policy": {
+ "domain": "measurementsForVfScaling",
+ "metricsPerEventName": [
+ {
+ "eventName": "vLoadBalancer",
+ "controlLoopSchemaType": "VNF",
+ "policyScope": "type=configuration",
+ "policyName": "onap.scaleout.tca",
+ "policyVersion": "v0.0.1",
+ "thresholds": [
+ {
+ "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
+ "closedLoopEventStatus": "ONSET",
+ "version": "1.0.2",
+ "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
+ "thresholdValue": 500,
+ "direction": "LESS_OR_EQUAL",
+ "severity": "MAJOR"
+ },
+ {
+ "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
+ "closedLoopEventStatus": "ONSET",
+ "version": "1.0.2",
+ "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
+ "thresholdValue": 5000,
+ "direction": "GREATER_OR_EQUAL",
+ "severity": "CRITICAL"
+ }
+ ]
+ }
+ ]
+ }
}
}
}
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.yaml b/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.yaml
index 054b994bb..6735c39c2 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.yaml
+++ b/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.yaml
@@ -8,28 +8,29 @@ topology_template:
metadata:
policy-id: onap.scaleout.tca
properties:
- domain: measurementsForVfScaling
- metricsPerEventName:
- -
- eventName: vLoadBalancer
- controlLoopSchemaType: VNF
- policyScope: "type=configuration"
- policyName: "onap.scaleout.tca"
- policyVersion: "v0.0.1"
- thresholds:
- -
- closedLoopControlName: "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
- closedLoopEventStatus: ONSET
- version: "1.0.2"
- fieldPath: "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated"
- thresholdValue: 500
- direction: LESS_OR_EQUAL
- severity: MAJOR
+ tca_policy:
+ domain: measurementsForVfScaling
+ metricsPerEventName:
-
- closedLoopControlName: "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
- closedLoopEventStatus: ONSET
- version: "1.0.2"
- fieldPath: "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated"
- thresholdValue: 5000
- direction: GREATER_OR_EQUAL
- severity: CRITICAL
+ eventName: vLoadBalancer
+ controlLoopSchemaType: VNF
+ policyScope: "type=configuration"
+ policyName: "onap.scaleout.tca"
+ policyVersion: "v0.0.1"
+ thresholds:
+ -
+ closedLoopControlName: "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
+ closedLoopEventStatus: ONSET
+ version: "1.0.2"
+ fieldPath: "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated"
+ thresholdValue: 500
+ direction: LESS_OR_EQUAL
+ severity: MAJOR
+ -
+ closedLoopControlName: "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
+ closedLoopEventStatus: ONSET
+ version: "1.0.2"
+ fieldPath: "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated"
+ thresholdValue: 5000
+ direction: GREATER_OR_EQUAL
+ severity: CRITICAL
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.output.tosca.yaml b/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.output.tosca.yaml
index 5a2fac7b0..669e8946c 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.output.tosca.yaml
+++ b/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.output.tosca.yaml
@@ -9,28 +9,29 @@ topology_template:
policy-id: onap.scaleout.tca
policy-version: 1
properties:
- domain: measurementsForVfScaling
- metricsPerEventName:
- -
- eventName: vLoadBalancer
- controlLoopSchemaType: VNF
- policyScope: "type=configuration"
- policyName: "onap.scaleout.tca"
- policyVersion: "v0.0.1"
- thresholds:
- -
- closedLoopControlName: "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
- closedLoopEventStatus: ONSET
- version: "1.0.2"
- fieldPath: "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated"
- thresholdValue: 500
- direction: LESS_OR_EQUAL
- severity: MAJOR
+ tca_policy:
+ domain: measurementsForVfScaling
+ metricsPerEventName:
-
- closedLoopControlName: "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
- closedLoopEventStatus: ONSET
- version: "1.0.2"
- fieldPath: "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated"
- thresholdValue: 5000
- direction: GREATER_OR_EQUAL
- severity: CRITICAL
+ eventName: vLoadBalancer
+ controlLoopSchemaType: VNF
+ policyScope: "type=configuration"
+ policyName: "onap.scaleout.tca"
+ policyVersion: "v0.0.1"
+ thresholds:
+ -
+ closedLoopControlName: "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
+ closedLoopEventStatus: ONSET
+ version: "1.0.2"
+ fieldPath: "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated"
+ thresholdValue: 500
+ direction: LESS_OR_EQUAL
+ severity: MAJOR
+ -
+ closedLoopControlName: "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3"
+ closedLoopEventStatus: ONSET
+ version: "1.0.2"
+ fieldPath: "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated"
+ thresholdValue: 5000
+ direction: GREATER_OR_EQUAL
+ severity: CRITICAL
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.json b/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.json
index 1593d2033..93545a0dd 100644
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.json
+++ b/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.json
@@ -6,36 +6,38 @@
"type": "onap.policy.monitoring.cdap.tca.hi.lo.app",
"version": "1.0.0",
"properties": {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "vLoadBalancer",
- "controlLoopSchemaType": "VNF",
- "policyScope": "resource=vLoadBalancer;type=configuration",
- "policyName": "onap.vfirewall.tca",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
- "closedLoopEventStatus": "ONSET",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
- "thresholdValue": 500,
- "direction": "LESS_OR_EQUAL",
- "severity": "MAJOR"
- },
- {
- "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
- "closedLoopEventStatus": "ONSET",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
- "thresholdValue": 5000,
- "direction": "GREATER_OR_EQUAL",
- "severity": "CRITICAL"
- }
- ]
- }
- ]
+ "tca_policy": {
+ "domain": "measurementsForVfScaling",
+ "metricsPerEventName": [
+ {
+ "eventName": "vLoadBalancer",
+ "controlLoopSchemaType": "VNF",
+ "policyScope": "resource=vLoadBalancer;type=configuration",
+ "policyName": "onap.vfirewall.tca",
+ "policyVersion": "v0.0.1",
+ "thresholds": [
+ {
+ "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
+ "closedLoopEventStatus": "ONSET",
+ "version": "1.0.2",
+ "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
+ "thresholdValue": 500,
+ "direction": "LESS_OR_EQUAL",
+ "severity": "MAJOR"
+ },
+ {
+ "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
+ "closedLoopEventStatus": "ONSET",
+ "version": "1.0.2",
+ "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
+ "thresholdValue": 5000,
+ "direction": "GREATER_OR_EQUAL",
+ "severity": "CRITICAL"
+ }
+ ]
+ }
+ ]
+ }
}
}
}
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml b/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml
index c59b89060..bce8b366f 100644
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml
+++ b/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml
@@ -8,28 +8,29 @@ topology_template:
metadata:
policy-id: onap.vfirewall.tca
properties:
- domain: measurementsForVfScaling
- metricsPerEventName:
- -
- eventName: vLoadBalancer
- controlLoopSchemaType: VNF
- policyScope: "resource=vLoadBalancer;type=configuration"
- policyName: "onap.vfirewall.tca"
- policyVersion: "v0.0.1"
- thresholds:
- -
- closedLoopControlName: "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a"
- closedLoopEventStatus: ONSET
- version: "1.0.2"
- fieldPath: "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated"
- thresholdValue: 500
- direction: LESS_OR_EQUAL
- severity: MAJOR
- -
- closedLoopControlName: "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a"
- closedLoopEventStatus: ONSET
- version: "1.0.2"
- fieldPath: "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated"
- thresholdValue: 5000
- direction: GREATER_OR_EQUAL
- severity: CRITICAL \ No newline at end of file
+ tca_policy:
+ domain: measurementsForVfScaling
+ metricsPerEventName:
+ -
+ eventName: vLoadBalancer
+ controlLoopSchemaType: VNF
+ policyScope: "resource=vLoadBalancer;type=configuration"
+ policyName: "onap.vfirewall.tca"
+ policyVersion: "v0.0.1"
+ thresholds:
+ -
+ closedLoopControlName: "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a"
+ closedLoopEventStatus: ONSET
+ version: "1.0.2"
+ fieldPath: "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated"
+ thresholdValue: 500
+ direction: LESS_OR_EQUAL
+ severity: MAJOR
+ -
+ closedLoopControlName: "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a"
+ closedLoopEventStatus: ONSET
+ version: "1.0.2"
+ fieldPath: "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated"
+ thresholdValue: 5000
+ direction: GREATER_OR_EQUAL
+ severity: CRITICAL \ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.output.tosca.yaml b/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.output.tosca.yaml
new file mode 100644
index 000000000..eb3165f6e
--- /dev/null
+++ b/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.output.tosca.yaml
@@ -0,0 +1,37 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+topology_template:
+ policies:
+ -
+ onap.vfirewall.tca:
+ type: onap.policy.monitoring.cdap.tca.hi.lo.app
+ version: 1.0.0
+ metadata:
+ policy-id: onap.vfirewall.tca
+ policy-version: 1
+ properties:
+ tca_policy:
+ domain: measurementsForVfScaling
+ metricsPerEventName:
+ -
+ eventName: vLoadBalancer
+ controlLoopSchemaType: VNF
+ policyScope: "resource=vLoadBalancer;type=configuration"
+ policyName: "onap.vfirewall.tca"
+ policyVersion: "v0.0.1"
+ thresholds:
+ -
+ closedLoopControlName: "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a"
+ closedLoopEventStatus: ONSET
+ version: "1.0.2"
+ fieldPath: "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated"
+ thresholdValue: 500
+ direction: LESS_OR_EQUAL
+ severity: MAJOR
+ -
+ closedLoopControlName: "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a"
+ closedLoopEventStatus: ONSET
+ version: "1.0.2"
+ fieldPath: "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated"
+ thresholdValue: 5000
+ direction: GREATER_OR_EQUAL
+ severity: CRITICAL \ No newline at end of file