Update monitoring policies with tcaPolicy 68/82468/4
authorPamela Dragosh <pdragosh@research.att.com>
Fri, 15 Mar 2019 17:19:10 +0000 (13:19 -0400)
committerPamela Dragosh <pdragosh@research.att.com>
Fri, 15 Mar 2019 18:51:49 +0000 (14:51 -0400)
To match the model.

Issue-ID: POLICY-1195
Change-Id: I939d5080b31cf63cdf51602a9b7bdfa5ece716eb
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
models-tosca/src/test/java/org/onap/policy/models/tosca/serialization/MonitoringPolicySerializationTest.java
models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.json
models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.yaml
models-tosca/src/test/resources/policies/vCPE.policy.monitoring.output.tosca.yaml
models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.json
models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.yaml
models-tosca/src/test/resources/policies/vDNS.policy.monitoring.output.tosca.yaml
models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.json
models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml
models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.output.tosca.yaml [new file with mode: 0644]

index 07f5bca..8d0c8d4 100644 (file)
@@ -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());
     }
 }
index 27de380..0eabb57 100644 (file)
@@ -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"
+                                        }
+                                    ]
+                                }
+                            ]
+                        }
                     }
                 }
             }
index a193cba..00afec3 100644 (file)
@@ -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
index 53ac55d..a8a1cda 100644 (file)
@@ -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
index 69b5212..2188cb2 100644 (file)
@@ -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"
+                                    }
+                                ]
+                            }
+                        ]
+                    }
                 }
             }
         }
index 054b994..6735c39 100644 (file)
@@ -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
index 5a2fac7..669e894 100644 (file)
@@ -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
index 1593d20..93545a0 100644 (file)
@@ -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"
+                                    }
+                                ]
+                            }
+                        ]
+                    }
                 }
             }
         }
index c59b890..bce8b36 100644 (file)
@@ -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 (file)
index 0000000..eb3165f
--- /dev/null
@@ -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