aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources/clds/camel/routes
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2019-04-25 12:33:31 +0200
committersebdet <sebastien.determe@intl.att.com>2019-04-25 13:03:05 +0200
commit338c218458d6a671dd754ee5c151517685376bd9 (patch)
treed0e6200b7600f260989b25577626272762856f01 /src/main/resources/clds/camel/routes
parent12700b07bf4850f7de97b69e9b2fcc96e0540b21 (diff)
Fix policy calls
Fix policy calls so that the url is now right + update camel version to latest Issue-ID: CLAMP-357 Change-Id: Iffc83f53eb2361d7551b43b28c8e822fbf38c619 Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/main/resources/clds/camel/routes')
-rw-r--r--src/main/resources/clds/camel/routes/flexible-flow.xml213
1 files changed, 98 insertions, 115 deletions
diff --git a/src/main/resources/clds/camel/routes/flexible-flow.xml b/src/main/resources/clds/camel/routes/flexible-flow.xml
index 808e1d8a1..224502056 100644
--- a/src/main/resources/clds/camel/routes/flexible-flow.xml
+++ b/src/main/resources/clds/camel/routes/flexible-flow.xml
@@ -81,14 +81,14 @@
<setBody>
<simple>${header.loopName}</simple>
</setBody>
- <setHeader headerName="LoopObject">
+ <setProperty propertyName="loopObject">
<method
ref="org.onap.clamp.loop.LoopService"
method="getLoop" />
- </setHeader>
+ </setProperty>
<when>
- <simple>${header.LoopObject} == null</simple>
+ <simple>${exchangeProperty[loopObject]} == null</simple>
<setHeader headerName="CamelHttpResponseCode">
<constant>404</constant>
</setHeader>
@@ -98,16 +98,17 @@
<stop />
</when>
</route>
+
<route id="create-micro-service-policy">
<from uri="direct:create-micro-service-policy" />
-
+
<log
loggingLevel="INFO"
- message="Creating Micro Service Policy: ${header.microServicePolicy.getName()}" />
+ message="Creating Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Create Micro Service Policy')" />
<setBody>
- <simple>${header.microServicePolicy.createPolicyPayload()}
+ <simple>${exchangeProperty[microServicePolicy].createPolicyPayload()}
</simple>
</setBody>
<setHeader headerName="CamelHttpMethod">
@@ -116,38 +117,36 @@
<setHeader headerName="Content-Type">
<constant>application/json</constant>
</setHeader>
- <setHeader headerName="CamelHttpUri">
- <simple>{{clamp.config.policy.url}}/policy/api/v1/policyTypes/${header.microServicePolicy.getModelType()}/versions/1.0.0/policies
- </simple>
- </setHeader>
<setHeader headerName="X-ONAP-RequestID">
- <simple>${header.X-ONAP-REAUESTID}
+ <simple>${exchangeProperty[X-ONAP-RequestID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-InvocationID">
- <simple>${header.X-ONAP-InvocationID}
+ <simple>${exchangeProperty[X-ONAP-InvocationID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-PartnerName">
- <simple>${header.X-ONAP-PartnerName}
+ <simple>${exchangeProperty[X-ONAP-PartnerName]}
</simple>
</setHeader>
<log
loggingLevel="INFO"
- message="Endpoint to create microservice policy: ${header.CamelHttpMethod} ${header.CamelHttpUri}"></log>
+ message="Endpoint to create microservice policy: {{clamp.config.policy.url}}/policy/api/v1/policytypes/${exchangeProperty[microServicePolicy].getModelType()}/versions/1.0.0/policies"></log>
<toD
- uri="http4://policyhost:8085?mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}&amp;httpClient.connectTimeout=10000&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
+ uri="{{clamp.config.policy.url}}/policy/api/v1/policytypes/${exchangeProperty[microServicePolicy].getModelType()}/versions/1.0.0/policies?bridgeEndpoint=true&amp;mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;httpClient.connectTimeout=10000&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('MicroService policy created successfully','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('MicroService policy created successfully','INFO',${exchangeProperty[loopObject]})" />
<to uri="direct:reset-raise-http-exception-flag" />
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
</route>
+
<route id="delete-micro-service-policy">
<from uri="direct:delete-micro-service-policy" />
-
+
<log
loggingLevel="INFO"
- message="Deleting Micro Service Policy: ${header.microServicePolicy.getName()}" />
+ message="Deleting Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Delete Micro Service Policy')" />
<setBody>
@@ -156,43 +155,40 @@
<setHeader headerName="CamelHttpMethod">
<constant>DELETE</constant>
</setHeader>
- <setHeader headerName="CamelHttpUri">
- <simple>{{clamp.config.policy.url}}/policy/api/v1/policyTypes/${header.microServicePolicy.getModelType()}/versions/1.0.0/policies/${header.microServicePolicy.getName()}
- </simple>
- </setHeader>
<setHeader headerName="X-ONAP-RequestID">
- <simple>${header.X-ONAP-REAUESTID}
+ <simple>${exchangeProperty[X-ONAP-RequestID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-InvocationID">
- <simple>${header.X-ONAP-InvocationID}
+ <simple>${exchangeProperty[X-ONAP-InvocationID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-PartnerName">
- <simple>${header.X-ONAP-PartnerName}
+ <simple>${exchangeProperty[X-ONAP-PartnerName]}
</simple>
</setHeader>
<log
loggingLevel="INFO"
- message="Endpoint to delete microservice policy: ${header.CamelHttpMethod} ${header.CamelHttpUri}"></log>
+ message="Endpoint to delete microservice policy: {{clamp.config.policy.url}}/policy/api/v1/policytypes/${exchangeProperty[microServicePolicy].getModelType()}/versions/1.0.0/policies/${exchangeProperty[microServicePolicy].getName()}"></log>
<toD
- uri="http4://policyhost:8085?mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}&amp;httpClient.connectTimeout=10000&amp;deleteWithBody=false&amp;mapHttpMessageBody=false&amp;mapHttpMessageFormUrlEncodedBody=false&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
+ uri="{{clamp.config.policy.url}}/policy/api/v1/policytypes/${exchangeProperty[microServicePolicy].getModelType()}/versions/1.0.0/policies/${exchangeProperty[microServicePolicy].getName()}?bridgeEndpoint=true&amp;mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;httpClient.connectTimeout=10000&amp;deleteWithBody=false&amp;mapHttpMessageBody=false&amp;mapHttpMessageFormUrlEncodedBody=false&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('MicroService policy deleted successfully','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('MicroService policy deleted successfully','INFO',${exchangeProperty[loopObject]})" />
<to uri="direct:reset-raise-http-exception-flag" />
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
</route>
<route id="create-operational-policy">
<from uri="direct:create-operational-policy" />
-
+
<log
loggingLevel="INFO"
- message="Creating Operational Policy: ${header.operationalPolicy.getName()}" />
+ message="Creating Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Create Operational Policy')" />
<setBody>
- <simple>${header.operationalPolicy.createPolicyPayload()}
+ <simple>${exchangeProperty[operationalPolicy].createPolicyPayload()}
</simple>
</setBody>
<setHeader headerName="CamelHttpMethod">
@@ -201,38 +197,36 @@
<setHeader headerName="Content-Type">
<constant>application/yaml; legacy-version</constant>
</setHeader>
- <setHeader headerName="CamelHttpUri">
- <simple>{{clamp.config.policy.url}}/policy/api/v1/policyTypes/onap.policies.controloop.operational/versions/1.0.0/policies
- </simple>
- </setHeader>
<setHeader headerName="X-ONAP-RequestID">
- <simple>${header.X-ONAP-REAUESTID}
+ <simple>${exchangeProperty[X-ONAP-RequestID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-InvocationID">
- <simple>${header.X-ONAP-InvocationID}
+ <simple>${exchangeProperty[X-ONAP-InvocationID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-PartnerName">
- <simple>${header.X-ONAP-PartnerName}
+ <simple>${exchangeProperty[X-ONAP-PartnerName]}
</simple>
</setHeader>
<log
loggingLevel="INFO"
- message="Endpoint to create operational policy: ${header.CamelHttpMethod} ${header.CamelHttpUri}"></log>
+ message="Endpoint to create operational policy: {{clamp.config.policy.url}}/policy/api/v1/policytypes/onap.policies.controlloop.operational/versions/1.0.0/policies"></log>
<toD
- uri="http4://policyhost:8085?mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}&amp;httpClient.connectTimeout=10000&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
+ uri="{{clamp.config.policy.url}}/policy/api/v1/policytypes/onap.policies.controlloop.operational/versions/1.0.0/policies?bridgeEndpoint=true&amp;mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;httpClient.connectTimeout=10000&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational policy created successfully','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational policy created successfully','INFO',${exchangeProperty[loopObject]})" />
<to uri="direct:reset-raise-http-exception-flag" />
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
</route>
+
<route id="delete-operational-policy">
<from uri="direct:delete-operational-policy" />
-
+
<log
loggingLevel="INFO"
- message="Deleting Operational Policy: ${header.operationalPolicy.getName()}" />
+ message="Deleting Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Delete Operational Policy')" />
<setBody>
@@ -241,43 +235,40 @@
<setHeader headerName="CamelHttpMethod">
<constant>DELETE</constant>
</setHeader>
- <setHeader headerName="CamelHttpUri">
- <simple>{{clamp.config.policy.url}}/policy/api/v1/policyTypes/onap.policies.controloop.operational/versions/1.0.0/policies/${header.operationalPolicy.getName()}
- </simple>
- </setHeader>
<setHeader headerName="X-ONAP-RequestID">
- <simple>${header.X-ONAP-REAUESTID}
+ <simple>${exchangeProperty[X-ONAP-RequestID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-InvocationID">
- <simple>${header.X-ONAP-InvocationID}
+ <simple>${exchangeProperty[X-ONAP-InvocationID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-PartnerName">
- <simple>${header.X-ONAP-PartnerName}
+ <simple>${exchangeProperty[X-ONAP-PartnerName]}
</simple>
</setHeader>
<log
loggingLevel="INFO"
- message="Endpoint to delete operational policy: ${header.CamelHttpMethod} ${header.CamelHttpUri}"></log>
+ message="Endpoint to delete operational policy: {{clamp.config.policy.url}}/policy/api/v1/policytypes/onap.policies.controlloop.operational/versions/1.0.0/policies/${exchangeProperty[operationalPolicy].getName()}"></log>
<toD
- uri="http4://policyhost:8085?mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}&amp;httpClient.connectTimeout=10000&amp;deleteWithBody=false&amp;mapHttpMessageBody=false&amp;mapHttpMessageFormUrlEncodedBody=false&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
+ uri="{{clamp.config.policy.url}}/policy/api/v1/policytypes/onap.policies.controlloop.operational/versions/1.0.0/policies/${exchangeProperty[operationalPolicy].getName()}?bridgeEndpoint=true&amp;mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;httpClient.connectTimeout=10000&amp;deleteWithBody=false&amp;mapHttpMessageBody=false&amp;mapHttpMessageFormUrlEncodedBody=false&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational policy deleted successfully','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational policy deleted successfully','INFO',${exchangeProperty[loopObject]})" />
<to uri="direct:reset-raise-http-exception-flag" />
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
</route>
<route id="create-guard-policy">
<from uri="direct:create-guard-policy" />
-
+
<log
loggingLevel="INFO"
- message="Creating Guard Policy: ${header.guardPolicy.getKey()}" />
+ message="Creating Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Create Guard Policy')" />
<setBody>
- <simple>${header.guardPolicy.getValue()}
+ <simple>${exchangeProperty[guardPolicy].getValue()}
</simple>
</setBody>
<setHeader headerName="CamelHttpMethod">
@@ -286,38 +277,36 @@
<setHeader headerName="Content-Type">
<constant>application/json</constant>
</setHeader>
- <setHeader headerName="CamelHttpUri">
- <simple>{{clamp.config.policy.url}}/policy/api/v1/policyTypes/onap.policies.controlloop.Guard/versions/1.0.0/policies
- </simple>
- </setHeader>
<setHeader headerName="X-ONAP-RequestID">
- <simple>${header.X-ONAP-REAUESTID}
+ <simple>${exchangeProperty[X-ONAP-RequestID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-InvocationID">
- <simple>${header.X-ONAP-InvocationID}
+ <simple>${exchangeProperty[X-ONAP-InvocationID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-PartnerName">
- <simple>${header.X-ONAP-PartnerName}
+ <simple>${exchangeProperty[X-ONAP-PartnerName]}
</simple>
</setHeader>
<log
loggingLevel="INFO"
- message="Endpoint to create guard policy: ${header.CamelHttpMethod} ${header.CamelHttpUri}"></log>
+ message="Endpoint to create guard policy: {{clamp.config.policy.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies"></log>
<toD
- uri="http4://policyhost:8085?mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}&amp;httpClient.connectTimeout=10000&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
+ uri="{{clamp.config.policy.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies?bridgeEndpoint=true&amp;mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;httpClient.connectTimeout=10000&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Guard policy created successfully','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Guard policy created successfully','INFO',${exchangeProperty[loopObject]})" />
<to uri="direct:reset-raise-http-exception-flag" />
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
</route>
+
<route id="delete-guard-policy">
<from uri="direct:delete-guard-policy" />
-
+
<log
loggingLevel="INFO"
- message="Deleting Guard Policy: ${header.guardPolicy.getKey()}" />
+ message="Deleting Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Delete Guard Policy')" />
<setBody>
@@ -326,42 +315,40 @@
<setHeader headerName="CamelHttpMethod">
<constant>DELETE</constant>
</setHeader>
- <setHeader headerName="CamelHttpUri">
- <simple>{{clamp.config.policy.url}}/policy/api/v1/policyTypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/${header.guardPolicy.getKey()}
- </simple>
- </setHeader>
<setHeader headerName="X-ONAP-RequestID">
- <simple>${header.X-ONAP-REAUESTID}
+ <simple>${exchangeProperty[X-ONAP-RequestID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-InvocationID">
- <simple>${header.X-ONAP-InvocationID}
+ <simple>${exchangeProperty[X-ONAP-InvocationID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-PartnerName">
- <simple>${header.X-ONAP-PartnerName}
+ <simple>${exchangeProperty[X-ONAP-PartnerName]}
</simple>
</setHeader>
<log
loggingLevel="INFO"
- message="Endpoint to delete guard policy: ${header.CamelHttpMethod} ${header.CamelHttpUri}"></log>
+ message="Endpoint to delete guard policy: {{clamp.config.policy.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/${exchangeProperty[guardPolicy].getKey()}"></log>
<toD
- uri="http4://policyhost:8085?throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}&amp;httpClient.connectTimeout=10000&amp;deleteWithBody=false&amp;mapHttpMessageBody=false&amp;mapHttpMessageFormUrlEncodedBody=false&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
+ uri="{{clamp.config.policy.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/${exchangeProperty[guardPolicy].getKey()}?bridgeEndpoint=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;httpClient.connectTimeout=10000&amp;deleteWithBody=false&amp;mapHttpMessageBody=false&amp;mapHttpMessageFormUrlEncodedBody=false&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Guard policy deleted successfully','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Guard policy deleted successfully','INFO',${exchangeProperty[loopObject]})" />
<to uri="direct:reset-raise-http-exception-flag" />
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
</route>
+
<route id="add-all-to-active-pdp-group">
<from uri="direct:add-all-to-active-pdp-group" />
-
+
<log
loggingLevel="INFO"
- message="Adding loop policies to PDP Group: ${header.LoopObject.getName()}" />
+ message="Adding loop policies to PDP Group: ${exchangeProperty[loopObject].getName()}" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Add policies to PDP group')" />
<setBody>
- <simple>${header.LoopObject.createPoliciesPayloadPdpGroup()}
+ <simple>${exchangeProperty[loopObject].createPoliciesPayloadPdpGroup()}
</simple>
</setBody>
<setHeader headerName="CamelHttpMethod">
@@ -370,82 +357,78 @@
<setHeader headerName="Content-Type">
<constant>application/json</constant>
</setHeader>
- <setHeader headerName="CamelHttpUri">
- <simple>{{clamp.config.policy.url}}/policy/pap/v1/pdps
- </simple>
- </setHeader>
<setHeader headerName="X-ONAP-RequestID">
- <simple>${header.X-ONAP-REAUESTID}
+ <simple>${exchangeProperty[X-ONAP-RequestID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-InvocationID">
- <simple>${header.X-ONAP-InvocationID}
+ <simple>${exchangeProperty[X-ONAP-InvocationID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-PartnerName">
- <simple>${header.X-ONAP-PartnerName}
+ <simple>${exchangeProperty[X-ONAP-PartnerName]}
</simple>
</setHeader>
<log
loggingLevel="INFO"
- message="Endpoint to add policies to PDP Group: ${header.CamelHttpMethod} ${header.CamelHttpUri}"></log>
+ message="Endpoint to add policies to PDP Group: {{clamp.config.policy.url}}/policy/pap/v1/pdps"></log>
<toD
- uri="http4://policyhost:8085?mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}&amp;httpClient.connectTimeout=10000&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
+ uri="{{clamp.config.policy.url}}/policy/pap/v1/pdps?throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;httpClient.connectTimeout=10000&amp;authMethod=Basic&amp;authUsername=test&amp;authPassword=test" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Policies pushed to PDP Group successfully','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Policies pushed to PDP Group successfully','INFO',${exchangeProperty[loopObject]})" />
<to uri="direct:reset-raise-http-exception-flag" />
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
</route>
<route id="remove-all-policy-from-active-pdp-group">
<from uri="direct:remove-all-policy-from-active-pdp-group" />
<log
loggingLevel="INFO"
- message="Removing policies from active PDP group for loop: ${header.LoopObject.getName()}" />
+ message="Removing policies from active PDP group for loop: ${exchangeProperty[loopObject].getName()}" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Removing policies PDP group')" />
<split>
- <simple>${header.LoopObject.listPolicyNamesPdpGroup()}</simple>
- <setHeader headerName="PolicyName">
+ <simple>${exchangeProperty[loopObject].listPolicyNamesPdpGroup()}
+ </simple>
+ <setProperty propertyName="policyName">
<simple>${body}</simple>
- </setHeader>
+ </setProperty>
<setBody>
<constant>null</constant>
</setBody>
<setHeader headerName="CamelHttpMethod">
<constant>DELETE</constant>
</setHeader>
- <setHeader headerName="CamelHttpUri">
- <simple>{{clamp.config.policy.url}}/pdps/policies/${header.PolicyName}/versions/1.0.0
- </simple>
- </setHeader>
<setHeader headerName="X-ONAP-RequestID">
- <simple>${header.X-ONAP-REAUESTID}
+ <simple>${exchangeProperty[X-ONAP-RequestID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-InvocationID">
- <simple>${header.X-ONAP-InvocationID}
+ <simple>${exchangeProperty[X-ONAP-InvocationID]}
</simple>
</setHeader>
<setHeader headerName="X-ONAP-PartnerName">
- <simple>${header.X-ONAP-PartnerName}
+ <simple>${exchangeProperty[X-ONAP-PartnerName]}
</simple>
</setHeader>
<log
loggingLevel="INFO"
- message="Endpoint to delete policy from PDP Group: ${header.CamelHttpMethod} ${header.CamelHttpUri}"></log>
+ message="Endpoint to delete policy from PDP Group: {{clamp.config.policy.url}}/pdps/policies/${exchangeProperty[policyName]}/versions/1.0.0"></log>
<toD
- uri="http4://policyhost:8085?mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${header.RaiseHttpExceptionFlag}&amp;httpClient.connectTimeout=10000&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
+ uri="{{clamp.config.policy.url}}/pdps/policies/${exchangeProperty[policyName]}/versions/1.0.0?bridgeEndpoint=true&amp;mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;httpClient.connectTimeout=10000&amp;authUsername={{clamp.config.policy.userName}}&amp;authPassword={{clamp.config.policy.password}}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog(${header.PolicyName}' Policy removed from PDP Group successfully','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog(${exchangeProperty[policyName]}' Policy removed from PDP Group successfully','INFO',${exchangeProperty[loopObject]})" />
</split>
<to uri="direct:reset-raise-http-exception-flag" />
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
</route>
+
<route id="reset-raise-http-exception-flag">
<from uri="direct:reset-raise-http-exception-flag" />
- <setHeader headerName="RaiseHttpExceptionFlag">
+ <setProperty propertyName="raiseHttpExceptionFlag">
<simple resultType="java.lang.Boolean">true</simple>
- </setHeader>
+ </setProperty>
</route>
</routes> \ No newline at end of file