aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/resources/clds/camel/rest/clamp-api-v2.xml21
-rw-r--r--src/main/resources/clds/camel/routes/dcae-flows.xml11
-rw-r--r--src/main/resources/clds/camel/routes/policy-flows.xml22
3 files changed, 41 insertions, 13 deletions
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 fc7dbd492..879c9b707 100644
--- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml
+++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml
@@ -697,16 +697,14 @@
<to uri="direct:load-loop" />
<to
uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request','INFO',${exchangeProperty[loopObject]})" />
- <doTry>
- <to uri="direct:update-policy-status-for-loop" />
- <to uri="direct:update-dcae-status-for-loop" />
- <to uri="direct:update-loop-state" />
+ <to uri="direct:update-policy-status-for-loop" />
+ <to uri="direct:update-dcae-status-for-loop" />
+ <to uri="direct:update-loop-state" />
- <to
+ <to
uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
+ <to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
- </doTry>
<doCatch>
<exception>java.lang.Exception</exception>
<handled>
@@ -718,17 +716,14 @@
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]})" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>GET STATUS request FAILED</simple>
- </setBody>
</doCatch>
<doFinally>
<setBody>
<simple>${exchangeProperty[loopObject]}</simple>
</setBody>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>200</constant>
+ </setHeader>
</doFinally>
</doTry>
</route>
diff --git a/src/main/resources/clds/camel/routes/dcae-flows.xml b/src/main/resources/clds/camel/routes/dcae-flows.xml
index f40207cc7..e36f28abf 100644
--- a/src/main/resources/clds/camel/routes/dcae-flows.xml
+++ b/src/main/resources/clds/camel/routes/dcae-flows.xml
@@ -371,6 +371,17 @@
message="Endpoint to query Closed Loop status: ${exchangeProperty[getStatusUrl]}"></log>
<toD
uri="${exchangeProperty[getStatusUrl]}?bridgeEndpoint=true&amp;useSystemProperties=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authMethod=Basic&amp;authUsername={{clamp.config.dcae.deployment.userName}}&amp;authPassword={{clamp.config.dcae.deployment.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=30000&amp;authenticationPreemptive=true&amp;connectionClose=true" />
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+
+ <log loggingLevel="ERROR"
+ message="GET policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET policy request failed, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})" />
+ </doCatch>
<doFinally>
<to uri="direct:reset-raise-http-exception-flag" />
<to
diff --git a/src/main/resources/clds/camel/routes/policy-flows.xml b/src/main/resources/clds/camel/routes/policy-flows.xml
index 59772c253..1731308ee 100644
--- a/src/main/resources/clds/camel/routes/policy-flows.xml
+++ b/src/main/resources/clds/camel/routes/policy-flows.xml
@@ -56,6 +56,17 @@
message="Endpoint to get policy: {{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policyType]}/versions/${exchangeProperty[policyTypeVersion]}/policies/${exchangeProperty[policyName]}/versions/${exchangeProperty[policyVersion]}"></log>
<toD
uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policyType]}/versions/${exchangeProperty[policyTypeVersion]}/policies/${exchangeProperty[policyName]}/versions/${exchangeProperty[policyVersion]}?bridgeEndpoint=true&amp;useSystemProperties=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authMethod=Basic&amp;authUsername={{clamp.config.policy.api.userName}}&amp;authPassword={{clamp.config.policy.api.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=20000&amp;authenticationPreemptive=true&amp;connectionClose=true"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+
+ <log loggingLevel="ERROR"
+ message="GET policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET policy request failed, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})" />
+ </doCatch>
<doFinally>
<to uri="direct:reset-raise-http-exception-flag"/>
<to
@@ -99,6 +110,17 @@
message="Endpoint to get policy deployment status: {{clamp.config.policy.pap.url}}/policy/pap/v1/policies/deployed/${exchangeProperty[policyName]}/1.0.0"></log>
<toD
uri="{{clamp.config.policy.pap.url}}/policy/pap/v1/policies/deployed/${exchangeProperty[policyName]}/1.0.0?bridgeEndpoint=true&amp;useSystemProperties=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authMethod=Basic&amp;authUsername={{clamp.config.policy.api.userName}}&amp;authPassword={{clamp.config.policy.api.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=20000&amp;authenticationPreemptive=true&amp;connectionClose=true"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+
+ <log loggingLevel="ERROR"
+ message="GET policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET policy request failed, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})" />
+ </doCatch>
<doFinally>
<to uri="direct:reset-raise-http-exception-flag"/>
<to