aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources/clds/camel/rest
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2021-03-25 18:19:29 +0100
committersebdet <sebastien.determe@intl.att.com>2021-04-07 10:14:00 +0200
commit7f685aa342813c611b6e43d7b4a869c7454baddc (patch)
treeb1668e028b2b68fa928f4819ab52b0f2849f31f9 /src/main/resources/clds/camel/rest
parentdf451dc64de36d571efb4f0457a83bc94e8f3969 (diff)
Rework the backend to support PDP updates
Rework Pdp payloads builder so that we can integrate different actions in the same batch + Add a new endpoint to support pdp payload&query to PEF from UI Issue-ID: POLICY-2930 Issue-ID: POLICY-2931 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: I3c933272419770595b706f6950f821220a76f778
Diffstat (limited to 'src/main/resources/clds/camel/rest')
-rw-r--r--src/main/resources/clds/camel/rest/clamp-api-v2.xml38
1 files changed, 38 insertions, 0 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 de0bb1ab0..7129c2828 100644
--- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml
+++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml
@@ -1463,6 +1463,44 @@
</route>
</delete>
+ <put uri="/v2/policies/pdpDeployment/"
+ type="com.google.gson.JsonElement"
+ consumes="application/json" >
+ <route>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Pdp group deployment update')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'policies','','update')"/>
+ <setBody>
+ <method ref="org.onap.policy.clamp.policy.pdpgroup.PdpGroupPayload"
+ method="generatePdpGroupPayloadFromList(${body})"/>
+ </setBody>
+ <log loggingLevel="INFO"
+ message="PDP Group DEPLOY request payload: ${body}"/>
+ <to uri="direct:add-multiple-policies-to-pdp-group"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="PDP Group deployment request failed: ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>PDP Group deployment request FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
+
<get uri="/v2/clampInformation" outType="org.onap.policy.clamp.clds.model.ClampInformation"
produces="application/json">
<to