From 88fd35f7b46041f723cff0eaaf4ea4ed46e9530f Mon Sep 17 00:00:00 2001 From: sebdet Date: Fri, 9 Oct 2020 16:32:12 +0200 Subject: Fix the DCAE query The DCAE deployment URL can contain URI parameters that crashes the URL used by HTTP4 Camel. Also the parameter connectionTimeToLive is removed as it is transmitted in each call. The SDC client is also updated to 1.4.1 Issue-ID: CLAMP-954 Signed-off-by: sebdet Change-Id: Ieebdfe009f4339188c75c7a3365546779a087561 Signed-off-by: sebdet --- .../clds/tosca/update/JsonTemplateManagerTest.java | 24 +- .../ToscaConverterWithDictionarySupportItCase.java | 3 +- .../.file | 96 ------ .../.header | 1 - .../api/v1/blueprint-model/workflow-spec/.file | 96 ++++++ .../api/v1/blueprint-model/workflow-spec/.header | 1 + .../1.0.0?connectionTimeToLive=5000/.file | 12 - .../1.0.0?connectionTimeToLive=5000/.header | 1 - .../baseconfiguration/version/1.0.0/.file | 12 + .../baseconfiguration/version/1.0.0/.header | 1 + .../.file | 46 --- .../.header | 1 - .../example/policy/api/v1/policytypes/.file | 46 +++ .../example/policy/api/v1/policytypes/.header | 1 + .../1.0.0?connectionTimeToLive=5000/.file | 38 --- .../1.0.0?connectionTimeToLive=5000/.header | 1 - .../versions/1.0.0/.file | 38 +++ .../versions/1.0.0/.header | 1 + .../1.0.0?connectionTimeToLive=5000/.file | 47 --- .../1.0.0?connectionTimeToLive=5000/.header | 1 - .../versions/1.0.0/.file | 47 +++ .../versions/1.0.0/.header | 1 + .../1.0.0?connectionTimeToLive=5000/.file | 80 ----- .../1.0.0?connectionTimeToLive=5000/.header | 1 - .../versions/1.0.0/.file | 80 +++++ .../versions/1.0.0/.header | 1 + .../2.0.0?connectionTimeToLive=5000/.file | 40 --- .../2.0.0?connectionTimeToLive=5000/.header | 1 - .../versions/2.0.0/.file | 40 +++ .../versions/2.0.0/.header | 1 + .../1.0.0?connectionTimeToLive=5000/.file | 360 --------------------- .../1.0.0?connectionTimeToLive=5000/.header | 1 - .../versions/1.0.0/.file | 360 +++++++++++++++++++++ .../versions/1.0.0/.header | 1 + .../1.0.0?connectionTimeToLive=5000/.file | 150 --------- .../1.0.0?connectionTimeToLive=5000/.header | 1 - .../versions/1.0.0/.file | 150 +++++++++ .../versions/1.0.0/.header | 1 + .../1.0.0?connectionTimeToLive=5000/.file | 158 --------- .../1.0.0?connectionTimeToLive=5000/.header | 1 - .../versions/1.0.0/.file | 158 +++++++++ .../versions/1.0.0/.header | 1 + .../v1/pdps?connectionTimeToLive=5000/.file | 80 ----- .../v1/pdps?connectionTimeToLive=5000/.header | 1 - .../http-cache/example/policy/pap/v1/pdps/.file | 80 +++++ .../http-cache/example/policy/pap/v1/pdps/.header | 1 + src/test/resources/http-cache/third_party_proxy.py | 4 +- 47 files changed, 1133 insertions(+), 1134 deletions(-) delete mode 100644 src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec?connectionTimeToLive=5000/.file delete mode 100644 src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec?connectionTimeToLive=5000/.header create mode 100644 src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec/.file create mode 100644 src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec/.header delete mode 100644 src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0?connectionTimeToLive=5000/.file delete mode 100644 src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0?connectionTimeToLive=5000/.header create mode 100644 src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0/.file create mode 100644 src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0/.header delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.file delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.header create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/.file create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/.header delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0?connectionTimeToLive=5000/.file delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0?connectionTimeToLive=5000/.header create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0/.file create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0/.header delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0?connectionTimeToLive=5000/.file delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0?connectionTimeToLive=5000/.header create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0/.file create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0/.header delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0?connectionTimeToLive=5000/.file delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0?connectionTimeToLive=5000/.header create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0/.file create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0/.header delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0?connectionTimeToLive=5000/.file delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0?connectionTimeToLive=5000/.header create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0/.file create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0/.header delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.header create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/.file create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/.header delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.file delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.header create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/.file create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/.header delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0?connectionTimeToLive=5000/.file delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0?connectionTimeToLive=5000/.header create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/.file create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/.header delete mode 100644 src/test/resources/http-cache/example/policy/pap/v1/pdps?connectionTimeToLive=5000/.file delete mode 100644 src/test/resources/http-cache/example/policy/pap/v1/pdps?connectionTimeToLive=5000/.header create mode 100644 src/test/resources/http-cache/example/policy/pap/v1/pdps/.file create mode 100644 src/test/resources/http-cache/example/policy/pap/v1/pdps/.header (limited to 'src/test') diff --git a/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateManagerTest.java b/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateManagerTest.java index b9fcf51aa..504103559 100644 --- a/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateManagerTest.java +++ b/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateManagerTest.java @@ -45,9 +45,9 @@ public class JsonTemplateManagerTest extends TestCase { JsonTemplateManager jsonTemplateManager = new JsonTemplateManager( ResourceFileUtils.getResourceAsString("http-cache/example/policy/api/v1/policytypes/onap" - + ".policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0?" - + "connectionTimeToLive=5000/.file"), ResourceFileUtils.getResourceAsString( - "clds/tosca-converter/default-tosca-types.yaml"), + + ".policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/.file"), + ResourceFileUtils.getResourceAsString( + "clds/tosca-converter/default-tosca-types.yaml"), ResourceFileUtils.getResourceAsString("clds/tosca-converter/templates.json")); String componentName = "onap.policies.monitoring.cdap.tca.hi.lo.app"; jsonTemplateManager.getJsonSchemaForPolicyType(componentName, null, null); @@ -63,9 +63,9 @@ public class JsonTemplateManagerTest extends TestCase { JsonTemplateManager jsonTemplateManager = new JsonTemplateManager( ResourceFileUtils.getResourceAsString("http-cache/example/policy/api/v1/policytypes/onap" - + ".policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0?" - + "connectionTimeToLive=5000/.file"), ResourceFileUtils.getResourceAsString( - "clds/tosca-converter/default-tosca-types.yaml"), + + ".policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0/.file"), + ResourceFileUtils.getResourceAsString( + "clds/tosca-converter/default-tosca-types.yaml"), ResourceFileUtils.getResourceAsString("clds/tosca-converter/templates.json")); String componentName = "onap.policies.controlloop.guard.common.FrequencyLimiter"; jsonTemplateManager.getJsonSchemaForPolicyType(componentName, null, null); @@ -81,9 +81,9 @@ public class JsonTemplateManagerTest extends TestCase { JsonTemplateManager jsonTemplateManager = new JsonTemplateManager( ResourceFileUtils.getResourceAsString("http-cache/example/policy/api/v1/policytypes/onap" - + ".policies.controlloop.operational.common.Apex/versions/1.0.0?" - + "connectionTimeToLive=5000/.file"), ResourceFileUtils.getResourceAsString( - "clds/tosca-converter/default-tosca-types.yaml"), + + ".policies.controlloop.operational.common.Apex/versions/1.0.0/.file"), + ResourceFileUtils.getResourceAsString( + "clds/tosca-converter/default-tosca-types.yaml"), ResourceFileUtils.getResourceAsString("clds/tosca-converter/templates.json")); String componentName = "onap.policies.controlloop.operational.common.Apex"; jsonTemplateManager.getJsonSchemaForPolicyType(componentName, null, null); @@ -99,9 +99,9 @@ public class JsonTemplateManagerTest extends TestCase { JsonTemplateManager jsonTemplateManager = new JsonTemplateManager( ResourceFileUtils.getResourceAsString("http-cache/example/policy/api/v1/policytypes/onap" - + ".policies.controlloop.operational.common.Drools/versions/1.0.0?" - + "connectionTimeToLive=5000/.file"), ResourceFileUtils.getResourceAsString( - "clds/tosca-converter/default-tosca-types.yaml"), + + ".policies.controlloop.operational.common.Drools/versions/1.0.0/.file"), + ResourceFileUtils.getResourceAsString( + "clds/tosca-converter/default-tosca-types.yaml"), ResourceFileUtils.getResourceAsString("clds/tosca-converter/templates.json")); String componentName = "onap.policies.controlloop.operational.common.Drools"; jsonTemplateManager.getJsonSchemaForPolicyType(componentName, null, null); diff --git a/src/test/java/org/onap/clamp/clds/tosca/update/ToscaConverterWithDictionarySupportItCase.java b/src/test/java/org/onap/clamp/clds/tosca/update/ToscaConverterWithDictionarySupportItCase.java index b5b0247c8..1d4ee4311 100644 --- a/src/test/java/org/onap/clamp/clds/tosca/update/ToscaConverterWithDictionarySupportItCase.java +++ b/src/test/java/org/onap/clamp/clds/tosca/update/ToscaConverterWithDictionarySupportItCase.java @@ -132,8 +132,7 @@ public class ToscaConverterWithDictionarySupportItCase { JsonTemplateManager jsonTemplateManager = new JsonTemplateManager( ResourceFileUtils.getResourceAsString("http-cache/example/policy/api/v1/policytypes/onap" - + ".policies.controlloop.operational.common.Apex/versions/1.0" - + ".0?connectionTimeToLive=5000/.file"), + + ".policies.controlloop.operational.common.Apex/versions/1.0.0/.file"), ResourceFileUtils.getResourceAsString("clds/tosca-converter/default-tosca-types.yaml"), ResourceFileUtils.getResourceAsString("clds/tosca-converter/templates.json")); diff --git a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec?connectionTimeToLive=5000/.file deleted file mode 100644 index 9e616dfea..000000000 --- a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec?connectionTimeToLive=5000/.file +++ /dev/null @@ -1,96 +0,0 @@ -{ - "blueprintName": "baseconfiguration", - "version": "1.0.0", - "workFlowData": { - "workFlowName": "resource-assignment", - "inputs": { - "resource-assignment-properties": { - "required": true, - "type": "dt-resource-assignment-properties" - } - }, - "outputs": { - "response-property": { - "type": "string", - "value": "executed" - }, - "template-properties": { - "type": "json", - "value": { - "get_attribute": [ - "resource-assignment", - "assignment-params" - ] - } - } - } - }, - "dataTypes": { - "dt-resource-assignment-properties": { - "description": "This is Dynamically generated data type for workflow activate", - "version": "1.0.0", - "metadata": null, - "attributes": null, - "properties": { - "request-id": { - "required": true, - "type": "string", - "input-param": true - }, - "service-instance-id": { - "required": true, - "type": "string", - "input-param": true - }, - "vnf-id": { - "required": true, - "type": "string" - }, - "action-name": { - "required": true, - "type": "string" - }, - "scope-type": { - "required": true, - "type": "string" - }, - "hostname": { - "required": true, - "type": "string", - "input-param": true - }, - "request-info": { - "required": true, - "type": "dt-request-info-properties", - "input-param": true - }, - "vnf_name": { - "required": true, - "type": "string" - } - }, - "constraints": null, - "derived_from": "tosca.datatypes.Dynamic" - }, - "dt-request-info-properties": { - "description": "This is Dynamically generated data type for workflow activate", - "version": "1.0.0", - "metadata": null, - "attributes": null, - "properties": { - "prop1": { - "required": true, - "type": "string", - "input-param": true - }, - "prop2": { - "required": true, - "type": "string", - "input-param": true - } - }, - "constraints": null, - "derived_from": "tosca.datatypes.Dynamic" - } - } -} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec?connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec?connectionTimeToLive=5000/.header deleted file mode 100644 index 6a280d972..000000000 --- a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec?connectionTimeToLive=5000/.header +++ /dev/null @@ -1 +0,0 @@ -{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec/.file b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec/.file new file mode 100644 index 000000000..9e616dfea --- /dev/null +++ b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec/.file @@ -0,0 +1,96 @@ +{ + "blueprintName": "baseconfiguration", + "version": "1.0.0", + "workFlowData": { + "workFlowName": "resource-assignment", + "inputs": { + "resource-assignment-properties": { + "required": true, + "type": "dt-resource-assignment-properties" + } + }, + "outputs": { + "response-property": { + "type": "string", + "value": "executed" + }, + "template-properties": { + "type": "json", + "value": { + "get_attribute": [ + "resource-assignment", + "assignment-params" + ] + } + } + } + }, + "dataTypes": { + "dt-resource-assignment-properties": { + "description": "This is Dynamically generated data type for workflow activate", + "version": "1.0.0", + "metadata": null, + "attributes": null, + "properties": { + "request-id": { + "required": true, + "type": "string", + "input-param": true + }, + "service-instance-id": { + "required": true, + "type": "string", + "input-param": true + }, + "vnf-id": { + "required": true, + "type": "string" + }, + "action-name": { + "required": true, + "type": "string" + }, + "scope-type": { + "required": true, + "type": "string" + }, + "hostname": { + "required": true, + "type": "string", + "input-param": true + }, + "request-info": { + "required": true, + "type": "dt-request-info-properties", + "input-param": true + }, + "vnf_name": { + "required": true, + "type": "string" + } + }, + "constraints": null, + "derived_from": "tosca.datatypes.Dynamic" + }, + "dt-request-info-properties": { + "description": "This is Dynamically generated data type for workflow activate", + "version": "1.0.0", + "metadata": null, + "attributes": null, + "properties": { + "prop1": { + "required": true, + "type": "string", + "input-param": true + }, + "prop2": { + "required": true, + "type": "string", + "input-param": true + } + }, + "constraints": null, + "derived_from": "tosca.datatypes.Dynamic" + } + } +} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec/.header b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec/.header new file mode 100644 index 000000000..6a280d972 --- /dev/null +++ b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec/.header @@ -0,0 +1 @@ +{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0?connectionTimeToLive=5000/.file deleted file mode 100644 index 58975d86a..000000000 --- a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0?connectionTimeToLive=5000/.file +++ /dev/null @@ -1,12 +0,0 @@ -{ - "blueprintName": "baseconfiguration", - "version": "1.0.0", - "workflows": [ - "resource-assignment", - "activate", - "activate-restconf", - "activate-cli", - "assign-activate", - "imperative-test-wf" - ] -} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0?connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0?connectionTimeToLive=5000/.header deleted file mode 100644 index 6a280d972..000000000 --- a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0?connectionTimeToLive=5000/.header +++ /dev/null @@ -1 +0,0 @@ -{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0/.file b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0/.file new file mode 100644 index 000000000..58975d86a --- /dev/null +++ b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0/.file @@ -0,0 +1,12 @@ +{ + "blueprintName": "baseconfiguration", + "version": "1.0.0", + "workflows": [ + "resource-assignment", + "activate", + "activate-restconf", + "activate-cli", + "assign-activate", + "imperative-test-wf" + ] +} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0/.header b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0/.header new file mode 100644 index 000000000..6a280d972 --- /dev/null +++ b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0/.header @@ -0,0 +1 @@ +{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.file deleted file mode 100644 index 7f5b897bf..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.file +++ /dev/null @@ -1,46 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_1_0 -policy_types: - onap.policies.controlloop.operational.common.Drools: - version: 1.0.0 - description: Operational Policy for Control Loops using the Drools PDP - derived_from: onapy.policies.controlloop.Operational - properties: - # Omitted for brevity, see Section 1 - - onap.policies.controlloop.operational.common.Apex: - version: 1.0.0 - description: Operational Policy for Control Loops using the APEX PDP - derived_from: onap.policies.controlloop.Operational - properties: - # Omitted for brevity, see Section 1 - - onap.policies.controlloop.guard.common.FrequencyLimiter: - version: 1.0.0 - description: Supports limiting the frequency of actions being taken by a Actor. - derived_from: onap.policies.controlloop.Guard - properties: - # Omitted for brevity, see Section 1 - - onap.policies.controlloop.guard.common.Blacklist: - version: 1.0.0 - description: Supports blacklist of VNF's from performing control loop actions on. - derived_from: onap.policies.controlloop.Guard - properties: - # Omitted for brevity, see Section 1 - - onap.policies.controlloop.guard.common.MinMax: - version: 1.0.0 - description: Supports Min/Max number of VF Modules - derived_from: onap.policies.controlloop.Guard - properties: - # Omitted for brevity, see Section 1 - - onap.policies.controlloop.guard.common.MinMax: - version: 2.0.0 - description: Supports Min/Max number of VF Modules - derived_from: onap.policies.controlloop.Guard - properties: - # Omitted for brevity, see Section 1 - -data_types: - # Any bespoke data types referenced by policy type definitions[] diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.header deleted file mode 100644 index 6a280d972..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.header +++ /dev/null @@ -1 +0,0 @@ -{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/.file new file mode 100644 index 000000000..7f5b897bf --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/.file @@ -0,0 +1,46 @@ +tosca_definitions_version: tosca_simple_yaml_1_1_0 +policy_types: + onap.policies.controlloop.operational.common.Drools: + version: 1.0.0 + description: Operational Policy for Control Loops using the Drools PDP + derived_from: onapy.policies.controlloop.Operational + properties: + # Omitted for brevity, see Section 1 + + onap.policies.controlloop.operational.common.Apex: + version: 1.0.0 + description: Operational Policy for Control Loops using the APEX PDP + derived_from: onap.policies.controlloop.Operational + properties: + # Omitted for brevity, see Section 1 + + onap.policies.controlloop.guard.common.FrequencyLimiter: + version: 1.0.0 + description: Supports limiting the frequency of actions being taken by a Actor. + derived_from: onap.policies.controlloop.Guard + properties: + # Omitted for brevity, see Section 1 + + onap.policies.controlloop.guard.common.Blacklist: + version: 1.0.0 + description: Supports blacklist of VNF's from performing control loop actions on. + derived_from: onap.policies.controlloop.Guard + properties: + # Omitted for brevity, see Section 1 + + onap.policies.controlloop.guard.common.MinMax: + version: 1.0.0 + description: Supports Min/Max number of VF Modules + derived_from: onap.policies.controlloop.Guard + properties: + # Omitted for brevity, see Section 1 + + onap.policies.controlloop.guard.common.MinMax: + version: 2.0.0 + description: Supports Min/Max number of VF Modules + derived_from: onap.policies.controlloop.Guard + properties: + # Omitted for brevity, see Section 1 + +data_types: + # Any bespoke data types referenced by policy type definitions[] diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/.header new file mode 100644 index 000000000..6a280d972 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/.header @@ -0,0 +1 @@ +{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0?connectionTimeToLive=5000/.file deleted file mode 100644 index 79e79f0fe..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0?connectionTimeToLive=5000/.file +++ /dev/null @@ -1,38 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_1_0 -policy_types: - onap.policies.controlloop.guard.Common: - derived_from: tosca.policies.Root - version: 1.0.0 - description: | - This is the base Policy Type for Guard policies that guard the execution of Operational - Policies. - properties: - actor: - type: string - description: Specifies the Actor the guard applies to. - required: true - operation: - type: string - description: Specified the operation that the actor is performing the guard applies to. - required: true - timeRange: - type: tosca.datatypes.TimeInterval - description: | - An optional range of time during the day the guard policy is valid for. - required: false - id: - type: string - description: The Control Loop id this applies to. - required: false - onap.policies.controlloop.guard.common.Blacklist: - derived_from: onap.policies.controlloop.guard.Common - type_version: 1.0.0 - version: 1.0.0 - description: Supports blacklist of entity id's from performing control loop actions on. - properties: - blacklist: - type: list - description: List of entity id's - required: true - entry_schema: - type: string \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0?connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0?connectionTimeToLive=5000/.header deleted file mode 100644 index 6a280d972..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0?connectionTimeToLive=5000/.header +++ /dev/null @@ -1 +0,0 @@ -{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0/.file new file mode 100644 index 000000000..79e79f0fe --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0/.file @@ -0,0 +1,38 @@ +tosca_definitions_version: tosca_simple_yaml_1_1_0 +policy_types: + onap.policies.controlloop.guard.Common: + derived_from: tosca.policies.Root + version: 1.0.0 + description: | + This is the base Policy Type for Guard policies that guard the execution of Operational + Policies. + properties: + actor: + type: string + description: Specifies the Actor the guard applies to. + required: true + operation: + type: string + description: Specified the operation that the actor is performing the guard applies to. + required: true + timeRange: + type: tosca.datatypes.TimeInterval + description: | + An optional range of time during the day the guard policy is valid for. + required: false + id: + type: string + description: The Control Loop id this applies to. + required: false + onap.policies.controlloop.guard.common.Blacklist: + derived_from: onap.policies.controlloop.guard.Common + type_version: 1.0.0 + version: 1.0.0 + description: Supports blacklist of entity id's from performing control loop actions on. + properties: + blacklist: + type: list + description: List of entity id's + required: true + entry_schema: + type: string \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0/.header new file mode 100644 index 000000000..6a280d972 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0/.header @@ -0,0 +1 @@ +{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0?connectionTimeToLive=5000/.file deleted file mode 100644 index 163027e46..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0?connectionTimeToLive=5000/.file +++ /dev/null @@ -1,47 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_1_0 -policy_types: - onap.policies.controlloop.guard.Common: - derived_from: tosca.policies.Root - version: 1.0.0 - description: | - This is the base Policy Type for Guard policies that guard the execution of Operational - Policies. - properties: - actor: - type: string - description: Specifies the Actor the guard applies to. - required: true - operation: - type: string - description: Specified the operation that the actor is performing the guard applies to. - required: true - timeRange: - type: tosca.datatypes.TimeInterval - description: | - An optional range of time during the day the guard policy is valid for. - required: false - id: - type: string - description: The Control Loop id this applies to. - required: false - onap.policies.controlloop.guard.common.FrequencyLimiter: - derived_from: onap.policies.controlloop.guard.Common - type_version: 1.0.0 - version: 1.0.0 - description: Supports limiting the frequency of actions being taken by a Actor. - properties: - timeWindow: - type: integer - description: The time window to count the actions against. - required: true - timeUnits: - type: string - description: The units of time the window is counting. - constraints: - - valid_values: ["second", "minute", "hour", "day", "week", "month", "year"] - limit: - type: integer - description: The limit - required: true - constraints: - - greater_than: 0 \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0?connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0?connectionTimeToLive=5000/.header deleted file mode 100644 index 6a280d972..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0?connectionTimeToLive=5000/.header +++ /dev/null @@ -1 +0,0 @@ -{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0/.file new file mode 100644 index 000000000..163027e46 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0/.file @@ -0,0 +1,47 @@ +tosca_definitions_version: tosca_simple_yaml_1_1_0 +policy_types: + onap.policies.controlloop.guard.Common: + derived_from: tosca.policies.Root + version: 1.0.0 + description: | + This is the base Policy Type for Guard policies that guard the execution of Operational + Policies. + properties: + actor: + type: string + description: Specifies the Actor the guard applies to. + required: true + operation: + type: string + description: Specified the operation that the actor is performing the guard applies to. + required: true + timeRange: + type: tosca.datatypes.TimeInterval + description: | + An optional range of time during the day the guard policy is valid for. + required: false + id: + type: string + description: The Control Loop id this applies to. + required: false + onap.policies.controlloop.guard.common.FrequencyLimiter: + derived_from: onap.policies.controlloop.guard.Common + type_version: 1.0.0 + version: 1.0.0 + description: Supports limiting the frequency of actions being taken by a Actor. + properties: + timeWindow: + type: integer + description: The time window to count the actions against. + required: true + timeUnits: + type: string + description: The units of time the window is counting. + constraints: + - valid_values: ["second", "minute", "hour", "day", "week", "month", "year"] + limit: + type: integer + description: The limit + required: true + constraints: + - greater_than: 0 \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0/.header new file mode 100644 index 000000000..6a280d972 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter/versions/1.0.0/.header @@ -0,0 +1 @@ +{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0?connectionTimeToLive=5000/.file deleted file mode 100644 index 778efae9e..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0?connectionTimeToLive=5000/.file +++ /dev/null @@ -1,80 +0,0 @@ -{ - "tosca_definitions_version": "tosca_simple_yaml_1_1_0", - "policy_types": { - "onap.policies.controlloop.guard.Common": { - "properties": { - "id": { - "name": "id", - "type": "string", - "typeVersion": "0.0.0", - "description": "The Control Loop id this applies to.", - "required": false, - "constraints": [], - "metadata": {} - }, - "actor": { - "name": "actor", - "type": "string", - "typeVersion": "0.0.0", - "description": "Specifies the Actor the guard applies to.", - "required": true, - "constraints": [], - "metadata": {} - }, - "operation": { - "name": "operation", - "type": "string", - "typeVersion": "0.0.0", - "description": "Specified the operation that the actor is performing the guard applies to.", - "required": true, - "constraints": [], - "metadata": {} - }, - "timeRange": { - "name": "timeRange", - "type": "tosca.datatypes.TimeInterval", - "typeVersion": "0.0.0", - "description": "An optional range of time during the day the guard policy is valid for.\n", - "required": false, - "constraints": [], - "metadata": {} - } - }, - "name": "onap.policies.controlloop.guard.Common", - "version": "1.0.0", - "derived_from": "tosca.policies.Root", - "metadata": {}, - "description": "This is the base Policy Type for Guard policies that guard the execution of Operational\nPolicies.\n" - }, - "onap.policies.controlloop.guard.common.MinMax": { - "properties": { - "min": { - "name": "min", - "type": "integer", - "typeVersion": "0.0.0", - "description": "The minimum instances of this entity", - "required": true, - "constraints": [], - "metadata": {} - }, - "max": { - "name": "max", - "type": "integer", - "typeVersion": "0.0.0", - "description": "The maximum instances of this entity", - "required": false, - "constraints": [], - "metadata": {} - } - }, - "name": "onap.policies.controlloop.guard.common.MinMax", - "version": "1.0.0", - "derived_from": "onap.policies.controlloop.guard.Common", - "metadata": {}, - "description": "Supports Min/Max number of entity for scaling operations" - } - }, - "name": "ToscaServiceTemplateSimple", - "version": "1.0.0", - "metadata": {} -} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0?connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0?connectionTimeToLive=5000/.header deleted file mode 100644 index 6a280d972..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0?connectionTimeToLive=5000/.header +++ /dev/null @@ -1 +0,0 @@ -{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0/.file new file mode 100644 index 000000000..778efae9e --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0/.file @@ -0,0 +1,80 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_1_0", + "policy_types": { + "onap.policies.controlloop.guard.Common": { + "properties": { + "id": { + "name": "id", + "type": "string", + "typeVersion": "0.0.0", + "description": "The Control Loop id this applies to.", + "required": false, + "constraints": [], + "metadata": {} + }, + "actor": { + "name": "actor", + "type": "string", + "typeVersion": "0.0.0", + "description": "Specifies the Actor the guard applies to.", + "required": true, + "constraints": [], + "metadata": {} + }, + "operation": { + "name": "operation", + "type": "string", + "typeVersion": "0.0.0", + "description": "Specified the operation that the actor is performing the guard applies to.", + "required": true, + "constraints": [], + "metadata": {} + }, + "timeRange": { + "name": "timeRange", + "type": "tosca.datatypes.TimeInterval", + "typeVersion": "0.0.0", + "description": "An optional range of time during the day the guard policy is valid for.\n", + "required": false, + "constraints": [], + "metadata": {} + } + }, + "name": "onap.policies.controlloop.guard.Common", + "version": "1.0.0", + "derived_from": "tosca.policies.Root", + "metadata": {}, + "description": "This is the base Policy Type for Guard policies that guard the execution of Operational\nPolicies.\n" + }, + "onap.policies.controlloop.guard.common.MinMax": { + "properties": { + "min": { + "name": "min", + "type": "integer", + "typeVersion": "0.0.0", + "description": "The minimum instances of this entity", + "required": true, + "constraints": [], + "metadata": {} + }, + "max": { + "name": "max", + "type": "integer", + "typeVersion": "0.0.0", + "description": "The maximum instances of this entity", + "required": false, + "constraints": [], + "metadata": {} + } + }, + "name": "onap.policies.controlloop.guard.common.MinMax", + "version": "1.0.0", + "derived_from": "onap.policies.controlloop.guard.Common", + "metadata": {}, + "description": "Supports Min/Max number of entity for scaling operations" + } + }, + "name": "ToscaServiceTemplateSimple", + "version": "1.0.0", + "metadata": {} +} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0/.header new file mode 100644 index 000000000..6a280d972 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/1.0.0/.header @@ -0,0 +1 @@ +{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0?connectionTimeToLive=5000/.file deleted file mode 100644 index 78bdde746..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0?connectionTimeToLive=5000/.file +++ /dev/null @@ -1,40 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_1_0 -policy_types: - onap.policies.controlloop.guard.Common: - derived_from: tosca.policies.Root - version: 1.0.0 - description: | - This is the base Policy Type for Guard policies that guard the execution of Operational - Policies. - properties: - actor: - type: string - description: Specifies the Actor the guard applies to. - required: true - operation: - type: string - description: Specified the operation that the actor is performing the guard applies to. - required: true - timeRange: - type: tosca.datatypes.TimeInterval - description: | - An optional range of time during the day the guard policy is valid for. - required: false - id: - type: string - description: The Control Loop id this applies to. - required: false - onap.policies.controlloop.guard.common.MinMax: - derived_from: onap.policies.controlloop.guard.Common - type_version: 1.0.0 - version: 1.0.0 - description: Supports Min/Max number of entity for scaling operations - properties: - min: - type: integer - required: true - description: The minimum instances of this entity - max: - type: integer - required: false - description: The maximum instances of this entity \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0?connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0?connectionTimeToLive=5000/.header deleted file mode 100644 index 6a280d972..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0?connectionTimeToLive=5000/.header +++ /dev/null @@ -1 +0,0 @@ -{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0/.file new file mode 100644 index 000000000..78bdde746 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0/.file @@ -0,0 +1,40 @@ +tosca_definitions_version: tosca_simple_yaml_1_1_0 +policy_types: + onap.policies.controlloop.guard.Common: + derived_from: tosca.policies.Root + version: 1.0.0 + description: | + This is the base Policy Type for Guard policies that guard the execution of Operational + Policies. + properties: + actor: + type: string + description: Specifies the Actor the guard applies to. + required: true + operation: + type: string + description: Specified the operation that the actor is performing the guard applies to. + required: true + timeRange: + type: tosca.datatypes.TimeInterval + description: | + An optional range of time during the day the guard policy is valid for. + required: false + id: + type: string + description: The Control Loop id this applies to. + required: false + onap.policies.controlloop.guard.common.MinMax: + derived_from: onap.policies.controlloop.guard.Common + type_version: 1.0.0 + version: 1.0.0 + description: Supports Min/Max number of entity for scaling operations + properties: + min: + type: integer + required: true + description: The minimum instances of this entity + max: + type: integer + required: false + description: The maximum instances of this entity \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0/.header new file mode 100644 index 000000000..6a280d972 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.MinMax/versions/2.0.0/.header @@ -0,0 +1 @@ +{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file deleted file mode 100644 index 14ae7acd8..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file +++ /dev/null @@ -1,360 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_1_0 -policy_types: - onap.policies.controlloop.operational.Common: - properties: - abatement: - name: abatement - type: boolean - typeVersion: 0.0.0 - description: Whether an abatement event message will be expected for - the control loop from DCAE. - default: 'false' - required: true - constraints: [ - ] - metadata: { - } - operations: - name: operations - type: list - typeVersion: 0.0.0 - description: List of operations to be performed when Control Loop - is triggered. - required: true - constraints: [ - ] - entry_schema: - type: onap.datatype.controlloop.Operation - typeVersion: 0.0.0 - constraints: [ - ] - metadata: { - } - trigger: - name: trigger - type: string - typeVersion: 0.0.0 - description: Initial operation to execute upon receiving an Onset - event message for the Control Loop. - required: true - constraints: [ - ] - metadata: { - } - timeout: - name: timeout - type: integer - typeVersion: 0.0.0 - description: | - Overall timeout for executing all the operations. This timeout should equal or exceed the total - timeout for each operation listed. - required: true - constraints: [ - ] - metadata: { - } - id: - name: id - type: string - typeVersion: 0.0.0 - description: The unique control loop id. - required: true - constraints: [ - ] - metadata: { - } - name: onap.policies.controlloop.operational.Common - version: 1.0.0 - derived_from: tosca.policies.Root - metadata: { - } - description: | - Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant - Policy Types. This does NOT support the legacy Policy YAML policy type. - onap.policies.controlloop.operational.common.Apex: - properties: - engineServiceParameters: - name: engineServiceParameters - type: string - typeVersion: 0.0.0 - description: The engine parameters like name, instanceCount, policy - implementation, parameters etc. - required: true - constraints: [ - ] - metadata: { - } - eventOutputParameters: - name: eventOutputParameters - type: string - typeVersion: 0.0.0 - description: The event output parameters. - required: true - constraints: [ - ] - metadata: { - } - javaProperties: - name: javaProperties - type: string - typeVersion: 0.0.0 - description: Name/value pairs of properties to be set for APEX if - needed. - required: false - constraints: [ - ] - metadata: { - } - eventInputParameters: - name: eventInputParameters - type: string - typeVersion: 0.0.0 - description: The event input parameters. - required: true - constraints: [ - ] - metadata: { - } - name: onap.policies.controlloop.operational.common.Apex - version: 1.0.0 - derived_from: onap.policies.controlloop.operational.Common - metadata: { - } - description: Operational policies for Apex PDP -data_types: - onap.datatype.controlloop.Actor: - constraints: [ - ] - properties: - payload: - name: payload - type: map - typeVersion: 0.0.0 - description: Name/value pairs of payload information passed by Policy - to the actor - required: false - constraints: [ - ] - entry_schema: - type: string - typeVersion: 0.0.0 - constraints: [ - ] - metadata: - clamp_possible_values: ClampExecution:CDS/payload - target: - name: target - type: onap.datatype.controlloop.Target - typeVersion: 0.0.0 - description: The resource the operation should be performed on. - required: true - constraints: [ - ] - metadata: { - } - actor: - name: actor - type: string - typeVersion: 0.0.0 - description: The actor performing the operation. - required: true - constraints: [ - ] - metadata: - clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor - operation: - name: operation - type: string - typeVersion: 0.0.0 - description: The operation the actor is performing. - required: true - constraints: [ - ] - metadata: - clamp_possible_values: Dictionary:DefaultOperations, ClampExecution:CDS/operation - name: onap.datatype.controlloop.Actor - version: 0.0.0 - derived_from: tosca.datatypes.Root - metadata: { - } - description: An actor/operation/target definition - onap.datatype.controlloop.Operation: - constraints: [ - ] - properties: - failure_retries: - name: failure_retries - type: string - typeVersion: 0.0.0 - description: Points to the operation to invoke when the current operation - has exceeded its max retries. - default: final_failure_retries - required: false - constraints: [ - ] - metadata: { - } - id: - name: id - type: string - typeVersion: 0.0.0 - description: Unique identifier for the operation - required: true - constraints: [ - ] - metadata: { - } - failure_timeout: - name: failure_timeout - type: string - typeVersion: 0.0.0 - description: Points to the operation to invoke when the time out for - the operation occurs. - default: final_failure_timeout - required: false - constraints: [ - ] - metadata: { - } - failure: - name: failure - type: string - typeVersion: 0.0.0 - description: Points to the operation to invoke on Actor operation - failure. - default: final_failure - required: false - constraints: [ - ] - metadata: { - } - operation: - name: operation - type: onap.datatype.controlloop.Actor - typeVersion: 0.0.0 - description: The definition of the operation to be performed. - required: true - constraints: [ - ] - metadata: { - } - failure_guard: - name: failure_guard - type: string - typeVersion: 0.0.0 - description: Points to the operation to invoke when the current operation - is blocked due to guard policy enforcement. - default: final_failure_guard - required: false - constraints: [ - ] - metadata: { - } - retries: - name: retries - type: integer - typeVersion: 0.0.0 - description: The number of retries the actor should attempt to perform - the operation. - default: '0' - required: true - constraints: [ - ] - metadata: { - } - timeout: - name: timeout - type: integer - typeVersion: 0.0.0 - description: The amount of time for the actor to perform the operation. - required: true - constraints: [ - ] - metadata: { - } - failure_exception: - name: failure_exception - type: string - typeVersion: 0.0.0 - description: Points to the operation to invoke when the current operation - causes an exception. - default: final_failure_exception - required: false - constraints: [ - ] - metadata: { - } - description: - name: description - type: string - typeVersion: 0.0.0 - description: A user-friendly description of the intent for the operation - required: false - constraints: [ - ] - metadata: { - } - success: - name: success - type: string - typeVersion: 0.0.0 - description: Points to the operation to invoke on success. A value - of "final_success" indicates and end to the operation. - default: final_success - required: false - constraints: [ - ] - metadata: { - } - name: onap.datatype.controlloop.Operation - version: 0.0.0 - derived_from: tosca.datatypes.Root - metadata: { - } - description: An operation supported by an actor - onap.datatype.controlloop.Target: - constraints: [ - ] - properties: - entityIds: - name: entityIds - type: map - typeVersion: 0.0.0 - description: | - Map of values that identify the resource. If none are provided, it is assumed that the - entity that generated the ONSET event will be the target. - required: false - constraints: [ - ] - entry_schema: - type: string - typeVersion: 0.0.0 - constraints: [ - ] - metadata: - clamp_possible_values: ClampExecution:CSAR_RESOURCES - targetType: - name: targetType - type: string - typeVersion: 0.0.0 - description: Category for the target type - required: true - constraints: - - valid_values: - - VNF - - VM - - VFMODULE - - PNF - metadata: { - } - name: onap.datatype.controlloop.Target - version: 0.0.0 - derived_from: tosca.datatypes.Root - metadata: { - } - description: Definition for a entity in A&AI to perform a control loop operation - on -name: ToscaServiceTemplateSimple -version: 1.0.0 -metadata: { - } diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.header deleted file mode 100644 index 6a280d972..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.header +++ /dev/null @@ -1 +0,0 @@ -{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/.file new file mode 100644 index 000000000..14ae7acd8 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/.file @@ -0,0 +1,360 @@ +tosca_definitions_version: tosca_simple_yaml_1_1_0 +policy_types: + onap.policies.controlloop.operational.Common: + properties: + abatement: + name: abatement + type: boolean + typeVersion: 0.0.0 + description: Whether an abatement event message will be expected for + the control loop from DCAE. + default: 'false' + required: true + constraints: [ + ] + metadata: { + } + operations: + name: operations + type: list + typeVersion: 0.0.0 + description: List of operations to be performed when Control Loop + is triggered. + required: true + constraints: [ + ] + entry_schema: + type: onap.datatype.controlloop.Operation + typeVersion: 0.0.0 + constraints: [ + ] + metadata: { + } + trigger: + name: trigger + type: string + typeVersion: 0.0.0 + description: Initial operation to execute upon receiving an Onset + event message for the Control Loop. + required: true + constraints: [ + ] + metadata: { + } + timeout: + name: timeout + type: integer + typeVersion: 0.0.0 + description: | + Overall timeout for executing all the operations. This timeout should equal or exceed the total + timeout for each operation listed. + required: true + constraints: [ + ] + metadata: { + } + id: + name: id + type: string + typeVersion: 0.0.0 + description: The unique control loop id. + required: true + constraints: [ + ] + metadata: { + } + name: onap.policies.controlloop.operational.Common + version: 1.0.0 + derived_from: tosca.policies.Root + metadata: { + } + description: | + Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant + Policy Types. This does NOT support the legacy Policy YAML policy type. + onap.policies.controlloop.operational.common.Apex: + properties: + engineServiceParameters: + name: engineServiceParameters + type: string + typeVersion: 0.0.0 + description: The engine parameters like name, instanceCount, policy + implementation, parameters etc. + required: true + constraints: [ + ] + metadata: { + } + eventOutputParameters: + name: eventOutputParameters + type: string + typeVersion: 0.0.0 + description: The event output parameters. + required: true + constraints: [ + ] + metadata: { + } + javaProperties: + name: javaProperties + type: string + typeVersion: 0.0.0 + description: Name/value pairs of properties to be set for APEX if + needed. + required: false + constraints: [ + ] + metadata: { + } + eventInputParameters: + name: eventInputParameters + type: string + typeVersion: 0.0.0 + description: The event input parameters. + required: true + constraints: [ + ] + metadata: { + } + name: onap.policies.controlloop.operational.common.Apex + version: 1.0.0 + derived_from: onap.policies.controlloop.operational.Common + metadata: { + } + description: Operational policies for Apex PDP +data_types: + onap.datatype.controlloop.Actor: + constraints: [ + ] + properties: + payload: + name: payload + type: map + typeVersion: 0.0.0 + description: Name/value pairs of payload information passed by Policy + to the actor + required: false + constraints: [ + ] + entry_schema: + type: string + typeVersion: 0.0.0 + constraints: [ + ] + metadata: + clamp_possible_values: ClampExecution:CDS/payload + target: + name: target + type: onap.datatype.controlloop.Target + typeVersion: 0.0.0 + description: The resource the operation should be performed on. + required: true + constraints: [ + ] + metadata: { + } + actor: + name: actor + type: string + typeVersion: 0.0.0 + description: The actor performing the operation. + required: true + constraints: [ + ] + metadata: + clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor + operation: + name: operation + type: string + typeVersion: 0.0.0 + description: The operation the actor is performing. + required: true + constraints: [ + ] + metadata: + clamp_possible_values: Dictionary:DefaultOperations, ClampExecution:CDS/operation + name: onap.datatype.controlloop.Actor + version: 0.0.0 + derived_from: tosca.datatypes.Root + metadata: { + } + description: An actor/operation/target definition + onap.datatype.controlloop.Operation: + constraints: [ + ] + properties: + failure_retries: + name: failure_retries + type: string + typeVersion: 0.0.0 + description: Points to the operation to invoke when the current operation + has exceeded its max retries. + default: final_failure_retries + required: false + constraints: [ + ] + metadata: { + } + id: + name: id + type: string + typeVersion: 0.0.0 + description: Unique identifier for the operation + required: true + constraints: [ + ] + metadata: { + } + failure_timeout: + name: failure_timeout + type: string + typeVersion: 0.0.0 + description: Points to the operation to invoke when the time out for + the operation occurs. + default: final_failure_timeout + required: false + constraints: [ + ] + metadata: { + } + failure: + name: failure + type: string + typeVersion: 0.0.0 + description: Points to the operation to invoke on Actor operation + failure. + default: final_failure + required: false + constraints: [ + ] + metadata: { + } + operation: + name: operation + type: onap.datatype.controlloop.Actor + typeVersion: 0.0.0 + description: The definition of the operation to be performed. + required: true + constraints: [ + ] + metadata: { + } + failure_guard: + name: failure_guard + type: string + typeVersion: 0.0.0 + description: Points to the operation to invoke when the current operation + is blocked due to guard policy enforcement. + default: final_failure_guard + required: false + constraints: [ + ] + metadata: { + } + retries: + name: retries + type: integer + typeVersion: 0.0.0 + description: The number of retries the actor should attempt to perform + the operation. + default: '0' + required: true + constraints: [ + ] + metadata: { + } + timeout: + name: timeout + type: integer + typeVersion: 0.0.0 + description: The amount of time for the actor to perform the operation. + required: true + constraints: [ + ] + metadata: { + } + failure_exception: + name: failure_exception + type: string + typeVersion: 0.0.0 + description: Points to the operation to invoke when the current operation + causes an exception. + default: final_failure_exception + required: false + constraints: [ + ] + metadata: { + } + description: + name: description + type: string + typeVersion: 0.0.0 + description: A user-friendly description of the intent for the operation + required: false + constraints: [ + ] + metadata: { + } + success: + name: success + type: string + typeVersion: 0.0.0 + description: Points to the operation to invoke on success. A value + of "final_success" indicates and end to the operation. + default: final_success + required: false + constraints: [ + ] + metadata: { + } + name: onap.datatype.controlloop.Operation + version: 0.0.0 + derived_from: tosca.datatypes.Root + metadata: { + } + description: An operation supported by an actor + onap.datatype.controlloop.Target: + constraints: [ + ] + properties: + entityIds: + name: entityIds + type: map + typeVersion: 0.0.0 + description: | + Map of values that identify the resource. If none are provided, it is assumed that the + entity that generated the ONSET event will be the target. + required: false + constraints: [ + ] + entry_schema: + type: string + typeVersion: 0.0.0 + constraints: [ + ] + metadata: + clamp_possible_values: ClampExecution:CSAR_RESOURCES + targetType: + name: targetType + type: string + typeVersion: 0.0.0 + description: Category for the target type + required: true + constraints: + - valid_values: + - VNF + - VM + - VFMODULE + - PNF + metadata: { + } + name: onap.datatype.controlloop.Target + version: 0.0.0 + derived_from: tosca.datatypes.Root + metadata: { + } + description: Definition for a entity in A&AI to perform a control loop operation + on +name: ToscaServiceTemplateSimple +version: 1.0.0 +metadata: { + } diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/.header new file mode 100644 index 000000000..6a280d972 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/.header @@ -0,0 +1 @@ +{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.file deleted file mode 100644 index af7a61ef7..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.file +++ /dev/null @@ -1,150 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_1_0 -policy_types: - onap.policies.controlloop.operational.common.Drools: - derived_from: onap.policies.controlloop.operational.Common - type_version: 1.0.0 - version: 1.0.0 - description: Operational policies for Drools PDP - properties: - controllerName: - type: string - description: Drools controller properties - required: false - onap.policies.controlloop.operational.Common: - derived_from: tosca.policies.Root - version: 1.0.0 - description: | - Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant - Policy Types. This does NOT support the legacy Policy YAML policy type. - properties: - id: - type: string - description: The unique control loop id. - required: true - timeout: - type: integer - description: | - Overall timeout for executing all the operations. This timeout should equal or exceed the total - timeout for each operation listed. - required: true - abatement: - type: boolean - description: Whether an abatement event message will be expected for the control loop from DCAE. - required: true - default: false - trigger: - type: string - description: Initial operation to execute upon receiving an Onset event message for the Control Loop. - required: true - operations: - type: list - description: List of operations to be performed when Control Loop is triggered. - required: true - entry_schema: - type: onap.datatype.controlloop.Operation -data_types: - onap.datatype.controlloop.Target: - derived_from: tosca.datatypes.Root - description: Definition for a entity in A&AI to perform a control loop operation on - properties: - targetType: - type: string - description: Category for the target type - required: true - constraints: - - valid_values: [VNF, VM, VFMODULE, PNF] - entityIds: - type: map - description: | - Map of values that identify the resource. If none are provided, it is assumed that the - entity that generated the ONSET event will be the target. - required: false - metadata: - clamp_possible_values: ClampExecution:CSAR_RESOURCES - entry_schema: - type: string - - onap.datatype.controlloop.Actor: - derived_from: tosca.datatypes.Root - description: An actor/operation/target definition - properties: - actor: - type: string - description: The actor performing the operation. - required: true - metadata: - clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor - operation: - type: string - description: The operation the actor is performing. - required: true - metadata: - clamp_possible_values: Dictionary:DefaultOperations, ClampExecution:CDS/operations - target: - type: onap.datatype.controlloop.Target - description: The resource the operation should be performed on. - required: true - payload: - type: map - description: Name/value pairs of payload information passed by Policy to the actor - required: false - metadata: - clamp_possible_values: ClampExecution:CDS/payload - entry_schema: - type: string - - onap.datatype.controlloop.Operation: - derived_from: tosca.datatypes.Root - description: An operation supported by an actor - properties: - id: - type: string - description: Unique identifier for the operation - required: true - description: - type: string - description: A user-friendly description of the intent for the operation - required: false - operation: - type: onap.datatype.controlloop.Actor - description: The definition of the operation to be performed. - required: true - timeout: - type: integer - description: The amount of time for the actor to perform the operation. - required: true - retries: - type: integer - description: The number of retries the actor should attempt to perform the operation. - required: true - default: 0 - success: - type: string - description: Points to the operation to invoke on success. A value of "final_success" indicates and end to the operation. - required: false - default: final_success - failure: - type: string - description: Points to the operation to invoke on Actor operation failure. - required: false - default: final_failure - failure_timeout: - type: string - description: Points to the operation to invoke when the time out for the operation occurs. - required: false - default: final_failure_timeout - failure_retries: - type: string - description: Points to the operation to invoke when the current operation has exceeded its max retries. - required: false - default: final_failure_retries - failure_exception: - type: string - description: Points to the operation to invoke when the current operation causes an exception. - required: false - default: final_failure_exception - failure_guard: - type: string - description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement. - required: false - default: final_failure_guard \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.header deleted file mode 100644 index 6a280d972..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0?connectionTimeToLive=5000/.header +++ /dev/null @@ -1 +0,0 @@ -{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/.file new file mode 100644 index 000000000..af7a61ef7 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/.file @@ -0,0 +1,150 @@ +tosca_definitions_version: tosca_simple_yaml_1_1_0 +policy_types: + onap.policies.controlloop.operational.common.Drools: + derived_from: onap.policies.controlloop.operational.Common + type_version: 1.0.0 + version: 1.0.0 + description: Operational policies for Drools PDP + properties: + controllerName: + type: string + description: Drools controller properties + required: false + onap.policies.controlloop.operational.Common: + derived_from: tosca.policies.Root + version: 1.0.0 + description: | + Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant + Policy Types. This does NOT support the legacy Policy YAML policy type. + properties: + id: + type: string + description: The unique control loop id. + required: true + timeout: + type: integer + description: | + Overall timeout for executing all the operations. This timeout should equal or exceed the total + timeout for each operation listed. + required: true + abatement: + type: boolean + description: Whether an abatement event message will be expected for the control loop from DCAE. + required: true + default: false + trigger: + type: string + description: Initial operation to execute upon receiving an Onset event message for the Control Loop. + required: true + operations: + type: list + description: List of operations to be performed when Control Loop is triggered. + required: true + entry_schema: + type: onap.datatype.controlloop.Operation +data_types: + onap.datatype.controlloop.Target: + derived_from: tosca.datatypes.Root + description: Definition for a entity in A&AI to perform a control loop operation on + properties: + targetType: + type: string + description: Category for the target type + required: true + constraints: + - valid_values: [VNF, VM, VFMODULE, PNF] + entityIds: + type: map + description: | + Map of values that identify the resource. If none are provided, it is assumed that the + entity that generated the ONSET event will be the target. + required: false + metadata: + clamp_possible_values: ClampExecution:CSAR_RESOURCES + entry_schema: + type: string + + onap.datatype.controlloop.Actor: + derived_from: tosca.datatypes.Root + description: An actor/operation/target definition + properties: + actor: + type: string + description: The actor performing the operation. + required: true + metadata: + clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor + operation: + type: string + description: The operation the actor is performing. + required: true + metadata: + clamp_possible_values: Dictionary:DefaultOperations, ClampExecution:CDS/operations + target: + type: onap.datatype.controlloop.Target + description: The resource the operation should be performed on. + required: true + payload: + type: map + description: Name/value pairs of payload information passed by Policy to the actor + required: false + metadata: + clamp_possible_values: ClampExecution:CDS/payload + entry_schema: + type: string + + onap.datatype.controlloop.Operation: + derived_from: tosca.datatypes.Root + description: An operation supported by an actor + properties: + id: + type: string + description: Unique identifier for the operation + required: true + description: + type: string + description: A user-friendly description of the intent for the operation + required: false + operation: + type: onap.datatype.controlloop.Actor + description: The definition of the operation to be performed. + required: true + timeout: + type: integer + description: The amount of time for the actor to perform the operation. + required: true + retries: + type: integer + description: The number of retries the actor should attempt to perform the operation. + required: true + default: 0 + success: + type: string + description: Points to the operation to invoke on success. A value of "final_success" indicates and end to the operation. + required: false + default: final_success + failure: + type: string + description: Points to the operation to invoke on Actor operation failure. + required: false + default: final_failure + failure_timeout: + type: string + description: Points to the operation to invoke when the time out for the operation occurs. + required: false + default: final_failure_timeout + failure_retries: + type: string + description: Points to the operation to invoke when the current operation has exceeded its max retries. + required: false + default: final_failure_retries + failure_exception: + type: string + description: Points to the operation to invoke when the current operation causes an exception. + required: false + default: final_failure_exception + failure_guard: + type: string + description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement. + required: false + default: final_failure_guard \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/.header new file mode 100644 index 000000000..6a280d972 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/.header @@ -0,0 +1 @@ +{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0?connectionTimeToLive=5000/.file deleted file mode 100644 index 3c17c9004..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0?connectionTimeToLive=5000/.file +++ /dev/null @@ -1,158 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_1_0 -policy_types: - onap.policies.Monitoring: - derived_from: tosca.policies.Root - version: 1.0.0 - description: a base policy type for all policies that govern monitoring provisioning - onap.policies.monitoring.cdap.tca.hi.lo.app: - derived_from: onap.policies.Monitoring - version: 1.0.0 - properties: - tca_policy: - type: onap.datatypes.monitoring.tca_policy - description: TCA Policy JSON - required: true -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 \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0?connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0?connectionTimeToLive=5000/.header deleted file mode 100644 index 6a280d972..000000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0?connectionTimeToLive=5000/.header +++ /dev/null @@ -1 +0,0 @@ -{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/.file new file mode 100644 index 000000000..3c17c9004 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/.file @@ -0,0 +1,158 @@ +tosca_definitions_version: tosca_simple_yaml_1_1_0 +policy_types: + onap.policies.Monitoring: + derived_from: tosca.policies.Root + version: 1.0.0 + description: a base policy type for all policies that govern monitoring provisioning + onap.policies.monitoring.cdap.tca.hi.lo.app: + derived_from: onap.policies.Monitoring + version: 1.0.0 + properties: + tca_policy: + type: onap.datatypes.monitoring.tca_policy + description: TCA Policy JSON + required: true +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 \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/.header new file mode 100644 index 000000000..6a280d972 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/.header @@ -0,0 +1 @@ +{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/pap/v1/pdps?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/pap/v1/pdps?connectionTimeToLive=5000/.file deleted file mode 100644 index f16f4e899..000000000 --- a/src/test/resources/http-cache/example/policy/pap/v1/pdps?connectionTimeToLive=5000/.file +++ /dev/null @@ -1,80 +0,0 @@ -{ - "groups": [ - { - "description": "This group should be used for managing all control loop related policies and pdps", - "name": "controlloop", - "pdpGroupState": "ACTIVE", - "pdpSubgroups": [ - { - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "pdpInstances": [], - "pdpType": "apex", - "policies": [], - "properties": {}, - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.Operational", - "version": "1.0.0" - } - ] - }, - { - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "pdpInstances": [], - "pdpType": "drools", - "policies": [], - "properties": {}, - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.Operational", - "version": "1.0.0" - } - ] - }, - { - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "pdpInstances": [], - "pdpType": "xacml", - "policies": [], - "properties": {}, - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.guard.common.*", - "version": "1.0.0" - } - ] - } - ], - "properties": {} - }, - { - "description": "This group should be used for managing all monitoring related policies and pdps", - "name": "monitoring", - "pdpGroupState": "ACTIVE", - "pdpSubgroups": [ - { - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "pdpInstances": [], - "pdpType": "xacml", - "policies": [], - "properties": {}, - "supportedPolicyTypes": [ - { - "name": "onap.policies.monitoring.*", - "version": "1.0.0" - } - ] - } - ], - "properties": {} - } - ] -} diff --git a/src/test/resources/http-cache/example/policy/pap/v1/pdps?connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/policy/pap/v1/pdps?connectionTimeToLive=5000/.header deleted file mode 100644 index 6a280d972..000000000 --- a/src/test/resources/http-cache/example/policy/pap/v1/pdps?connectionTimeToLive=5000/.header +++ /dev/null @@ -1 +0,0 @@ -{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/pap/v1/pdps/.file b/src/test/resources/http-cache/example/policy/pap/v1/pdps/.file new file mode 100644 index 000000000..f16f4e899 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/pap/v1/pdps/.file @@ -0,0 +1,80 @@ +{ + "groups": [ + { + "description": "This group should be used for managing all control loop related policies and pdps", + "name": "controlloop", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "pdpInstances": [], + "pdpType": "apex", + "policies": [], + "properties": {}, + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.Operational", + "version": "1.0.0" + } + ] + }, + { + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "pdpInstances": [], + "pdpType": "drools", + "policies": [], + "properties": {}, + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.Operational", + "version": "1.0.0" + } + ] + }, + { + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "pdpInstances": [], + "pdpType": "xacml", + "policies": [], + "properties": {}, + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.guard.common.*", + "version": "1.0.0" + } + ] + } + ], + "properties": {} + }, + { + "description": "This group should be used for managing all monitoring related policies and pdps", + "name": "monitoring", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "pdpInstances": [], + "pdpType": "xacml", + "policies": [], + "properties": {}, + "supportedPolicyTypes": [ + { + "name": "onap.policies.monitoring.*", + "version": "1.0.0" + } + ] + } + ], + "properties": {} + } + ] +} diff --git a/src/test/resources/http-cache/example/policy/pap/v1/pdps/.header b/src/test/resources/http-cache/example/policy/pap/v1/pdps/.header new file mode 100644 index 000000000..6a280d972 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/pap/v1/pdps/.header @@ -0,0 +1 @@ +{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/third_party_proxy.py b/src/test/resources/http-cache/third_party_proxy.py index 97a2a1a18..7fe316852 100755 --- a/src/test/resources/http-cache/third_party_proxy.py +++ b/src/test/resources/http-cache/third_party_proxy.py @@ -179,7 +179,7 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler): elif self.path.startswith("/dcae-deployments/") and http_type == "PUT": print "self.path start with /dcae-deployments/ DEPLOY, generating response json..." #jsondata = json.loads(self.data_string) - jsonGenerated = "{\"operationType\":\"install\",\"status\":\"processing\",\"links\":{\"status\":\"http:\/\/" + PROXY_ADDRESS + "\/dcae-operationstatus/install\"}}" + jsonGenerated = "{\"operationType\":\"install\",\"status\":\"processing\",\"links\":{\"status\":\"http:\/\/" + PROXY_ADDRESS + "\/dcae-operationstatus/install?test=test\"}}" print "jsonGenerated: " + jsonGenerated if not os.path.exists(cached_file_folder): os.makedirs(cached_file_folder, 0777) @@ -191,7 +191,7 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler): elif self.path.startswith("/dcae-deployments/") and http_type == "DELETE": print "self.path start with /dcae-deployments/ UNDEPLOY, generating response json..." #jsondata = json.loads(self.data_string) - jsonGenerated = "{\"operationType\":\"uninstall\",\"status\":\"processing\",\"links\":{\"status\":\"http:\/\/" + PROXY_ADDRESS + "\/dcae-operationstatus/uninstall\"}}" + jsonGenerated = "{\"operationType\":\"uninstall\",\"status\":\"processing\",\"links\":{\"status\":\"http:\/\/" + PROXY_ADDRESS + "\/dcae-operationstatus/uninstall?test=test\"}}" print "jsonGenerated: " + jsonGenerated if not os.path.exists(cached_file_folder): os.makedirs(cached_file_folder, 0777) -- cgit 1.2.3-korg