From: sebdet Date: Fri, 26 Apr 2019 10:04:26 +0000 (+0200) Subject: Rework the logging X-Git-Tag: 4.0.0~10 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=clamp.git;a=commitdiff_plain;h=373b07b5c7f7e74cffb3a7250a691cb649856b94 Rework the logging Rework the logging of the policy calls so it's easier to debug it Issue-ID: CLAMP-357 Change-Id: I0ad955de05fef45c4eaae3a6770baefe8e7f0a1f Signed-off-by: sebdet --- 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 bc1a07fe..5c5f122c 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -5,7 +5,7 @@ outType="java.lang.String[]" produces="application/json"> - + @@ -31,7 +31,9 @@ outType="org.onap.clamp.loop.Loop" produces="application/json"> - + @@ -57,7 +59,9 @@ outType="java.lang.String" produces="application/xml"> - + @@ -86,7 +90,9 @@ outType="org.onap.clamp.loop.Loop" produces="application/json"> - + @@ -120,7 +126,9 @@ outType="org.onap.clamp.loop.Loop" produces="application/json"> - + @@ -154,7 +162,9 @@ outType="org.onap.clamp.policy.microservice.MicroServicePolicy" produces="application/json"> - + @@ -187,7 +197,9 @@ outType="org.onap.clamp.loop.Loop" produces="application/json"> - + @@ -213,7 +225,9 @@ outType="org.onap.clamp.loop.Loop" produces="application/json"> - + @@ -239,7 +253,9 @@ outType="org.onap.clamp.loop.Loop" produces="application/json"> - + - - - - - java.lang.Exception - - false - - - - - - + @@ -279,6 +282,11 @@ + + @@ -288,7 +296,9 @@ outType="org.onap.clamp.loop.Loop" produces="application/json"> - + - - - - java.lang.Exception - - false - - - - + + message="START request successfully executed for loop: ${header.loopName}" /> + + @@ -336,7 +341,9 @@ outType="org.onap.clamp.loop.Loop" produces="application/json"> - + false - - - - - java.lang.Exception - - false - - - - - + @@ -379,31 +374,8 @@ false - - - - - java.lang.Exception - - false - - - - - - - - - java.lang.Exception - - false - - - - - + + false - - - - java.lang.Exception - - false - - - - - - - - - java.lang.Exception - - false - - - - - + + false - - - - - java.lang.Exception - - false - - - - - - - - - java.lang.Exception - - false - - - - - + + - - - - - java.lang.Exception - - false - - - - - - + + message="SUBMIT request successfully executed for loop: ${header.loopName}" /> + + - + - - - - - java.lang.Exception - - false - - - - - - + ${exchangeProperty[loopObject].getMicroServicePolicies()} @@ -562,19 +470,7 @@ - - - - - java.lang.Exception - - false - - - - - + - - - - - java.lang.Exception - - false - - - - - + @@ -614,26 +498,14 @@ - - - - - java.lang.Exception - - false - - - - - + + message="DELETE request successfully executed for loop: ${header.loopName}" /> + + diff --git a/src/main/resources/clds/camel/routes/flexible-flow.xml b/src/main/resources/clds/camel/routes/flexible-flow.xml index 22450205..9ba03078 100644 --- a/src/main/resources/clds/camel/routes/flexible-flow.xml +++ b/src/main/resources/clds/camel/routes/flexible-flow.xml @@ -101,304 +101,303 @@ - - - - - ${exchangeProperty[microServicePolicy].createPolicyPayload()} - - - - POST - - - application/json - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - + + + + + ${exchangeProperty[microServicePolicy].createPolicyPayload()} + + + + POST + + + application/json + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + ${exchangeProperty[microServicePolicy].getName()} creation + status + + + + + + + + + + null + + + DELETE + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + - - - - null - - - DELETE - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - + + + + + ${exchangeProperty[microServicePolicy].getName()} removal + status + + + + + - - - - - ${exchangeProperty[operationalPolicy].createPolicyPayload()} - - - - POST - - - application/yaml; legacy-version - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - + + + + + ${exchangeProperty[operationalPolicy].createPolicyPayload()} + + + + POST + + + application/yaml; vnd.onap.operational + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + ${exchangeProperty[operationalPolicy].getName()} creation + status + + + + + - - - - - null - - - DELETE - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - + + + + + null + + + DELETE + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + ${exchangeProperty[operationalPolicy].getName()} removal + status + + + + + - - - - - ${exchangeProperty[guardPolicy].getValue()} - - - - POST - - - application/json - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - + + + + + ${exchangeProperty[guardPolicy].getValue()} + + + + POST + + + application/json + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + ${exchangeProperty[guardPolicy].getKey()} creation status + + + + + + + + + + null + + + DELETE + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + - - - - null - - - DELETE - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - + + + + + ${exchangeProperty[guardPolicy].getKey()} removal status + + + + + - - - - - ${exchangeProperty[loopObject].createPoliciesPayloadPdpGroup()} - - - - POST - - - application/json - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - - - - - - - - - ${exchangeProperty[loopObject].listPolicyNamesPdpGroup()} - - - ${body} - + + + - null + ${exchangeProperty[loopObject].createPoliciesPayloadPdpGroup()} + - DELETE + POST + + + application/json ${exchangeProperty[X-ONAP-RequestID]} @@ -414,15 +413,82 @@ + message="Endpoint to add policies to PDP Group: {{clamp.config.policy.url}}/policy/pap/v1/pdps"> + uri="{{clamp.config.policy.url}}/policy/pap/v1/pdps?throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&httpClient.connectTimeout=10000&authMethod=Basic&authUsername=test&authPassword=test" /> + + + + + + PDP Group push ALL status + + + + + + + + + + - - - + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Removing policies PDP group')" /> + + ${exchangeProperty[loopObject].listPolicyNamesPdpGroup()} + + + ${body} + + + null + + + DELETE + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + ${exchangeProperty[policyName]} PDP Group removal status + + + + + + java.lang.Exception + + false + + + ${exchangeProperty[policyName]} PDP Group removal status + + + + + + + + + @@ -431,4 +497,10 @@ true + + + + + \ No newline at end of file