aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources/clds/camel/rest/clamp-api-v2.xml
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2020-03-16 11:04:34 -0700
committersebdet <sebastien.determe@intl.att.com>2020-03-16 14:00:24 -0700
commite916ac28ba46ff7cad64f1a3150b128ba4772c70 (patch)
tree66ec87f03dfd6eec52f0687183da9321db171094 /src/main/resources/clds/camel/rest/clamp-api-v2.xml
parent82775724cf35060294388f84d2e7d2b0671ee838 (diff)
Rework the policy refresh
Rework the policy refresh for the new unique dialog policyModel Issue-ID: CLAMP-578 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: Ie8c91223e92c1e344d7ead5784ffea33d4f6a00f
Diffstat (limited to 'src/main/resources/clds/camel/rest/clamp-api-v2.xml')
-rw-r--r--src/main/resources/clds/camel/rest/clamp-api-v2.xml53
1 files changed, 44 insertions, 9 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 d1c191dc7..d81c164a5 100644
--- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml
+++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml
@@ -207,24 +207,59 @@
</doTry>
</route>
</put>
- <put uri="/v2/loop/refreshOpPolicyJsonSchema/{loopName}"
+ <put uri="/v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}"
+ outType="org.onap.clamp.loop.Loop" produces="application/json">
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName|microServicePolicyName" />
+ <doTry>
+ <log loggingLevel="INFO"
+ message="Refresh Micro Service Policy UI for loop: ${header.loopName} and ${header.microServicePolicyName}" />
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REFRESH Micro Service Policy UI request')" />
+ <to
+ uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
+ <to uri="direct:load-loop" />
+ <to
+ uri="bean:org.onap.clamp.loop.LoopController?method=refreshMicroServicePolicyJsonRepresentation(${exchangeProperty[loopObject]},${header.microServicePolicyName}})" />
+ <log loggingLevel="INFO"
+ message="REFRESH Micro Service policy request successfully executed for loop: ${header.loopName}" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH Micro Service policy request successfully executed','INFO',${exchangeProperty[loopObject]})" />
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</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}" />
+ <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]})" />
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
+ <put uri="/v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}"
outType="org.onap.clamp.loop.Loop" produces="application/json">
<route>
- <removeHeaders pattern="*" excludePattern="loopName" />
+ <removeHeaders pattern="*" excludePattern="loopName|operationalPolicyName" />
<doTry>
<log loggingLevel="INFO"
- message="Refresh Operational Policy UI for loop: ${header.loopName}" />
+ message="Refresh Operational Policy UI for loop: ${header.loopName} and ${header.operationalPolicyName}" />
<to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REFRESH OP Policy UI request')" />
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REFRESH Operational Policy UI request')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
<to uri="direct:load-loop" />
<to
- uri="bean:org.onap.clamp.loop.LoopController?method=refreshOpPolicyJsonRepresentation(${header.loopName})" />
+ uri="bean:org.onap.clamp.loop.LoopController?method=refreshOperationalPolicyJsonRepresentation(${exchangeProperty[loopObject]},${header.operationalPolicyName}})" />
<log loggingLevel="INFO"
- message="REFRESH request successfully executed for loop: ${header.loopName}" />
+ message="REFRESH operational policy request successfully executed for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH request successfully executed','INFO',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH operational policy request successfully executed','INFO',${exchangeProperty[loopObject]})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
<doCatch>
@@ -235,9 +270,9 @@
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
<log loggingLevel="ERROR"
- message="REFRESH request failed for loop: ${header.loopName}" />
+ message="REFRESH operational policy request failed for loop: ${header.loopName}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH operational policy request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
</doCatch>
</doTry>
</route>