diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/resources/clds/camel/rest/clamp-api-v2.xml | 60 | ||||
-rw-r--r-- | src/main/resources/clds/camel/routes/policy-flows.xml | 4 |
2 files changed, 39 insertions, 25 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 e6741d6f..77062675 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -605,48 +605,62 @@ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request','INFO',${exchangeProperty[loopObject]})" /> <to uri="direct:undeploy-loop" /> <to uri="direct:remove-all-policy-from-active-pdp-group" /> + <log loggingLevel="INFO" + message="Deleting all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}" /> <split> <simple>${exchangeProperty[loopObject].getMicroServicePolicies()} </simple> - <setProperty propertyName="microServicePolicy"> + <setProperty propertyName="policy"> <simple>${body}</simple> </setProperty> <log loggingLevel="INFO" - message="Processing Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" /> - <to uri="direct:delete-micro-service-policy" /> + message="Deleting Micro Service Policy: ${exchangeProperty[policy].getName()}" /> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> + <to uri="direct:delete-policy" /> </split> - <log loggingLevel="INFO" - message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" /> + message="Deleting all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" /> <split> <simple>${exchangeProperty[loopObject].getOperationalPolicies()} </simple> - <setProperty propertyName="operationalPolicy"> + <setProperty propertyName="policy"> <simple>${body}</simple> </setProperty> <log loggingLevel="INFO" - message="Processing Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" /> - <to uri="direct:delete-operational-policy" /> - <log loggingLevel="INFO" - message="Processing all GUARD policies defined in loop ${exchangeProperty[loopObject].getName()}" /> - <split> - <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} - </simple> - <setProperty propertyName="guardPolicy"> - <simple>${body}</simple> - </setProperty> - <log loggingLevel="INFO" - message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" /> - <to uri="direct:delete-guard-policy" /> - </split> + message="Deleting Operational Policy: ${exchangeProperty[policy].getName()}" /> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> + <to uri="direct:delete-policy" /> + <choice> + <when> + <simple>${exchangeProperty['policy'].isLegacy()} == true + </simple> + <log loggingLevel="INFO" + message="Deleting all GUARD policies (LEGACY) defined in loop ${exchangeProperty[loopObject].getName()}" /> + <split> + <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} + </simple> + <setProperty propertyName="guardPolicy"> + <simple>${body}</simple> + </setProperty> + <log loggingLevel="INFO" + message="Deleting Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" /> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> + <to uri="direct:delete-guard-policy" /> + </split> + </when> + </choice> </split> <to - uri="bean:org.onap.clamp.loop.log.LoopController?method=deleteLoop(${header.loopName})" /> + uri="bean:org.onap.clamp.loop.LoopController?method=deleteLoop(${header.loopName})" /> <log loggingLevel="INFO" message="DELETE request successfully executed for loop: ${header.loopName}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request successfully executed','INFO',${exchangeProperty[loopObject]})" /> - <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> <doCatch> <exception>java.lang.Exception</exception> diff --git a/src/main/resources/clds/camel/routes/policy-flows.xml b/src/main/resources/clds/camel/routes/policy-flows.xml index a2c7a4ca..80926722 100644 --- a/src/main/resources/clds/camel/routes/policy-flows.xml +++ b/src/main/resources/clds/camel/routes/policy-flows.xml @@ -648,9 +648,9 @@ </simple> </setHeader> <log loggingLevel="INFO" - message="Endpoint to delete policy from PDP Group: {{clamp.config.policy.pap.url}}/pdps/deployments/batch/${exchangeProperty[policyName]}/versions/1.0.0"></log> + message="Endpoint to delete policy from PDP Group: {{clamp.config.policy.pap.url}}/pdps/policies/${exchangeProperty[policyName]}/versions/1.0.0"></log> <toD - uri="{{clamp.config.policy.pap.url}}/policy/pap/v1/pdps/deployments/batch/${exchangeProperty[policyName]}/versions/1.0.0?bridgeEndpoint=true&useSystemProperties=true&mapHttpMessageHeaders=false&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authUsername={{clamp.config.policy.pap.userName}}&authPassword={{clamp.config.policy.pap.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.policy.pap.url}}/policy/pap/v1/pdps/policies/${exchangeProperty[policyName]}/versions/1.0.0?bridgeEndpoint=true&useSystemProperties=true&mapHttpMessageHeaders=false&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authUsername={{clamp.config.policy.pap.userName}}&authPassword={{clamp.config.policy.pap.password}}&connectionTimeToLive=5000&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true"/> <setProperty propertyName="logMessage"> <simple>${exchangeProperty[policyName]} PDP Group removal status </simple> |