aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java2
-rw-r--r--src/main/java/org/onap/clamp/clds/tosca/update/execution/ToscaMetadataExecutor.java5
-rw-r--r--src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java15
-rw-r--r--src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java23
-rw-r--r--src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java38
-rw-r--r--src/main/resources/META-INF/resources/swagger.html6
-rw-r--r--src/main/resources/application-noaaf.properties1
-rw-r--r--src/main/resources/application.properties2
-rw-r--r--src/main/resources/clds/camel/rest/clamp-api-v2.xml435
-rw-r--r--src/main/resources/logback-default.xml103
-rw-r--r--src/main/resources/logback-spring.xml (renamed from src/main/resources/logback.xml)0
-rw-r--r--src/test/java/org/onap/clamp/loop/DcaeComponentTest.java10
-rw-r--r--src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java2
-rw-r--r--src/test/resources/example/sdc/expected-result/deployment-parameters-single-blueprint.json4
-rw-r--r--src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0?connectionTimeToLive=5000/.file404
-rw-r--r--src/test/resources/logback.xml8
-rw-r--r--src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json482
17 files changed, 986 insertions, 554 deletions
diff --git a/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java b/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java
index 1261a5e95..d20a7370c 100644
--- a/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java
+++ b/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java
@@ -53,7 +53,7 @@ import org.springframework.security.crypto.password.PasswordEncoder;
public class DefaultUserConfiguration extends WebSecurityConfigurerAdapter {
protected static final EELFLogger logger = EELFManager.getInstance().getLogger(DefaultUserConfiguration.class);
- protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
+
private static final String SETUP_WEB_USERS_EXCEPTION_MSG = "Exception occurred during the "
+ " setup of the Web users in memory";
@Autowired
diff --git a/src/main/java/org/onap/clamp/clds/tosca/update/execution/ToscaMetadataExecutor.java b/src/main/java/org/onap/clamp/clds/tosca/update/execution/ToscaMetadataExecutor.java
index 924011901..885e755bd 100644
--- a/src/main/java/org/onap/clamp/clds/tosca/update/execution/ToscaMetadataExecutor.java
+++ b/src/main/java/org/onap/clamp/clds/tosca/update/execution/ToscaMetadataExecutor.java
@@ -51,7 +51,7 @@ public class ToscaMetadataExecutor {
private Map<String, ToscaMetadataProcess> mapOfProcesses = new HashMap<>();
/**
- * This method executes the required process specified in processInfo
+ * This method executes the required process specified in processInfo.
*
* @param processInfo A String containing the process to execute, like "cds/param1:value1/param2:value2"
* @param childObject The jsonObject
@@ -61,7 +61,8 @@ public class ToscaMetadataExecutor {
String[] processParameters = (processInfo + "/ ").split("/");
logger.info("Executing the Tosca clamp process " + processParameters[0] + " with parameters "
+ processParameters[1].trim());
- mapOfProcesses.get(processParameters[0]).executeProcess(processParameters[1].trim(), childObject, serviceModel);
+ mapOfProcesses.get(processParameters[0].trim())
+ .executeProcess(processParameters[1].trim(), childObject, serviceModel);
}
/**
diff --git a/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java b/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java
index 8fce5cafd..8b8547195 100644
--- a/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java
+++ b/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java
@@ -23,6 +23,8 @@
package org.onap.clamp.loop.components.external;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
import com.google.gson.JsonObject;
import java.util.Iterator;
@@ -30,6 +32,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.UUID;
+import javax.persistence.Transient;
import org.apache.camel.Exchange;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
@@ -43,11 +46,14 @@ import org.onap.clamp.policy.microservice.MicroServicePolicy;
public class DcaeComponent extends ExternalComponent {
+ @Transient
+ private static final EELFLogger logger = EELFManager.getInstance().getLogger(DcaeComponent.class);
+
private static final String DCAE_DEPLOYMENT_PREFIX = "CLAMP_";
private static final String DEPLOYMENT_PARAMETER = "dcaeDeployParameters";
private static final String DCAE_SERVICETYPE_ID = "serviceTypeId";
private static final String DCAE_INPUTS = "inputs";
- private static final String SINGLE_BLUEPRINT_POLICYID = "loop template blueprint";
+ public static final String UNIQUE_BLUEPRINT_PARAMETERS = "uniqueBlueprintParameters";
private String name;
@@ -132,7 +138,8 @@ public class DcaeComponent extends ExternalComponent {
*/
public static String getDeployPayload(Loop loop) {
JsonObject globalProp = loop.getGlobalPropertiesJson();
- JsonObject deploymentProp = globalProp.getAsJsonObject(DEPLOYMENT_PARAMETER).getAsJsonObject(SINGLE_BLUEPRINT_POLICYID);
+ JsonObject deploymentProp = globalProp.getAsJsonObject(DEPLOYMENT_PARAMETER).getAsJsonObject(
+ UNIQUE_BLUEPRINT_PARAMETERS);
String serviceTypeId = loop.getLoopTemplate().getDcaeBlueprintId();
@@ -141,6 +148,7 @@ public class DcaeComponent extends ExternalComponent {
if (deploymentProp != null) {
rootObject.add(DCAE_INPUTS, deploymentProp);
}
+ logger.info("DCAE Deploy payload for unique blueprint: " + rootObject.toString());
return rootObject.toString();
}
@@ -163,6 +171,7 @@ public class DcaeComponent extends ExternalComponent {
if (deploymentProp != null) {
rootObject.add(DCAE_INPUTS, deploymentProp);
}
+ logger.info("DCAE Deploy payload for multiple blueprints: " + rootObject.toString());
return rootObject.toString();
}
@@ -175,6 +184,7 @@ public class DcaeComponent extends ExternalComponent {
public static String getUndeployPayload(Loop loop) {
JsonObject rootObject = new JsonObject();
rootObject.addProperty(DCAE_SERVICETYPE_ID, loop.getLoopTemplate().getDcaeBlueprintId());
+ logger.info("DCAE Undeploy payload for unique blueprint: " + rootObject.toString());
return rootObject.toString();
}
@@ -187,6 +197,7 @@ public class DcaeComponent extends ExternalComponent {
public static String getUndeployPayload(MicroServicePolicy policy) {
JsonObject rootObject = new JsonObject();
rootObject.addProperty(DCAE_SERVICETYPE_ID, policy.getDcaeBlueprintId());
+ logger.info("DCAE Undeploy payload for multiple blueprints: " + rootObject.toString());
return rootObject.toString();
}
diff --git a/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java b/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java
index 2d7b807c0..f963e3514 100644
--- a/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java
+++ b/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java
@@ -81,13 +81,13 @@ public class PolicyComponent extends ExternalComponent {
public static String createPoliciesPayloadPdpGroup(Loop loop) {
HashMap<String, HashMap<String, List<JsonObject>>> pdpGroupMap = new HashMap<>();
for (OperationalPolicy opPolicy : loop.getOperationalPolicies()) {
- pdpGroupMap = updatePdpGroupMap(opPolicy.getPdpGroup(), opPolicy.getPdpSubgroup(),
+ updatePdpGroupMap(opPolicy.getPdpGroup(), opPolicy.getPdpSubgroup(),
opPolicy.getName(),
opPolicy.getPolicyModel().getVersion(), pdpGroupMap);
}
for (MicroServicePolicy msPolicy : loop.getMicroServicePolicies()) {
- pdpGroupMap = updatePdpGroupMap(msPolicy.getPdpGroup(), msPolicy.getPdpSubgroup(),
+ updatePdpGroupMap(msPolicy.getPdpGroup(), msPolicy.getPdpSubgroup(),
msPolicy.getName(),
msPolicy.getPolicyModel().getVersion(), pdpGroupMap);
}
@@ -98,13 +98,12 @@ public class PolicyComponent extends ExternalComponent {
return payload;
}
- private static HashMap<String, HashMap<String, List<JsonObject>>> updatePdpGroupMap(String pdpGroup,
- String pdpSubGroup,
- String policyName,
- String policyModelVersion,
- HashMap<String, HashMap<String,
- List<JsonObject>>> pdpGroupMap) {
-
+ private static void updatePdpGroupMap(String pdpGroup,
+ String pdpSubGroup,
+ String policyName,
+ String policyModelVersion,
+ HashMap<String, HashMap<String,
+ List<JsonObject>>> pdpGroupMap) {
JsonObject policyJson = new JsonObject();
policyJson.addProperty("name", policyName);
policyJson.addProperty("version", policyModelVersion);
@@ -126,8 +125,6 @@ public class PolicyComponent extends ExternalComponent {
policyList.add(policyJson);
pdpSubGroupMap.put(pdpSubGroup, policyList);
pdpGroupMap.put(pdpGroup, pdpSubGroupMap);
-
- return pdpGroupMap;
}
private static JsonObject generateActivatePdpGroupPayload(
@@ -170,9 +167,7 @@ public class PolicyComponent extends ExternalComponent {
List<String> policyNamesList = new ArrayList<>();
for (OperationalPolicy opPolicy : loop.getOperationalPolicies()) {
policyNamesList.add(opPolicy.getName());
- for (String guardName : opPolicy.createGuardPolicyPayloads().keySet()) {
- policyNamesList.add(guardName);
- }
+ policyNamesList.addAll(opPolicy.createGuardPolicyPayloads().keySet());
}
for (MicroServicePolicy microServicePolicy : loop.getMicroServicePolicies()) {
policyNamesList.add(microServicePolicy.getName());
diff --git a/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java b/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java
index e2b16e62e..65506a479 100644
--- a/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java
+++ b/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java
@@ -24,13 +24,12 @@
package org.onap.clamp.loop.deploy;
import com.google.gson.JsonObject;
-
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
-
import org.onap.clamp.clds.util.JsonUtils;
import org.onap.clamp.loop.Loop;
+import org.onap.clamp.loop.components.external.DcaeComponent;
import org.onap.clamp.policy.microservice.MicroServicePolicy;
import org.yaml.snakeyaml.Yaml;
@@ -44,8 +43,8 @@ public class DcaeDeployParameters {
Set<MicroServicePolicy> microServiceList = loop.getMicroServicePolicies();
for (MicroServicePolicy microService : microServiceList) {
- deploymentParamMap.put(microService.getName(),
- generateDcaeDeployParameter(microService));
+ deploymentParamMap.put(microService.getName(),
+ generateDcaeDeployParameter(microService));
}
return deploymentParamMap;
}
@@ -55,7 +54,7 @@ public class DcaeDeployParameters {
microService.getName());
}
- private static JsonObject generateDcaeDeployParameter(String blueprint, String tabName) {
+ private static JsonObject generateDcaeDeployParameter(String blueprint, String policyId) {
JsonObject deployJsonBody = new JsonObject();
Yaml yaml = new Yaml();
Map<String, Object> inputsNodes = ((Map<String, Object>) ((Map<String, Object>) yaml
@@ -64,25 +63,29 @@ public class DcaeDeployParameters {
Object defaultValue = ((Map<String, Object>) elem.getValue()).get("default");
if (defaultValue != null) {
addPropertyToNode(deployJsonBody, elem.getKey(), defaultValue);
- } else {
+ }
+ else {
deployJsonBody.addProperty(elem.getKey(), "");
}
});
- // For Dublin only one micro service is expected
- deployJsonBody.addProperty("policy_id", tabName);
+ deployJsonBody.addProperty("policy_id", policyId);
return deployJsonBody;
}
private static void addPropertyToNode(JsonObject node, String key, Object value) {
if (value instanceof String) {
node.addProperty(key, (String) value);
- } else if (value instanceof Number) {
+ }
+ else if (value instanceof Number) {
node.addProperty(key, (Number) value);
- } else if (value instanceof Boolean) {
+ }
+ else if (value instanceof Boolean) {
node.addProperty(key, (Boolean) value);
- } else if (value instanceof Character) {
+ }
+ else if (value instanceof Character) {
node.addProperty(key, (Character) value);
- } else {
+ }
+ else {
node.addProperty(key, JsonUtils.GSON.toJson(value));
}
}
@@ -96,9 +99,14 @@ public class DcaeDeployParameters {
JsonObject globalProperties = new JsonObject();
JsonObject deployParamJson = new JsonObject();
if (loop.getLoopTemplate().getUniqueBlueprint()) {
- String tabName = "loop template blueprint";
- deployParamJson.add(tabName, generateDcaeDeployParameter(loop.getLoopTemplate().getBlueprint(), tabName));
- } else {
+ // Normally the unique blueprint could contain multiple microservices but then we can't guess
+ // the policy id params that will be used, so here we expect only one by default.
+ deployParamJson.add(DcaeComponent.UNIQUE_BLUEPRINT_PARAMETERS,
+ generateDcaeDeployParameter(loop.getLoopTemplate().getBlueprint(),
+ ((MicroServicePolicy) loop.getMicroServicePolicies().toArray()[0]).getName()));
+
+ }
+ else {
LinkedHashMap<String, JsonObject> deploymentParamMap = init(loop);
for (Map.Entry<String, JsonObject> mapElement : deploymentParamMap.entrySet()) {
deployParamJson.add(mapElement.getKey(), mapElement.getValue());
diff --git a/src/main/resources/META-INF/resources/swagger.html b/src/main/resources/META-INF/resources/swagger.html
index 3f3ec6eb1..1f8cc9ebe 100644
--- a/src/main/resources/META-INF/resources/swagger.html
+++ b/src/main/resources/META-INF/resources/swagger.html
@@ -737,13 +737,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<div class="sect2">
<h3 id="_version_information"><a class="anchor" href="#_version_information"></a><a class="link" href="#_version_information">1.1. Version information</a></h3>
<div class="paragraph">
-<p><em>Version</em> : 5.0.0-SNAPSHOT</p>
+<p><em>Version</em> : 5.0.2-SNAPSHOT</p>
</div>
</div>
<div class="sect2">
<h3 id="_uri_scheme"><a class="anchor" href="#_uri_scheme"></a><a class="link" href="#_uri_scheme">1.2. URI scheme</a></h3>
<div class="paragraph">
-<p><em>Host</em> : localhost:46561<br>
+<p><em>Host</em> : localhost:34889<br>
<em>BasePath</em> : /restservices/clds/<br>
<em>Schemes</em> : HTTP</p>
</div>
@@ -4344,7 +4344,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2020-02-12 02:20:53 PST
+Last updated 2020-02-12 11:20:53 CET
</div>
</div>
</body>
diff --git a/src/main/resources/application-noaaf.properties b/src/main/resources/application-noaaf.properties
index 4701b36df..d61b7ed53 100644
--- a/src/main/resources/application-noaaf.properties
+++ b/src/main/resources/application-noaaf.properties
@@ -81,6 +81,7 @@ server.tomcat.max-idle-time=60000
#Servlet context parameters
server.context_parameters.p-name=value #context parameter with p-name as key and value as value.
+camel.springboot.tracing=true
camel.springboot.consumer-template-cache-size=1000
camel.springboot.producer-template-cache-size=1000
camel.springboot.jmx-enabled=true
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 5bf7910a2..3937d8fc2 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -85,7 +85,7 @@ server.tomcat.max-idle-time=60000
#Servlet context parameters
server.context_parameters.p-name=value #context parameter with p-name as key and value as value.
-
+camel.springboot.tracing=true
camel.springboot.consumer-template-cache-size=1000
camel.springboot.producer-template-cache-size=1000
camel.springboot.jmx-enabled=true
diff --git a/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/src/main/resources/clds/camel/rest/clamp-api-v2.xml
index d81c164a5..e6741d6f8 100644
--- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml
+++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml
@@ -16,10 +16,19 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="GET All Loop names FAILED: ${exception.stacktrace}" />
+
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET All Loop names FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -40,10 +49,19 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="GET Loop request failed for loop: ${header.loopName}, ${exception.stacktrace}" />
+
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET Loop FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -64,10 +82,19 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="GET SVG request failed for loop: ${header.loopName}, ${exception.stacktrace}" />
+
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET SVG For loop FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -96,10 +123,19 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="UPDATE Global properties FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
+
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>UPDATE Global properties FAILED </simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -127,10 +163,21 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="UPDATE Operational policies FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UPDATE Operational policies request FAILED, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})" />
+
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>UPDATE Operational policies FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -161,10 +208,20 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="UPDATE MicroService policy FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UPDATE MicroService policy request FAILED, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>UPDATE MicroService policy FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -195,14 +252,20 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log loggingLevel="ERROR"
- message="DEPLOY request failed for loop: ${header.loopName}" />
+ message="DEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>DEPLOY request FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -230,14 +293,20 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log loggingLevel="ERROR"
- message="REFRESH Micro Service policy request failed for loop: ${header.loopName}" />
+ message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH Micro Service policy request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>REFRESH json schema request FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -265,14 +334,20 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log loggingLevel="ERROR"
- message="REFRESH operational policy request failed for loop: ${header.loopName}" />
+ message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH operational policy request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>REFRESH json schema request FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -302,14 +377,20 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log loggingLevel="ERROR"
- message="UNDEPLOY request failed for loop: ${header.loopName}" />
+ message="UNDEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>UNDEPLOY request FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -339,14 +420,20 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log loggingLevel="ERROR"
- message="STOP request failed for loop: $${header.loopName}" />
+ message="STOP request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>STOP request FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -377,14 +464,20 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log loggingLevel="ERROR"
- message="RESTART request failed for loop: ${header.loopName}" />
+ message="RESTART request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('RESTART request failed, Error reported: ${exception} - Body: ${exception.responseBody}','INFO',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('RESTART request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>RESTART request FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -479,14 +572,20 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log loggingLevel="ERROR"
- message="SUBMIT request failed for loop: ${header.loopName}" />
+ message="SUBMIT request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>SUBMIT request FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -552,14 +651,20 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log loggingLevel="ERROR"
- message="DELETE request failed for loop: ${header.loopName}" />
+ message="DELETE request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>DELETE request FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -584,21 +689,27 @@
<to uri="direct:update-loop-state" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Get Status request successfully executed','INFO',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request successfully executed','INFO',${exchangeProperty[loopObject]})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
</doTry>
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log loggingLevel="ERROR"
- message="Get Status request failed for loop: ${header.loopName}" />
+ message="GET STATUS request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Get Status request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET STATUS request FAILED</simple>
+ </setBody>
</doCatch>
<doFinally>
<setBody>
@@ -627,14 +738,20 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log loggingLevel="ERROR"
- message="ADD OperationalPolicy request failed for loop: ${header.loopName}" />
+ message="ADD operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
<to
uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>ADD Operational policy request FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -657,14 +774,20 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log loggingLevel="ERROR"
- message="REMOVE OperationalPolicy request failed for loop: ${header.loopName}" />
+ message="REMOVE operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
<to
uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REMOVE OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>REMOVE Operational policy request FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -691,14 +814,18 @@
<handled>
<constant>true</constant>
</handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="CREATE Loop from Template request failed for loop: ${header.loopName}, ${exception.stacktrace}" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('CREATE Loop from template request failed','ERROR',${exchangeProperty[loopObject]})" />
<setHeader headerName="CamelHttpResponseCode">
<constant>500</constant>
</setHeader>
- <transform>
- <simple>ERROR: ${exception.message}</simple>
- </transform>
- <to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <setBody>
+ <simple>CREATE Loop from template FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -719,10 +846,18 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="GET Dictionary request failed: ${exception.stacktrace}" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET Dictionary FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -744,10 +879,18 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="GET Dictionary request failed: ${exception.stacktrace}" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET Dictionary FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -769,10 +912,18 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="GET Dictionary request failed for: ${header.dictionaryName}, ${exception.stacktrace}" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET Dictionary FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -796,10 +947,18 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="PUT Dictionary request failed for: ${exception.stacktrace}" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>PUT Dictionary FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -826,10 +985,18 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="PUT Dictionary request failed for: ${header.name}, ${exception.stacktrace}" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>PUT Dictionary FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -850,10 +1017,18 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="DELETE Dictionary request failed for: ${header.name}, ${exception.stacktrace}" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>DELETE Dictionary FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -876,10 +1051,18 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="DELETE Dictionary element request failed for: ${header.name}, ${exception.stacktrace}" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>DELETE Dictionary element FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -904,14 +1087,16 @@
<handled>
<constant>true</constant>
</handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="GET Policy Models request failed for: ${exception.stacktrace}" />
<setHeader headerName="CamelHttpResponseCode">
<constant>500</constant>
</setHeader>
- <transform>
- <simple>ERROR: ${exception.message}</simple>
- </transform>
- <to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <setBody>
+ <simple>GET Policy models FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -936,14 +1121,16 @@
<handled>
<constant>true</constant>
</handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="GET Policy Model request failed for type: ${header.policyModelType}, ${exception.stacktrace}" />
<setHeader headerName="CamelHttpResponseCode">
<constant>500</constant>
</setHeader>
- <transform>
- <simple>ERROR: ${exception.message}</simple>
- </transform>
- <to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <setBody>
+ <simple>GET Policy model FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -967,14 +1154,16 @@
<handled>
<constant>true</constant>
</handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="GET Policy Model YAML request failed for type: ${header.policyModelType}, ${exception.stacktrace}" />
<setHeader headerName="CamelHttpResponseCode">
<constant>500</constant>
</setHeader>
- <transform>
- <simple>ERROR: ${exception.message}</simple>
- </transform>
- <to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <setBody>
+ <simple>GET Policy model YAML FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -1003,14 +1192,16 @@
<handled>
<constant>true</constant>
</handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="POST Policy Model YAML request failed: ${exception.stacktrace}" />
<setHeader headerName="CamelHttpResponseCode">
- <constant>404</constant>
+ <constant>500</constant>
</setHeader>
- <transform>
- <simple>ERROR: ${exception.message}</simple>
- </transform>
- <to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <setBody>
+ <simple>POST Policy model YAML FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -1039,14 +1230,16 @@
<handled>
<constant>true</constant>
</handled>
- <setHeader headerName="CamelHttpResponseCode">
- <constant>404</constant>
- </setHeader>
- <transform>
- <simple>ERROR: ${exception.message}</simple>
- </transform>
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="MODIFY Policy Model YAML request failed: ${exception.stacktrace}" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>MODIFY Policy model YAML FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -1071,14 +1264,16 @@
<handled>
<constant>true</constant>
</handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="GET ALL templates request failed: ${exception.stacktrace}" />
<setHeader headerName="CamelHttpResponseCode">
<constant>500</constant>
</setHeader>
- <transform>
- <simple>ERROR: ${exception.message}</simple>
- </transform>
- <to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <setBody>
+ <simple>GET ALL templates FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -1103,14 +1298,16 @@
<handled>
<constant>true</constant>
</handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="GET Template request failed for template: ${header.templateName}, ${exception.stacktrace}" />
<setHeader headerName="CamelHttpResponseCode">
<constant>500</constant>
</setHeader>
- <transform>
- <simple>ERROR: ${exception.message}</simple>
- </transform>
- <to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <setBody>
+ <simple>GET Template FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -1131,10 +1328,18 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="GET All Template names request failed for template: ${exception.stacktrace}" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET All Template names FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
@@ -1155,10 +1360,18 @@
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
- <constant>false</constant>
+ <constant>true</constant>
</handled>
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ <log loggingLevel="ERROR"
+ message="GET SVG for template failed for template: ${header.templateName}, ${exception.stacktrace}" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET SVG for Template FAILED</simple>
+ </setBody>
</doCatch>
</doTry>
</route>
diff --git a/src/main/resources/logback-default.xml b/src/main/resources/logback-default.xml
index 4c496716c..a91f9576b 100644
--- a/src/main/resources/logback-default.xml
+++ b/src/main/resources/logback-default.xml
@@ -58,16 +58,12 @@
</encoder>
<rollingPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${outputDirectory}/clamp/error.%d{yyyy-MM-dd}.%i.log.zip
+ <fileNamePattern>${logDirectory}/error.%d{yyyy-MM-dd}.%i.log.zip
</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
- <maxHistory>30</maxHistory>
- <totalSizeCap>10GB</totalSizeCap>
+ <maxHistory>20</maxHistory>
+ <totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>10MB</maxFileSize>
- </triggeringPolicy>
</appender>
<appender
@@ -81,11 +77,11 @@
</encoder>
<rollingPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${outputDirectory}/clamp/debug.%d{yyyy-MM-dd}.%i.log.zip
+ <fileNamePattern>${logDirectory}/debug.%d{yyyy-MM-dd}.%i.log.zip
</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
- <maxHistory>30</maxHistory>
- <totalSizeCap>10GB</totalSizeCap>
+ <maxHistory>20</maxHistory>
+ <totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
</appender>
@@ -100,15 +96,13 @@
</pattern>
</encoder>
<rollingPolicy
- class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <maxIndex>10</maxIndex>
- <FileNamePattern>${logDirectory}/audit.%i.log.zip
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <FileNamePattern>${logDirectory}/audit.%d{yyyy-MM-dd}.%i.log.zip
</FileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>20</maxHistory>
+ <totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>10MB</maxFileSize>
- </triggeringPolicy>
</appender>
<appender
name="asyncEELFAudit"
@@ -127,16 +121,15 @@
%msg%n</pattern>
</encoder>
<rollingPolicy
- class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <maxIndex>10</maxIndex>
- <FileNamePattern>${logDirectory}/metric.%i.log.zip
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <FileNamePattern>${logDirectory}/metric.%d{yyyy-MM-dd}.%i.log.zip
</FileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>20</maxHistory>
+ <totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>10MB</maxFileSize>
- </triggeringPolicy>
</appender>
+
<appender
name="asyncEELFMetrics"
class="ch.qos.logback.classic.AsyncAppender">
@@ -155,16 +148,15 @@
</pattern>
</encoder>
<rollingPolicy
- class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <maxIndex>10</maxIndex>
- <FileNamePattern>${logDirectory}/security.%i.log.zip
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <FileNamePattern>${logDirectory}/security.%d{yyyy-MM-dd}.%i.log.zip
</FileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>20</maxHistory>
+ <totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>10MB</maxFileSize>
- </triggeringPolicy>
</appender>
+
<appender
name="asyncEELFSecurity"
class="ch.qos.logback.classic.AsyncAppender">
@@ -177,39 +169,34 @@
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
</filter>
- <file>${logDirectory}/Audit-${lrmRVer}-${lrmRO}-${Pid}.log</file>
+ <file>${logDirectory}/Audits.log</file>
<rollingPolicy
- class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${logDirectory}/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/Audits-%d{yyyy-MM-dd}.%i.log.zip
</fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>9</maxIndex>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>20</maxHistory>
+ <totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>5MB</maxFileSize>
- </triggeringPolicy>
<encoder>
<pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
</encoder>
</appender>
+
<appender
name="perfLogs"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
</filter>
- <file>${logDirectory}/Perform-${lrmRVer}-${lrmRO}-${Pid}.log</file>
+ <file>${logDirectory}/Perform.log</file>
<rollingPolicy
- class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${logDirectory}/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/Perform--%d{yyyy-MM-dd}.%i.log.zip
</fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>9</maxIndex>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>20</maxHistory>
+ <totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>5MB</maxFileSize>
- </triggeringPolicy>
<encoder>
<pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
</encoder>
@@ -221,18 +208,29 @@
<appender-ref ref="DEBUG" />
</logger>
<logger
+ name="org.hibernate"
+ level="INFO">
+ <appender-ref ref="DEBUG" />
+ </logger>
+ <logger
+ name="org.apache.camel.Tracing"
+ level="INFO">
+ <appender-ref ref="DEBUG" />
+ </logger>
+
+ <logger
name="org.apache"
- level="DEBUG">
+ level="INFO">
<appender-ref ref="DEBUG" />
</logger>
<!-- Spring related loggers -->
<logger
name="org.springframework"
- level="DEBUG">
+ level="INFO">
<appender-ref ref="DEBUG" />
</logger>
- <!-- CLDS related loggers -->
+ <!-- CLAMP related loggers -->
<logger
name="org.onap.clamp"
level="DEBUG">
@@ -240,7 +238,6 @@
<appender-ref ref="DEBUG" />
</logger>
- <!-- CLDS related loggers -->
<logger
name="com.att.eelf.error"
level="OFF">
diff --git a/src/main/resources/logback.xml b/src/main/resources/logback-spring.xml
index ffa497f1d..ffa497f1d 100644
--- a/src/main/resources/logback.xml
+++ b/src/main/resources/logback-spring.xml
diff --git a/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java b/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java
index b42ba987e..7f3b57095 100644
--- a/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java
+++ b/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java
@@ -47,13 +47,15 @@ public class DcaeComponentTest {
private Loop createTestLoop() {
Loop loopTest = new Loop("ControlLoopTest", "<xml></xml>");
loopTest.setGlobalPropertiesJson(
- new Gson().fromJson("{\"dcaeDeployParameters\":{\"loop template blueprint\": {\"policy_id\": \"name\"}}}", JsonObject.class));
+ new Gson().fromJson(
+ "{\"dcaeDeployParameters\":{\"uniqueBlueprintParameters\": {\"policy_id\": \"name\"}}}",
+ JsonObject.class));
loopTest.setLastComputedState(LoopState.DESIGN);
loopTest.setDcaeDeploymentId("123456789");
loopTest.setDcaeDeploymentStatusUrl("http4://localhost:8085");
MicroServicePolicy microServicePolicy = new MicroServicePolicy("configPolicyTest", new PolicyModel("policy1",
- "tosca_definitions_version: tosca_simple_yaml_1_0_0","1.0.0"), true,
+ "tosca_definitions_version: tosca_simple_yaml_1_0_0", "1.0.0"), true,
new Gson().fromJson("{\"configtype\":\"json\"}", JsonObject.class), null, null, null);
microServicePolicy.setConfigurationsJson(new Gson().fromJson("{\"param1\":\"value1\"}", JsonObject.class));
@@ -67,6 +69,7 @@ public class DcaeComponentTest {
/**
* Test the DcaeReponse roughly.
+ *
* @throws IOException In case of issues
*/
@Test
@@ -166,7 +169,8 @@ public class DcaeComponentTest {
/**
* Test the Converter to DcaeInventoryResponse method.
- * @throws IOException In case of failure
+ *
+ * @throws IOException In case of failure
* @throws ParseException In case of failure
*/
@Test
diff --git a/src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java b/src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java
index 98134e828..97fe337de 100644
--- a/src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java
+++ b/src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java
@@ -72,7 +72,7 @@ public class DeployFlowTestItCase {
@Transactional
public void deployWithSingleBlueprintTest() throws JsonSyntaxException, IOException {
Loop loopTest = createLoop("ControlLoopTest", "<xml></xml>", "yamlcontent",
- "{\"dcaeDeployParameters\":{\"loop template blueprint\": {\"policy_id\": \"name\"}}}",
+ "{\"dcaeDeployParameters\":{\"uniqueBlueprintParameters\": {\"policy_id\": \"name\"}}}",
"UUID-blueprint");
LoopTemplate template = new LoopTemplate();
template.setName("templateName");
diff --git a/src/test/resources/example/sdc/expected-result/deployment-parameters-single-blueprint.json b/src/test/resources/example/sdc/expected-result/deployment-parameters-single-blueprint.json
index 494c2e4ff..7140a4748 100644
--- a/src/test/resources/example/sdc/expected-result/deployment-parameters-single-blueprint.json
+++ b/src/test/resources/example/sdc/expected-result/deployment-parameters-single-blueprint.json
@@ -1,9 +1,9 @@
{
"dcaeDeployParameters": {
- "loop template blueprint": {
+ "uniqueBlueprintParameters": {
"location_id": "",
"service_id": "",
- "policy_id": "loop template blueprint"
+ "policy_id": "testName1"
}
}
} \ 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&#63;connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0&#63;connectionTimeToLive=5000/.file
index 49f409ae3..14ae7acd8 100644
--- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0&#63;connectionTimeToLive=5000/.file
+++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0&#63;connectionTimeToLive=5000/.file
@@ -1,162 +1,360 @@
tosca_definitions_version: tosca_simple_yaml_1_1_0
policy_types:
- onap.policies.controlloop.operational.common.Apex:
- derived_from: onap.policies.controlloop.operational.Common
- type_version: 1.0.0
- version: 1.0.0
- description: Operational policies for Apex PDP
+ onap.policies.controlloop.operational.Common:
properties:
- engineServiceParameters:
- type: string
- description: The engine parameters like name, instanceCount, policy implementation, parameters etc.
+ 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
- eventInputParameters:
- type: string
- description: The event input parameters.
+ 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
- eventOutputParameters:
+ constraints: [
+ ]
+ entry_schema:
+ type: onap.datatype.controlloop.Operation
+ typeVersion: 0.0.0
+ constraints: [
+ ]
+ metadata: {
+ }
+ trigger:
+ name: trigger
type: string
- description: The event output parameters.
+ typeVersion: 0.0.0
+ description: Initial operation to execute upon receiving an Onset
+ event message for the Control Loop.
required: true
- javaProperties:
+ 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
- description: Name/value pairs of properties to be set for APEX if needed.
- required: false
- onap.policies.controlloop.operational.Common:
- derived_from: tosca.policies.Root
+ 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:
- id:
+ engineServiceParameters:
+ name: engineServiceParameters
type: string
- description: The unique control loop id.
+ typeVersion: 0.0.0
+ description: The engine parameters like name, instanceCount, policy
+ implementation, parameters etc.
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:
+ constraints: [
+ ]
+ metadata: {
+ }
+ eventOutputParameters:
+ name: eventOutputParameters
type: string
- description: Initial operation to execute upon receiving an Onset event message for the Control Loop.
+ typeVersion: 0.0.0
+ description: The event output parameters.
required: true
- operations:
- type: list
- description: List of operations to be performed when Control Loop is triggered.
+ 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
- entry_schema:
- type: onap.datatype.controlloop.Operation
+ 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.Target:
- derived_from: tosca.datatypes.Root
- description: Definition for a entity in A&AI to perform a control loop operation on
+ onap.datatype.controlloop.Actor:
+ constraints: [
+ ]
properties:
- targetType:
- type: string
- description: Category for the target type
- required: true
- constraints:
- - valid_values: [VNF, VM, VFMODULE, PNF]
- entityIds:
+ payload:
+ name: payload
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.
+ typeVersion: 0.0.0
+ description: Name/value pairs of payload information passed by Policy
+ to the actor
required: false
- metadata:
- clamp_possible_values: ClampExecution:CSAR_RESOURCES
+ constraints: [
+ ]
entry_schema:
type: string
-
- onap.datatype.controlloop.Actor:
- derived_from: tosca.datatypes.Root
- description: An actor/operation/target definition
- properties:
+ 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
- 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:
+ clamp_possible_values: Dictionary:DefaultOperations, ClampExecution:CDS/operation
+ name: onap.datatype.controlloop.Actor
+ version: 0.0.0
derived_from: tosca.datatypes.Root
- description: An operation supported by an actor
+ 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
- description:
+ constraints: [
+ ]
+ metadata: {
+ }
+ failure_timeout:
+ name: failure_timeout
type: string
- description: A user-friendly description of the intent for the operation
+ 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
- timeout:
+ 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
- description: The amount of time for the actor to perform the operation.
+ typeVersion: 0.0.0
+ description: The number of retries the actor should attempt to perform
+ the operation.
+ default: '0'
required: true
- retries:
+ constraints: [
+ ]
+ metadata: {
+ }
+ timeout:
+ name: timeout
type: integer
- description: The number of retries the actor should attempt to perform the operation.
+ typeVersion: 0.0.0
+ description: The amount of time for the actor 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:
+ constraints: [
+ ]
+ metadata: {
+ }
+ failure_exception:
+ name: failure_exception
type: string
- description: Points to the operation to invoke on Actor operation failure.
+ typeVersion: 0.0.0
+ description: Points to the operation to invoke when the current operation
+ causes an exception.
+ default: final_failure_exception
required: false
- default: final_failure
- failure_timeout:
+ constraints: [
+ ]
+ metadata: {
+ }
+ description:
+ name: description
type: string
- description: Points to the operation to invoke when the time out for the operation occurs.
+ typeVersion: 0.0.0
+ description: A user-friendly description of the intent for the operation
required: false
- default: final_failure_timeout
- failure_retries:
+ constraints: [
+ ]
+ metadata: {
+ }
+ success:
+ name: success
type: string
- description: Points to the operation to invoke when the current operation has exceeded its max retries.
+ 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
- default: final_failure_retries
- failure_exception:
- type: string
- description: Points to the operation to invoke when the current operation causes an exception.
+ 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
- default: final_failure_exception
- failure_guard:
+ constraints: [
+ ]
+ entry_schema:
+ type: string
+ typeVersion: 0.0.0
+ constraints: [
+ ]
+ metadata:
+ clamp_possible_values: ClampExecution:CSAR_RESOURCES
+ targetType:
+ name: targetType
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
+ 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/logback.xml b/src/test/resources/logback.xml
index c71bcba8f..c47cab31c 100644
--- a/src/test/resources/logback.xml
+++ b/src/test/resources/logback.xml
@@ -78,10 +78,14 @@
<logger
name="ch.qos.logback.classic"
- level="INFO" />
+ level="INFO" >
+ <appender-ref ref="STDOUT" />
+ </logger>
<logger
name="ch.qos.logback.core"
- level="INFO" />
+ level="INFO" >
+ <appender-ref ref="STDOUT" />
+ </logger>
<!-- logback jms appenders & loggers definition ends here -->
diff --git a/src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json b/src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json
index 3fda11116..687e9b237 100644
--- a/src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json
+++ b/src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json
@@ -3,32 +3,20 @@
"type": "object",
"description": "Operational policies for Apex PDP",
"required": [
- "id",
- "timeout",
"abatement",
- "trigger",
"operations",
+ "trigger",
+ "timeout",
+ "id",
"engineServiceParameters",
- "eventInputParameters",
- "eventOutputParameters"
+ "eventOutputParameters",
+ "eventInputParameters"
],
"properties": {
- "id": {
- "type": "string",
- "description": "The unique control loop id."
- },
- "timeout": {
- "type": "integer",
- "description": "Overall timeout for executing all the operations. This timeout should equal or exceed the total\ntimeout for each operation listed.\n"
- },
"abatement": {
"type": "boolean",
"description": "Whether an abatement event message will be expected for the control loop from DCAE.",
- "default": false
- },
- "trigger": {
- "type": "string",
- "description": "Initial operation to execute upon receiving an Onset event message for the Control Loop."
+ "default": "false"
},
"operations": {
"type": "array",
@@ -40,88 +28,158 @@
"required": [
"id",
"operation",
- "timeout",
- "retries"
+ "retries",
+ "timeout"
],
"properties": {
+ "failure_retries": {
+ "type": "string",
+ "description": "Points to the operation to invoke when the current operation has exceeded its max retries.",
+ "default": "final_failure_retries"
+ },
"id": {
"type": "string",
"description": "Unique identifier for the operation"
},
- "description": {
+ "failure_timeout": {
"type": "string",
- "description": "A user-friendly description of the intent for the operation"
+ "description": "Points to the operation to invoke when the time out for the operation occurs.",
+ "default": "final_failure_timeout"
+ },
+ "failure": {
+ "type": "string",
+ "description": "Points to the operation to invoke on Actor operation failure.",
+ "default": "final_failure"
},
"operation": {
"title": "onap.datatype.controlloop.Actor",
"type": "object",
"description": "An actor/operation/target definition",
"required": [
+ "target",
"actor",
- "operation",
- "target"
+ "operation"
],
"properties": {
- "actor": {
- "type": "string",
- "description": "The actor performing the operation.",
- "enum": [
- "SDNR",
- "SDNC",
- "VFC",
- "SO",
- "APPC",
- "CDS"
- ],
- "options": {
- "enum_titles": [
- "SDNR",
- "SDNC",
- "VFC",
- "SO",
- "APPC"
- ]
- }
- },
- "operation": {
- "type": "string",
- "description": "The operation the actor is performing.",
+ "payload": {
+ "type": "object",
+ "description": "Name/value pairs of payload information passed by Policy to the actor",
"enum": [
- "BandwidthOnDemand",
- "VF Module Delete",
- "Reroute",
- "VF Module Create",
- "ModifyConfig",
- "Rebuild",
- "Restart",
- "Migrate",
- "Health-Check",
- "resource-assignment",
- "activate",
- "activate-restconf",
- "activate-cli",
- "assign-activate",
- "imperative-test-wf"
- ],
- "options": {
- "enum_titles": [
- "BandwidthOnDemand (SDNC operation)",
- "VF Module Delete (SO operation)",
- "Reroute (SDNC operation)",
- "VF Module Create (SO operation)",
- "ModifyConfig (APPC/VFC operation)",
- "Rebuild (APPC operation)",
- "Restart (APPC operation)",
- "Migrate (APPC operation)",
- "Health-Check (APPC operation)",
- "resource-assignment (CDS operation)",
- "activate (CDS operation)",
- "activate-restconf (CDS operation)",
- "activate-cli (CDS operation)",
- "assign-activate (CDS operation)",
- "imperative-test-wf (CDS operation)"
- ]
- }
+ {
+ "title": "resource-assignment",
+ "properties": {
+ "artifact_name": "baseconfiguration",
+ "artifact_version": "1.0.0",
+ "mode": "async",
+ "data": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ }
+ },
+ {
+ "title": "activate",
+ "properties": {
+ "artifact_name": "baseconfiguration",
+ "artifact_version": "1.0.0",
+ "mode": "async",
+ "data": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ }
+ },
+ {
+ "title": "activate-restconf",
+ "properties": {
+ "artifact_name": "baseconfiguration",
+ "artifact_version": "1.0.0",
+ "mode": "async",
+ "data": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ }
+ },
+ {
+ "title": "activate-cli",
+ "properties": {
+ "artifact_name": "baseconfiguration",
+ "artifact_version": "1.0.0",
+ "mode": "async",
+ "data": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ }
+ },
+ {
+ "title": "assign-activate",
+ "properties": {
+ "artifact_name": "baseconfiguration",
+ "artifact_version": "1.0.0",
+ "mode": "async",
+ "data": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ }
+ },
+ {
+ "title": "imperative-test-wf",
+ "properties": {
+ "artifact_name": "baseconfiguration",
+ "artifact_version": "1.0.0",
+ "mode": "async",
+ "data": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ }
+ }
+ ]
},
"target": {
"title": "onap.datatype.controlloop.Target",
@@ -131,16 +189,6 @@
"targetType"
],
"properties": {
- "targetType": {
- "type": "string",
- "description": "Category for the target type",
- "enum": [
- "VNF",
- "VM",
- "VFMODULE",
- "PNF"
- ]
- },
"entityIds": {
"type": "object",
"description": "Map of values that identify the resource. If none are provided, it is assumed that the\nentity that generated the ONSET event will be the target.\n",
@@ -321,180 +369,128 @@
}
}
]
+ },
+ "targetType": {
+ "type": "string",
+ "description": "Category for the target type",
+ "enum": [
+ "VNF",
+ "VM",
+ "VFMODULE",
+ "PNF"
+ ]
}
}
},
- "payload": {
- "type": "object",
- "description": "Name/value pairs of payload information passed by Policy to the actor",
+ "actor": {
+ "type": "string",
+ "description": "The actor performing the operation.",
"enum": [
- {
- "title": "resource-assignment",
- "properties": {
- "artifact_name": "baseconfiguration",
- "artifact_version": "1.0.0",
- "mode": "async",
- "data": {
- "resource-assignment-properties": {
- "request-id": "",
- "service-instance-id": "",
- "vnf-id": "",
- "action-name": "",
- "scope-type": "",
- "hostname": "",
- "vnf_name": ""
- }
- }
- }
- },
- {
- "title": "activate",
- "properties": {
- "artifact_name": "baseconfiguration",
- "artifact_version": "1.0.0",
- "mode": "async",
- "data": {
- "resource-assignment-properties": {
- "request-id": "",
- "service-instance-id": "",
- "vnf-id": "",
- "action-name": "",
- "scope-type": "",
- "hostname": "",
- "vnf_name": ""
- }
- }
- }
- },
- {
- "title": "activate-restconf",
- "properties": {
- "artifact_name": "baseconfiguration",
- "artifact_version": "1.0.0",
- "mode": "async",
- "data": {
- "resource-assignment-properties": {
- "request-id": "",
- "service-instance-id": "",
- "vnf-id": "",
- "action-name": "",
- "scope-type": "",
- "hostname": "",
- "vnf_name": ""
- }
- }
- }
- },
- {
- "title": "activate-cli",
- "properties": {
- "artifact_name": "baseconfiguration",
- "artifact_version": "1.0.0",
- "mode": "async",
- "data": {
- "resource-assignment-properties": {
- "request-id": "",
- "service-instance-id": "",
- "vnf-id": "",
- "action-name": "",
- "scope-type": "",
- "hostname": "",
- "vnf_name": ""
- }
- }
- }
- },
- {
- "title": "assign-activate",
- "properties": {
- "artifact_name": "baseconfiguration",
- "artifact_version": "1.0.0",
- "mode": "async",
- "data": {
- "resource-assignment-properties": {
- "request-id": "",
- "service-instance-id": "",
- "vnf-id": "",
- "action-name": "",
- "scope-type": "",
- "hostname": "",
- "vnf_name": ""
- }
- }
- }
- },
- {
- "title": "imperative-test-wf",
- "properties": {
- "artifact_name": "baseconfiguration",
- "artifact_version": "1.0.0",
- "mode": "async",
- "data": {
- "resource-assignment-properties": {
- "request-id": "",
- "service-instance-id": "",
- "vnf-id": "",
- "action-name": "",
- "scope-type": "",
- "hostname": "",
- "vnf_name": ""
- }
- }
- }
- }
- ]
+ "SDNR",
+ "SDNC",
+ "VFC",
+ "SO",
+ "APPC",
+ "CDS"
+ ],
+ "options": {
+ "enum_titles": [
+ "SDNR",
+ "SDNC",
+ "VFC",
+ "SO",
+ "APPC"
+ ]
+ }
+ },
+ "operation": {
+ "type": "string",
+ "description": "The operation the actor is performing.",
+ "enum": [
+ "BandwidthOnDemand",
+ "VF Module Delete",
+ "Reroute",
+ "VF Module Create",
+ "ModifyConfig",
+ "Rebuild",
+ "Restart",
+ "Migrate",
+ "Health-Check",
+ "resource-assignment",
+ "activate",
+ "activate-restconf",
+ "activate-cli",
+ "assign-activate",
+ "imperative-test-wf"
+ ],
+ "options": {
+ "enum_titles": [
+ "BandwidthOnDemand (SDNC operation)",
+ "VF Module Delete (SO operation)",
+ "Reroute (SDNC operation)",
+ "VF Module Create (SO operation)",
+ "ModifyConfig (APPC/VFC operation)",
+ "Rebuild (APPC operation)",
+ "Restart (APPC operation)",
+ "Migrate (APPC operation)",
+ "Health-Check (APPC operation)",
+ "resource-assignment (CDS operation)",
+ "activate (CDS operation)",
+ "activate-restconf (CDS operation)",
+ "activate-cli (CDS operation)",
+ "assign-activate (CDS operation)",
+ "imperative-test-wf (CDS operation)"
+ ]
+ }
}
}
},
- "timeout": {
- "type": "integer",
- "description": "The amount of time for the actor to perform the operation."
+ "failure_guard": {
+ "type": "string",
+ "description": "Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.",
+ "default": "final_failure_guard"
},
"retries": {
"type": "integer",
"description": "The number of retries the actor should attempt to perform the operation.",
- "default": 0
+ "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.",
- "default": "final_success"
- },
- "failure": {
- "type": "string",
- "description": "Points to the operation to invoke on Actor operation failure.",
- "default": "final_failure"
- },
- "failure_timeout": {
- "type": "string",
- "description": "Points to the operation to invoke when the time out for the operation occurs.",
- "default": "final_failure_timeout"
- },
- "failure_retries": {
- "type": "string",
- "description": "Points to the operation to invoke when the current operation has exceeded its max retries.",
- "default": "final_failure_retries"
+ "timeout": {
+ "type": "integer",
+ "description": "The amount of time for the actor to perform the operation."
},
"failure_exception": {
"type": "string",
"description": "Points to the operation to invoke when the current operation causes an exception.",
"default": "final_failure_exception"
},
- "failure_guard": {
+ "description": {
"type": "string",
- "description": "Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.",
- "default": "final_failure_guard"
+ "description": "A user-friendly description of the intent for the operation"
+ },
+ "success": {
+ "type": "string",
+ "description": "Points to the operation to invoke on success. A value of \"final_success\" indicates and end to the operation.",
+ "default": "final_success"
}
}
}
},
- "engineServiceParameters": {
+ "trigger": {
"type": "string",
- "description": "The engine parameters like name, instanceCount, policy implementation, parameters etc."
+ "description": "Initial operation to execute upon receiving an Onset event message for the Control Loop."
},
- "eventInputParameters": {
+ "timeout": {
+ "type": "integer",
+ "description": "Overall timeout for executing all the operations. This timeout should equal or exceed the total\ntimeout for each operation listed.\n"
+ },
+ "id": {
"type": "string",
- "description": "The event input parameters."
+ "description": "The unique control loop id."
+ },
+ "engineServiceParameters": {
+ "type": "string",
+ "description": "The engine parameters like name, instanceCount, policy implementation, parameters etc."
},
"eventOutputParameters": {
"type": "string",
@@ -503,6 +499,10 @@
"javaProperties": {
"type": "string",
"description": "Name/value pairs of properties to be set for APEX if needed."
+ },
+ "eventInputParameters": {
+ "type": "string",
+ "description": "The event input parameters."
}
}
} \ No newline at end of file