Move examples into separate module
Issue-ID: POLICY-1195
Change-Id: Id2dc5b5b490134648ca267e27b795f3f4c03bc7b
Signed-off-by: liamfallon <liam.fallon@est.tech>
diff --git a/models-tosca/pom.xml b/models-tosca/pom.xml
index 56c8d7c..019c5b3 100644
--- a/models-tosca/pom.xml
+++ b/models-tosca/pom.xml
@@ -40,6 +40,12 @@
</dependency>
<dependency>
+ <groupId>org.onap.policy.models</groupId>
+ <artifactId>policy-models-examples</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.onap.policy.common</groupId>
<artifactId>gson</artifactId>
<version>${policy.common.version}</version>
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/ToscaEntityType.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/ToscaEntityType.java
index 8b6dd40..7eaf58b 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/ToscaEntityType.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/ToscaEntityType.java
@@ -30,11 +30,10 @@
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
-import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
+import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;
-import javax.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -54,8 +53,7 @@
/**
* Class to represent the EntrySchema of list/map property in TOSCA definition.
*/
-@Entity
-@Table(name = "ToscaEntityType")
+@MappedSuperclass
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Data
@EqualsAndHashCode(callSuper = false)
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/serialization/ToscaPoliciesJsonAdapter.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/serialization/ToscaPoliciesJsonAdapter.java
index 424373c..3f25b70 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/serialization/ToscaPoliciesJsonAdapter.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/serialization/ToscaPoliciesJsonAdapter.java
@@ -30,7 +30,6 @@
import java.lang.reflect.Type;
import java.util.Iterator;
-import java.util.Map.Entry;
import lombok.NonNull;
import org.onap.policy.models.base.PfConceptKey;
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/serialization/LegacyOperationalPolicySerializationTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/serialization/LegacyOperationalPolicySerializationTest.java
index 7672104..3c9deb7 100644
--- a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/serialization/LegacyOperationalPolicySerializationTest.java
+++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/serialization/LegacyOperationalPolicySerializationTest.java
@@ -31,7 +31,7 @@
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.common.utils.resources.TextFileUtils;
+import org.onap.policy.common.utils.resources.ResourceUtils;
import org.onap.policy.models.base.PfValidationResult;
import org.onap.policy.models.tosca.legacy.concepts.LegacyOperationalPolicy;
import org.onap.policy.models.tosca.legacy.mapping.LegacyOperationalPolicyMapper;
@@ -57,9 +57,9 @@
@Test
public void testJsonDeserialization() throws JsonSyntaxException, IOException {
- LegacyOperationalPolicy legacyOperationalPolicy = gson.fromJson(
- TextFileUtils.getTextFileAsString("src/test/resources/policies/vCPE.policy.operational.input.json"),
- LegacyOperationalPolicy.class);
+ String vcpePolicyJson = ResourceUtils.getResourceAsString("policies/vCPE.policy.operational.input.json");
+
+ LegacyOperationalPolicy legacyOperationalPolicy = gson.fromJson(vcpePolicyJson, LegacyOperationalPolicy.class);
ToscaServiceTemplate serviceTemplate =
new LegacyOperationalPolicyMapper().toToscaServiceTemplate(legacyOperationalPolicy);
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicySerializationTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicySerializationTest.java
index 4c3cbc8..565fd6c 100644
--- a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicySerializationTest.java
+++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicySerializationTest.java
@@ -31,7 +31,7 @@
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.common.utils.resources.TextFileUtils;
+import org.onap.policy.common.utils.resources.ResourceUtils;
import org.onap.policy.models.base.PfValidationResult;
import org.onap.policy.models.tosca.simple.concepts.ToscaServiceTemplate;
import org.onap.policy.models.tosca.simple.serialization.ToscaServiceTemplateMessageBodyHandler;
@@ -57,11 +57,9 @@
@Test
public void testJsonDeserialization() throws JsonSyntaxException, IOException {
- ToscaServiceTemplate serviceTemplate = gson.fromJson(
- TextFileUtils
- .getTextFileAsString("src/test/resources/policies/vCPE.policy.monitoring.input.tosca.json"),
- ToscaServiceTemplate.class);
+ String vcpePolicyJson = ResourceUtils.getResourceAsString("policies/vCPE.policy.monitoring.input.tosca.json");
+ ToscaServiceTemplate serviceTemplate = gson.fromJson(vcpePolicyJson, ToscaServiceTemplate.class);
assertNotNull(serviceTemplate);
LOGGER.info(serviceTemplate.validate(new PfValidationResult()).toString());
assertTrue(serviceTemplate.validate(new PfValidationResult()).isValid());
@@ -73,8 +71,9 @@
@Test
public void testYamlDeserialization() throws JsonSyntaxException, IOException {
Yaml yaml = new Yaml();
- Object yamlObject = yaml.load(TextFileUtils
- .getTextFileAsString("src/test/resources/policies/vCPE.policy.monitoring.input.tosca.yaml"));
+
+ String vcpePolicyYaml = ResourceUtils.getResourceAsString("policies/vCPE.policy.monitoring.input.tosca.yaml");
+ Object yamlObject = yaml.load(vcpePolicyYaml);
String yamlAsJsonString = new Gson().toJson(yamlObject);
diff --git a/models-tosca/src/test/resources/policies/README.txt b/models-tosca/src/test/resources/policies/README.txt
deleted file mode 100644
index 942913d..0000000
--- a/models-tosca/src/test/resources/policies/README.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-The "input" prefix indicates that this is what the payload looks like on the POST. While the "output" prefix
-indicates that this is what the payload looks like when the response goes back to the caller.
-
-For each of the use cases, there is at least one configuration policy for DCAE Microservice.
-
-*.monitoring.input.[json|yaml] <-- POST request
-
-*.monitoring.output.[json|yaml] --> POST response
-
-The Operational Policies:
-
-*.operational.input.yaml --> Can Pam change this to JSON??
-
-*.operational.output.json --> POST response
-
-The Guard Policies:
-
-*.guard.[frequency|minmax].json <-- POST request
-
-*.guard.[frequency|minmax].json --> POST response
-
-For DBAO, the following are internal TOSCA Representations for the Operational and Guard policies, with the
-contents of the yaml or JSON URL Encoded:
-
-*.output.tosca.yaml
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
deleted file mode 100644
index 0eabb57..0000000
--- a/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "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",
- "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"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
\ No newline at end of file
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
deleted file mode 100644
index 00afec3..0000000
--- a/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-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
- 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
\ 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
deleted file mode 100644
index a8a1cda..0000000
--- a/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.output.tosca.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-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
- metadata:
- policy-id: onap.restart.tca
- policy-version: 1
- 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
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.operational.input.json b/models-tosca/src/test/resources/policies/vCPE.policy.operational.input.json
deleted file mode 100644
index 393cb02..0000000
--- a/models-tosca/src/test/resources/policies/vCPE.policy.operational.input.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "policy-id" : "operational.restart",
- "content" : "controlLoop%3A%0A%20%20version%3A%202.0.0%0A%20%20controlLoopName%3A%20ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0A%20%20trigger_policy%3A%20unique-policy-id-1-restart%0A%20%20timeout%3A%203600%0A%20%20abatement%3A%20true%0A%20%0Apolicies%3A%0A%20%20-%20id%3A%20unique-policy-id-1-restart%0A%20%20%20%20name%3A%20Restart%20the%20VM%0A%20%20%20%20description%3A%0A%20%20%20%20actor%3A%20APPC%0A%20%20%20%20recipe%3A%20Restart%0A%20%20%20%20target%3A%0A%20%20%20%20%20%20type%3A%20VM%0A%20%20%20%20retry%3A%203%0A%20%20%20%20timeout%3A%201200%0A%20%20%20%20success%3A%20final_success%0A%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20failure_guard%3A%20final_failure_guard"
-}
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.operational.input.tosca.yaml b/models-tosca/src/test/resources/policies/vCPE.policy.operational.input.tosca.yaml
deleted file mode 100644
index dda0169..0000000
--- a/models-tosca/src/test/resources/policies/vCPE.policy.operational.input.tosca.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-topology_template:
- policies:
- -
- operational.restart:
- type: onap.policies.controlloop.Operational
- version: 1.0.0
- metadata:
- policy-id: operational.restart
- properties:
- controlLoop:
- version: 2.0.0
- controlLoopName: ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
- trigger_policy: unique-policy-id-1-restart
- timeout: 3600
- abatement: true
-
- policies:
- - id: unique-policy-id-1-restart
- name: Restart the VM
- description:
- actor: APPC
- recipe: Restart
- target:
- type: VM
- retry: 3
- timeout: 1200
- success: final_success
- failure: final_failure
- failure_timeout: final_failure_timeout
- failure_retries: final_failure_retries
- failure_exception: final_failure_exception
- failure_guard: final_failure_guard
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.json b/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.json
deleted file mode 100644
index 7d26e8e..0000000
--- a/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "policy-id" : "operational.restart",
- "policy-version" : "1",
- "content" : "controlLoop%3A%0A%20%20version%3A%202.0.0%0A%20%20controlLoopName%3A%20ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0A%20%20trigger_policy%3A%20unique-policy-id-1-restart%0A%20%20timeout%3A%203600%0A%20%20abatement%3A%20true%0A%20%0Apolicies%3A%0A%20%20-%20id%3A%20unique-policy-id-1-restart%0A%20%20%20%20name%3A%20Restart%20the%20VM%0A%20%20%20%20description%3A%0A%20%20%20%20actor%3A%20APPC%0A%20%20%20%20recipe%3A%20Restart%0A%20%20%20%20target%3A%0A%20%20%20%20%20%20type%3A%20VM%0A%20%20%20%20retry%3A%203%0A%20%20%20%20timeout%3A%201200%0A%20%20%20%20success%3A%20final_success%0A%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20failure_guard%3A%20final_failure_guard"
-}
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.tosca.json b/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.tosca.json
deleted file mode 100644
index d738537..0000000
--- a/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.tosca.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "topology_template": {
- "policies": [
- {
- "operational.restart": {
- "type": "onap.policies.controlloop.Operational",
- "version": "1.0.0",
- "metadata": {
- "policy-id": "operational.restart",
- "policy-version": 1
- },
- "properties": {
- "controlLoop": {
- "version": "2.0.0",
- "controlLoopName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "trigger_policy": "unique-policy-id-1-restart",
- "timeout": 3600,
- "abatement": true
- },
- "policies": [
- {
- "id": "unique-policy-id-1-restart",
- "name": "Restart the VM",
- "description": null,
- "actor": "APPC",
- "recipe": "Restart",
- "target": {
- "type": "VM"
- },
- "retry": 3,
- "timeout": 1200,
- "success": "final_success",
- "failure": "final_failure",
- "failure_timeout": "final_failure_timeout",
- "failure_retries": "final_failure_retries",
- "failure_exception": "final_failure_exception",
- "failure_guard": "final_failure_guard"
- }
- ]
- }
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.tosca.yaml b/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.tosca.yaml
deleted file mode 100644
index e4a0694..0000000
--- a/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.tosca.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-topology_template:
- policies:
- -
- operational.restart:
- type: onap.policies.controlloop.Operational
- version: 1.0.0
- metadata:
- policy-id: operational.restart
- policy-version: 1
- properties:
- controlLoop:
- version: 2.0.0
- controlLoopName: ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
- trigger_policy: unique-policy-id-1-restart
- timeout: 3600
- abatement: true
-
- policies:
- - id: unique-policy-id-1-restart
- name: Restart the VM
- description:
- actor: APPC
- recipe: Restart
- target:
- type: VM
- retry: 3
- timeout: 1200
- success: final_success
- failure: final_failure
- failure_timeout: final_failure_timeout
- failure_retries: final_failure_retries
- failure_exception: final_failure_exception
- failure_guard: final_failure_guard
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.guard.frequency.input.json b/models-tosca/src/test/resources/policies/vDNS.policy.guard.frequency.input.json
deleted file mode 100644
index 442f3ec..0000000
--- a/models-tosca/src/test/resources/policies/vDNS.policy.guard.frequency.input.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "policy-id" : "guard.frequency.scaleout",
- "content" : {
- "actor": "SO",
- "recipe": "scaleOut",
- "targets": ".*",
- "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
- "limit": "1",
- "timeWindow": "10",
- "timeUnits": "minute",
- "guardActiveStart": "00:00:01-05:00",
- "guardActiveEnd": "23:59:59-05:00"
- }
-}
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.guard.frequency.output.json b/models-tosca/src/test/resources/policies/vDNS.policy.guard.frequency.output.json
deleted file mode 100644
index 48c92c3..0000000
--- a/models-tosca/src/test/resources/policies/vDNS.policy.guard.frequency.output.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "guard.frequency.scaleout": {
- "type": "onap.policies.controlloop.guard.FrequencyLimiter",
- "version": "1.0.0",
- "metadata": {
- "policy-id": "guard.frequency.scaleout",
- "policy-version": 1
- },
- "properties": {
- "content": {
- "actor": "SO",
- "recipe": "scaleOut",
- "targets": ".*",
- "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
- "limit": "1",
- "timeWindow": "10",
- "timeUnits": "minute",
- "guardActiveStart": "00:00:01-05:00",
- "guardActiveEnd": "23:59:59-05:00"
- }
- }
- }
-}
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.guard.minmax.input.json b/models-tosca/src/test/resources/policies/vDNS.policy.guard.minmax.input.json
deleted file mode 100644
index c62a229..0000000
--- a/models-tosca/src/test/resources/policies/vDNS.policy.guard.minmax.input.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-{
- "policy-id" : "guard.minmax.scaleout",
- "contents" : {
- "actor": "SO",
- "recipe": "scaleOut",
- "targets": ".*",
- "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
- "min": "1",
- "max": "5",
- "guardActiveStart": "00:00:01-05:00",
- "guardActiveEnd": "23:59:59-05:00"
- }
-}
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.guard.minmax.output.json b/models-tosca/src/test/resources/policies/vDNS.policy.guard.minmax.output.json
deleted file mode 100644
index 83d2f27..0000000
--- a/models-tosca/src/test/resources/policies/vDNS.policy.guard.minmax.output.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "guard.minmax.scaleout": {
- "type": "onap.policies.controlloop.guard.MinMax",
- "version": "1.0.0",
- "metadata": {
- "policy-id": "guard.minmax.scaleout",
- "policy-version": 1
- }
- }
-}
\ 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
deleted file mode 100644
index 2188cb2..0000000
--- a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policies": [
- {
- "onap.scaleout.tca": {
- "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
- "version": "1.0.0",
- "metadata": {
- "policy-id": "onap.scaleout.tca"
- },
- "properties": {
- "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"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
-}
\ No newline at end of file
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
deleted file mode 100644
index 6735c39..0000000
--- a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-topology_template:
- policies:
- -
- onap.scaleout.tca:
- type: onap.policies.monitoring.cdap.tca.hi.lo.app
- version: 1.0.0
- metadata:
- policy-id: onap.scaleout.tca
- properties:
- 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.output.tosca.yaml b/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.output.tosca.yaml
deleted file mode 100644
index 669e894..0000000
--- a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.output.tosca.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-topology_template:
- policies:
- -
- onap.scaleout.tca:
- type: onap.policies.monitoring.cdap.tca.hi.lo.app
- version: 1.0.0
- metadata:
- policy-id: onap.scaleout.tca
- policy-version: 1
- properties:
- 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.operational.input.json b/models-tosca/src/test/resources/policies/vDNS.policy.operational.input.json
deleted file mode 100644
index dabde01..0000000
--- a/models-tosca/src/test/resources/policies/vDNS.policy.operational.input.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "policy-id" : "operational.scaleout",
- "content" : "controlLoop%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20version%3A%202.0.0%0A%20%20%20%20%20%20%20%20%20%20%20%20%20controlLoopName%3A%20ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0A%20%20%20%20%20%20%20%20%20%20%20%20%20trigger_policy%3A%20unique-policy-id-1-scale-up%0A%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%201200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20abatement%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%20policies%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20-%20id%3A%20unique-policy-id-1-scale-up%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20Create%20a%20new%20VF%20Module%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20description%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20actor%3A%20SO%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20recipe%3A%20VF%20Module%20Create%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20target%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20VNF%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20payload%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20requestParameters%3A%20'%7B%22usePreload%22%3Atrue%2C%22userParams%22%3A%5B%5D%7D'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20configurationParameters%3A%20'%5B%7B%22ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B9%5D%22%2C%22oam-ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B16%5D%22%2C%22enabled%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B23%5D%22%7D%5D'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20retry%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%201200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20success%3A%20final_success%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_guard%3A%20final_failure_guard"
-}
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.operational.input.tosca.yaml b/models-tosca/src/test/resources/policies/vDNS.policy.operational.input.tosca.yaml
deleted file mode 100644
index 0f54988..0000000
--- a/models-tosca/src/test/resources/policies/vDNS.policy.operational.input.tosca.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-topology_template:
- policies:
- -
- operational.scaleout:
- type: onap.policies.controlloop.Operational
- version: 1.0.0
- metadata:
- policy-id: operational.scaleout
- properties:
- controlLoop:
- version: 2.0.0
- controlLoopName: ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
- trigger_policy: unique-policy-id-1-scale-up
- timeout: 1200
- abatement: false
- policies:
- - id: unique-policy-id-1-scale-up
- name: Create a new VF Module
- description:
- actor: SO
- recipe: VF Module Create
- target:
- type: VNF
- payload:
- requestParameters: '{"usePreload":true,"userParams":[]}'
- configurationParameters: '[{"ip-addr":"$.vf-module-topology.vf-module-parameters.param[9]","oam-ip-addr":"$.vf-module-topology.vf-module-parameters.param[16]","enabled":"$.vf-module-topology.vf-module-parameters.param[23]"}]'
- retry: 0
- timeout: 1200
- success: final_success
- failure: final_failure
- failure_timeout: final_failure_timeout
- failure_retries: final_failure_retries
- failure_exception: final_failure_exception
- failure_guard: final_failure_guard
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.json b/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.json
deleted file mode 100644
index 5ce44e0..0000000
--- a/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "policy-id" : "operational.scaleout",
- "policy-version" : "1",
- "content" : "controlLoop%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20version%3A%202.0.0%0A%20%20%20%20%20%20%20%20%20%20%20%20%20controlLoopName%3A%20ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0A%20%20%20%20%20%20%20%20%20%20%20%20%20trigger_policy%3A%20unique-policy-id-1-scale-up%0A%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%201200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20abatement%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%20policies%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20-%20id%3A%20unique-policy-id-1-scale-up%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20Create%20a%20new%20VF%20Module%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20description%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20actor%3A%20SO%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20recipe%3A%20VF%20Module%20Create%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20target%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20VNF%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20payload%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20requestParameters%3A%20'%7B%22usePreload%22%3Atrue%2C%22userParams%22%3A%5B%5D%7D'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20configurationParameters%3A%20'%5B%7B%22ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B9%5D%22%2C%22oam-ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B16%5D%22%2C%22enabled%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B23%5D%22%7D%5D'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20retry%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%201200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20success%3A%20final_success%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_guard%3A%20final_failure_guard"
-}
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.tosca.json b/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.tosca.json
deleted file mode 100644
index 2478ff0..0000000
--- a/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.tosca.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "topology_template": {
- "policies": [
- {
- "operational.scaleout": {
- "type": "onap.policies.controlloop.Operational",
- "version": "1.0.0",
- "metadata": {
- "policy-id": "operational.scaleout",
- "policy-version": 1
- },
- "properties": null,
- "controlLoop": {
- "version": "2.0.0",
- "controlLoopName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
- "trigger_policy": "unique-policy-id-1-scale-up",
- "timeout": 1200,
- "abatement": false
- },
- "policies": [
- {
- "id": "unique-policy-id-1-scale-up",
- "name": "Create a new VF Module",
- "description": null,
- "actor": "SO",
- "recipe": "VF Module Create",
- "target": {
- "type": "VNF"
- },
- "payload": {
- "requestParameters": "{\"usePreload\":true,\"userParams\":[]}",
- "configurationParameters": "[{\"ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[9]\",\"oam-ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[16]\",\"enabled\":\"$.vf-module-topology.vf-module-parameters.param[23]\"}]"
- },
- "retry": 0,
- "timeout": 1200,
- "success": "final_success",
- "failure": "final_failure",
- "failure_timeout": "final_failure_timeout",
- "failure_retries": "final_failure_retries",
- "failure_exception": "final_failure_exception",
- "failure_guard": "final_failure_guard"
- }
- ]
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.tosca.yaml b/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.tosca.yaml
deleted file mode 100644
index a09a235..0000000
--- a/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.tosca.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-topology_template:
- policies:
- -
- operational.scaleout:
- type: onap.policies.controlloop.Operational
- version: 1.0.0
- metadata:
- policy-id: operational.scaleout
- policy-version: 1
- properties:
- controlLoop:
- version: 2.0.0
- controlLoopName: ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
- trigger_policy: unique-policy-id-1-scale-up
- timeout: 1200
- abatement: false
- policies:
- - id: unique-policy-id-1-scale-up
- name: Create a new VF Module
- description:
- actor: SO
- recipe: VF Module Create
- target:
- type: VNF
- payload:
- requestParameters: '{"usePreload":true,"userParams":[]}'
- configurationParameters: '[{"ip-addr":"$.vf-module-topology.vf-module-parameters.param[9]","oam-ip-addr":"$.vf-module-topology.vf-module-parameters.param[16]","enabled":"$.vf-module-topology.vf-module-parameters.param[23]"}]'
- retry: 0
- timeout: 1200
- success: final_success
- failure: final_failure
- failure_timeout: final_failure_timeout
- failure_retries: final_failure_retries
- failure_exception: final_failure_exception
- failure_guard: final_failure_guard
\ No newline at end of file
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
deleted file mode 100644
index 93545a0..0000000
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policies": [
- {
- "onap.vfirewall.tca": {
- "type": "onap.policy.monitoring.cdap.tca.hi.lo.app",
- "version": "1.0.0",
- "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
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
deleted file mode 100644
index bce8b36..0000000
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-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
- 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
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
deleted file mode 100644
index eb3165f..0000000
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.output.tosca.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-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
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.json b/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.json
deleted file mode 100644
index 623a689..0000000
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "policy-id" : "operational.modifyconfig",
- "content" : "controlLoop%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20version%3A%202.0.0%0A%20%20%20%20%20%20%20%20%20%20%20%20%20controlLoopName%3A%20ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0A%20%20%20%20%20%20%20%20%20%20%20%20%20trigger_policy%3A%20unique-policy-id-1-modifyConfig%0A%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%201200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20abatement%3A%20false%0A%20%0A%20%20%20%20%20%20%20%20%20%20%20policies%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20-%20id%3A%20unique-policy-id-1-modifyConfig%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20modify%20packet%20gen%20config%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20description%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20actor%3A%20APPC%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20recipe%3A%20ModifyConfig%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20target%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20TBD%20-%20Cannot%20be%20known%20until%20instantiation%20is%20done%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20resourceID%3A%20Eace933104d443b496b8.nodes.heat.vpg%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20VNF%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20retry%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%20300%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20success%3A%20final_success%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_guard%3A%20final_failure_guard"
-}
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.tosca.json b/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.tosca.json
deleted file mode 100644
index 63c0d8b..0000000
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.tosca.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "topology_template": {
- "policies": [
- {
- "operational.modifyconfig": {
- "type": "onap.policies.controlloop.Operational",
- "version": "1.0.0",
- "metadata": {
- "policy-id": "operational.modifyconfig"
- },
- "properties": {
- "controlLoop": {
- "version": "2.0.0",
- "controlLoopName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
- "trigger_policy": "unique-policy-id-1-modifyConfig",
- "timeout": 1200,
- "abatement": false
- },
- "policies": [
- {
- "id": "unique-policy-id-1-modifyConfig",
- "name": "modify packet gen config",
- "description": null,
- "actor": "APPC",
- "recipe": "ModifyConfig",
- "target": {
- "resourceID": "Eace933104d443b496b8.nodes.heat.vpg",
- "type": "VNF"
- },
- "retry": 0,
- "timeout": 300,
- "success": "final_success",
- "failure": "final_failure",
- "failure_timeout": "final_failure_timeout",
- "failure_retries": "final_failure_retries",
- "failure_exception": "final_failure_exception",
- "failure_guard": "final_failure_guard"
- }
- ]
- }
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.tosca.yaml b/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.tosca.yaml
deleted file mode 100644
index ca36d53..0000000
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.tosca.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-topology_template:
- policies:
- -
- operational.modifyconfig:
- type: onap.policies.controlloop.Operational
- version: 1.0.0
- metadata:
- policy-id: operational.modifyconfig
- properties:
- controlLoop:
- version: 2.0.0
- controlLoopName: ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
- trigger_policy: unique-policy-id-1-modifyConfig
- timeout: 1200
- abatement: false
-
- policies:
- - id: unique-policy-id-1-modifyConfig
- name: modify packet gen config
- description:
- actor: APPC
- recipe: ModifyConfig
- target:
- # TBD - Cannot be known until instantiation is done
- resourceID: Eace933104d443b496b8.nodes.heat.vpg
- type: VNF
- retry: 0
- timeout: 300
- success: final_success
- failure: final_failure
- failure_timeout: final_failure_timeout
- failure_retries: final_failure_retries
- failure_exception: final_failure_exception
- failure_guard: final_failure_guard
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.output.json b/models-tosca/src/test/resources/policies/vFirewall.policy.operational.output.json
deleted file mode 100644
index bb8b907..0000000
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.output.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "policy-id" : "operational.modifyconfig",
- "policy-version" : "1",
- "content" : "controlLoop%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20version%3A%202.0.0%0A%20%20%20%20%20%20%20%20%20%20%20%20%20controlLoopName%3A%20ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0A%20%20%20%20%20%20%20%20%20%20%20%20%20trigger_policy%3A%20unique-policy-id-1-modifyConfig%0A%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%201200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20abatement%3A%20false%0A%20%0A%20%20%20%20%20%20%20%20%20%20%20policies%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20-%20id%3A%20unique-policy-id-1-modifyConfig%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20modify%20packet%20gen%20config%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20description%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20actor%3A%20APPC%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20recipe%3A%20ModifyConfig%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20target%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20TBD%20-%20Cannot%20be%20known%20until%20instantiation%20is%20done%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20resourceID%3A%20Eace933104d443b496b8.nodes.heat.vpg%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20VNF%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20retry%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20timeout%3A%20300%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20success%3A%20final_success%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20failure_guard%3A%20final_failure_guard"
-}
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.output.tosca.yaml b/models-tosca/src/test/resources/policies/vFirewall.policy.operational.output.tosca.yaml
deleted file mode 100644
index 42ea511..0000000
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.output.tosca.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-topology_template:
- policies:
- -
- operational.modifyconfig:
- type: onap.policies.controlloop.Operational
- version: 1.0.0
- metadata:
- policy-id: operational.modifyconfig
- policy-version: 1
- properties:
- controlLoop:
- version: 2.0.0
- controlLoopName: ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
- trigger_policy: unique-policy-id-1-modifyConfig
- timeout: 1200
- abatement: false
-
- policies:
- - id: unique-policy-id-1-modifyConfig
- name: modify packet gen config
- description:
- actor: APPC
- recipe: ModifyConfig
- target:
- # TBD - Cannot be known until instantiation is done
- resourceID: Eace933104d443b496b8.nodes.heat.vpg
- type: VNF
- retry: 0
- timeout: 300
- success: final_success
- failure: final_failure
- failure_timeout: final_failure_timeout
- failure_retries: final_failure_retries
- failure_exception: final_failure_exception
- failure_guard: final_failure_guard
\ No newline at end of file
diff --git a/models-tosca/src/test/resources/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml b/models-tosca/src/test/resources/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml
deleted file mode 100644
index 5a093dd..0000000
--- a/models-tosca/src/test/resources/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-policy_types:
- version: 1.0.0
- onap.policies.Monitoring:
- derived_from: tosca.policies.Root
- description: a base policy type for all policies that govern monitoring provision
- version: 1.0.0
- onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server:
- derived_from: policy.nodes.Root
- version: 1.0.0
- properties:
- buscontroller_feed_publishing_endpoint:
- type: string
- description: DMAAP Bus Controller feed endpoint
- datafile.policy:
- type: string
- description: datafile Policy JSON as string
diff --git a/models-tosca/src/test/resources/policytypes/onap.policy.monitoring.cdap.tca.hi.lo.app.yaml b/models-tosca/src/test/resources/policytypes/onap.policy.monitoring.cdap.tca.hi.lo.app.yaml
deleted file mode 100644
index 699cffd..0000000
--- a/models-tosca/src/test/resources/policytypes/onap.policy.monitoring.cdap.tca.hi.lo.app.yaml
+++ /dev/null
@@ -1,158 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-policy_types:
- onap.policies.Monitoring:
- derived_from: tosca.policies.Root
- description: a base policy type for all policies that governs monitoring provisioning
- onap.policy.monitoring.cdap.tca.hi.lo.app:
- derived_from: onap.policies.Monitoring
- version: 1.0.0
- properties:
- tca_policy:
- type: map
- description: TCA Policy JSON
- entry_schema:
- type: onap.datatypes.monitoring.tca_policy
-data_types:
- onap.datatypes.monitoring.metricsPerEventName:
- derived_from: tosca.datatypes.Root
- properties:
- controlLoopSchemaType:
- type: string
- required: true
- description: Specifies Control Loop Schema Type for the event Name e.g. VNF, VM
- constraints:
- - valid_values:
- - VM
- - VNF
- eventName:
- type: string
- required: true
- description: Event name to which thresholds need to be applied
- policyName:
- type: string
- required: true
- description: TCA Policy Scope Name
- policyScope:
- type: string
- required: true
- description: TCA Policy Scope
- policyVersion:
- type: string
- required: true
- description: TCA Policy Scope Version
- thresholds:
- type: list
- required: true
- description: Thresholds associated with eventName
- entry_schema:
- type: onap.datatypes.monitoring.thresholds
- onap.datatypes.monitoring.tca_policy:
- derived_from: tosca.datatypes.Root
- properties:
- domain:
- type: string
- required: true
- description: Domain name to which TCA needs to be applied
- default: measurementsForVfScaling
- constraints:
- - equal: measurementsForVfScaling
- metricsPerEventName:
- type: list
- required: true
- description: Contains eventName and threshold details that need to be applied to given eventName
- entry_schema:
- type: onap.datatypes.monitoring.metricsPerEventName
- onap.datatypes.monitoring.thresholds:
- derived_from: tosca.datatypes.Root
- properties:
- closedLoopControlName:
- type: string
- required: true
- description: Closed Loop Control Name associated with the threshold
- closedLoopEventStatus:
- type: string
- required: true
- description: Closed Loop Event Status of the threshold
- constraints:
- - valid_values:
- - ONSET
- - ABATED
- direction:
- type: string
- required: true
- description: Direction of the threshold
- constraints:
- - valid_values:
- - LESS
- - LESS_OR_EQUAL
- - GREATER
- - GREATER_OR_EQUAL
- - EQUAL
- fieldPath:
- type: string
- required: true
- description: Json field Path as per CEF message which needs to be analyzed for TCA
- constraints:
- - valid_values:
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated
- - $.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated
- - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle
- - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt
- - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice
- - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq
- - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal
- - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem
- - $.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait
- - $.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage
- - $.event.measurementsForVfScalingFields.meanRequestLatency
- - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered
- - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached
- - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured
- - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree
- - $.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed
- - $.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value
- severity:
- type: string
- required: true
- description: Threshold Event Severity
- constraints:
- - valid_values:
- - CRITICAL
- - MAJOR
- - MINOR
- - WARNING
- - NORMAL
- thresholdValue:
- type: integer
- required: true
- description: Threshold value for the field Path inside CEF message
- version:
- type: string
- required: true
- description: Version number associated with the threshold