From 88fd35f7b46041f723cff0eaaf4ea4ed46e9530f Mon Sep 17 00:00:00 2001 From: sebdet Date: Fri, 9 Oct 2020 16:32:12 +0200 Subject: Fix the DCAE query The DCAE deployment URL can contain URI parameters that crashes the URL used by HTTP4 Camel. Also the parameter connectionTimeToLive is removed as it is transmitted in each call. The SDC client is also updated to 1.4.1 Issue-ID: CLAMP-954 Signed-off-by: sebdet Change-Id: Ieebdfe009f4339188c75c7a3365546779a087561 Signed-off-by: sebdet --- src/main/resources/clds/camel/routes/cds-flows.xml | 4 +- .../resources/clds/camel/routes/dcae-flows.xml | 956 +++++++++++---------- .../resources/clds/camel/routes/policy-flows.xml | 20 +- 3 files changed, 497 insertions(+), 483 deletions(-) (limited to 'src/main/resources/clds') diff --git a/src/main/resources/clds/camel/routes/cds-flows.xml b/src/main/resources/clds/camel/routes/cds-flows.xml index 9946c990b..0e56970c2 100644 --- a/src/main/resources/clds/camel/routes/cds-flows.xml +++ b/src/main/resources/clds/camel/routes/cds-flows.xml @@ -13,7 +13,7 @@ - + java.lang.Exception @@ -44,7 +44,7 @@ - + java.lang.Exception diff --git a/src/main/resources/clds/camel/routes/dcae-flows.xml b/src/main/resources/clds/camel/routes/dcae-flows.xml index d71db1763..65849e9ae 100644 --- a/src/main/resources/clds/camel/routes/dcae-flows.xml +++ b/src/main/resources/clds/camel/routes/dcae-flows.xml @@ -1,477 +1,491 @@ - - - - - ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true - - - - - ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false - - - - - - - - - - - - ${exchangeProperty[loopObject].getMicroServicePolicies()} - - - ${body} - - - - false - - - - - - - - - PUT - - - application/json - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - - - - - - - - - - java.lang.Exception - - false - - - DEPLOY micro service failed - (MicroService name:${exchangeProperty[microServicePolicy].getName()}), - Dep-id:${exchangeProperty[dcaeDeploymentId]}, - StatusUrl:${exchangeProperty[dcaeStatusUrl]}) - - - - DCAE - - - - - - - - - - - - - - - - - - - - - - PUT - - - application/json - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - - - + + + + + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true + + + + + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false + + + + + + + + + + + + ${exchangeProperty[loopObject].getMicroServicePolicies()} + + + ${body} + + + + false + + + + + + + + + PUT + + + application/json + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + java.lang.Exception + + false + + + DEPLOY micro service failed + (MicroService name:${exchangeProperty[microServicePolicy].getName()}), + Dep-id:${exchangeProperty[dcaeDeploymentId]}, + StatusUrl:${exchangeProperty[dcaeStatusUrl]}) + + + + DCAE + + + + + + + + + + + + + + + + + + + + + + PUT + + + application/json + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + - - - - - - - - - DEPLOY loop status - (Dep-id:${exchangeProperty[dcaeDeploymentId]}, - StatusUrl:${exchangeProperty[dcaeStatusUrl]}) - - - - DCAE - - - - - - - - - - ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true - - - - - ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false - - - - - - - - - - - - ${exchangeProperty[loopObject].getMicroServicePolicies()} - - - ${body} - - - - - ${exchangeProperty[microServicePolicy].getDcaeDeploymentId()} != null - - - - - - DELETE - - - application/json - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - - - - - - - - - - - - - - - - java.lang.Exception - - false - - - UNDEPLOY micro service failed - (MicroService name:${exchangeProperty[microServicePolicy].getName()}) - - - - DCAE - - - - - - - - - - - - - - - - ${exchangeProperty[loopObject].getDcaeDeploymentId()} - != null - - - - - - - DELETE - - - application/json - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - - - - - - - - - - - UNDEPLOY loop status - - - DCAE - - - - - - - - - - - - - - - - - - GET - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - java.lang.Exception - - true - + + + + + + + + + DEPLOY loop status + (Dep-id:${exchangeProperty[dcaeDeploymentId]}, + StatusUrl:${exchangeProperty[dcaeStatusUrl]}) + + + + DCAE + + + + + + + + + + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true + + + + + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false + + + + + + + + + + + + ${exchangeProperty[loopObject].getMicroServicePolicies()} + + + ${body} + + + + + ${exchangeProperty[microServicePolicy].getDcaeDeploymentId()} != null + + + + + + DELETE + + + application/json + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + + + + + + java.lang.Exception + + false + + + UNDEPLOY micro service failed + (MicroService name:${exchangeProperty[microServicePolicy].getName()}) + + + + DCAE + + + + + + + + + + + + + + + + ${exchangeProperty[loopObject].getDcaeDeploymentId()} + != null + + + + + + + DELETE + + + application/json + - - - - - - - - DCAE deployment status - - - DCAE - - - - - - - - - - - - GET - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - - - - + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + UNDEPLOY loop status + + + DCAE + + + + + + + + + + + + + + + + + + GET + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + ${exchangeProperty[getStatusUrl].contains("?")} == true + + + & + + + + + ? + + + + + + java.lang.Exception + + true + - - - - - - - - GET - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - - - - ${exchangeProperty[dcaeResponseList]} - - - ${body} - - - - - - - - - + + + + + + + + DCAE deployment status + + + DCAE + + + + + + + + + + + + GET + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + + + + + + + + + + GET + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + ${exchangeProperty[dcaeResponseList]} + + + ${body} + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/clds/camel/routes/policy-flows.xml b/src/main/resources/clds/camel/routes/policy-flows.xml index 355aba788..9328ceb00 100644 --- a/src/main/resources/clds/camel/routes/policy-flows.xml +++ b/src/main/resources/clds/camel/routes/policy-flows.xml @@ -55,7 +55,7 @@ + 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}}&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true"/> java.lang.Exception @@ -109,7 +109,7 @@ + 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}}&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true"/> java.lang.Exception @@ -161,7 +161,7 @@ + uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true"/> @@ -195,7 +195,7 @@ + uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policyModelName]}/versions/${exchangeProperty[policyModelVersion]}?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true"/> @@ -236,7 +236,7 @@ + uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policy].getPolicyModel().getPolicyModelType()}/versions/${exchangeProperty[policy].getPolicyModel().getVersion()}/policies?bridgeEndpoint=true&useSystemProperties=true&mapHttpMessageHeaders=false&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true"/> + uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policy].getPolicyModel().getPolicyModelType()}/versions/${exchangeProperty[policy].getPolicyModel().getVersion()}/policies/${exchangeProperty[policy].getName()}/versions/${exchangeProperty[policyVersion]}?bridgeEndpoint=true&useSystemProperties=true&mapHttpMessageHeaders=false&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&deleteWithBody=false&mapHttpMessageBody=false&mapHttpMessageFormUrlEncodedBody=false&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true"/> @@ -336,7 +336,7 @@ + uri="{{clamp.config.policy.pap.url}}/policy/pap/v1/pdps/deployments/batch?bridgeEndpoint=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&useSystemProperties=true&authUsername={{clamp.config.policy.pap.userName}}&authPassword={{clamp.config.policy.pap.password}}&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true"/> @@ -386,7 +386,7 @@ + uri="{{clamp.config.policy.pap.url}}/policy/pap/v1/pdps/deployments/batch?bridgeEndpoint=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&useSystemProperties=true&authUsername={{clamp.config.policy.pap.userName}}&authPassword={{clamp.config.policy.pap.password}}&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true"/> @@ -427,7 +427,7 @@ + uri="{{clamp.config.policy.pap.url}}/policy/pap/v1/pdps?bridgeEndpoint=true&useSystemProperties=true&throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&authMethod=Basic&authUsername={{clamp.config.policy.api.userName}}&authPassword={{clamp.config.policy.api.password}}&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true"/> @@ -464,7 +464,7 @@ + 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}}&httpClient.connectTimeout=10000&httpClient.socketTimeout=20000&authenticationPreemptive=true&connectionClose=true"/> ${exchangeProperty[policyName]} PDP Group removal status -- cgit 1.2.3-korg