diff options
author | Xue Gao <xg353y@intl.att.com> | 2020-04-20 12:03:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-04-20 12:03:19 +0000 |
commit | 9698b59ab5eab72437d8a0f501b21da22b302df3 (patch) | |
tree | af9bb75fea02d19d46f5408762d9a6e518d2d8e7 /src | |
parent | 37f482d431ebd82d1d086c99817cfb556ed55b2f (diff) | |
parent | e79544b8d495cab881f6de3808e6337a2b37e461 (diff) |
Merge "Fix the get status"
Diffstat (limited to 'src')
-rw-r--r-- | src/main/resources/clds/camel/rest/clamp-api-v2.xml | 21 | ||||
-rw-r--r-- | src/main/resources/clds/camel/routes/dcae-flows.xml | 11 | ||||
-rw-r--r-- | src/main/resources/clds/camel/routes/policy-flows.xml | 22 |
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 fc7dbd49..879c9b70 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 f40207cc..e36f28ab 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&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.dcae.deployment.userName}}&authPassword={{clamp.config.dcae.deployment.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=30000&authenticationPreemptive=true&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 59772c25..1731308e 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&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&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&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&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 |