aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pom.xml4
-rw-r--r--src/main/java/org/onap/clamp/flow/log/FlowLogOperation.java20
-rw-r--r--src/main/resources/application-noaaf.properties2
-rw-r--r--src/main/resources/application.properties2
-rw-r--r--src/main/resources/clds/camel/rest/clamp-api-v2.xml572
-rw-r--r--src/main/resources/clds/camel/routes/flexible-flow.xml213
-rw-r--r--src/main/resources/logback-default.xml279
-rw-r--r--src/test/resources/application.properties2
8 files changed, 588 insertions, 506 deletions
diff --git a/pom.xml b/pom.xml
index 0b0236a5f..b7260ffb9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -64,7 +64,7 @@
<java.version>1.8</java.version>
<eelf.core.version>1.0.0</eelf.core.version>
- <camel.version>2.23.1</camel.version>
+ <camel.version>2.23.2</camel.version>
<springboot.version>2.1.4.RELEASE</springboot.version>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
@@ -286,7 +286,7 @@
<!-- For CAMEL -->
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-http4</artifactId>
+ <artifactId>camel-http4-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
diff --git a/src/main/java/org/onap/clamp/flow/log/FlowLogOperation.java b/src/main/java/org/onap/clamp/flow/log/FlowLogOperation.java
index ae96f6a8c..3da93b26a 100644
--- a/src/main/java/org/onap/clamp/flow/log/FlowLogOperation.java
+++ b/src/main/java/org/onap/clamp/flow/log/FlowLogOperation.java
@@ -52,16 +52,15 @@ public class FlowLogOperation {
/**
* Generate the entry log.
*
- * @param serviceDesc The service description
- * the loop name
+ * @param serviceDesc
+ * The service description the loop name
*/
public void startLog(Exchange exchange, String serviceDesc) {
util.entering(request, serviceDesc);
- exchange.getIn().setHeader(ONAPLogConstants.Headers.REQUEST_ID,
- util.getProperties(ONAPLogConstants.MDCs.REQUEST_ID));
- exchange.getIn().setHeader(ONAPLogConstants.Headers.INVOCATION_ID,
+ exchange.setProperty(ONAPLogConstants.Headers.REQUEST_ID, util.getProperties(ONAPLogConstants.MDCs.REQUEST_ID));
+ exchange.setProperty(ONAPLogConstants.Headers.INVOCATION_ID,
util.getProperties(ONAPLogConstants.MDCs.INVOCATION_ID));
- exchange.getIn().setHeader(ONAPLogConstants.Headers.PARTNER_NAME,
+ exchange.setProperty(ONAPLogConstants.Headers.PARTNER_NAME,
util.getProperties(ONAPLogConstants.MDCs.PARTNER_NAME));
}
@@ -69,18 +68,17 @@ public class FlowLogOperation {
* Generate the exiting log.
*/
public void endLog() {
- util.exiting(HttpStatus.OK.toString(), "Successful", Level.INFO,
- ONAPLogConstants.ResponseStatus.COMPLETED);
+ util.exiting(HttpStatus.OK.toString(), "Successful", Level.INFO, ONAPLogConstants.ResponseStatus.COMPLETED);
}
/**
* Generate the error exiting log.
*/
public void errorLog() {
- util.exiting(HttpStatus.INTERNAL_SERVER_ERROR.toString(), "Failed",
- Level.INFO, ONAPLogConstants.ResponseStatus.ERROR);
+ util.exiting(HttpStatus.INTERNAL_SERVER_ERROR.toString(), "Failed", Level.INFO,
+ ONAPLogConstants.ResponseStatus.ERROR);
}
-
+
/**
* Generate the error exiting log.
*/
diff --git a/src/main/resources/application-noaaf.properties b/src/main/resources/application-noaaf.properties
index 56ad7e846..736d1fa1f 100644
--- a/src/main/resources/application-noaaf.properties
+++ b/src/main/resources/application-noaaf.properties
@@ -135,7 +135,7 @@ clamp.config.dcae.deployment.template=classpath:/clds/templates/dcae-deployment-
#
#
# Configuration Settings for Policy Engine Components
-clamp.config.policy.url=http://policy.api.simpledemo.onap.org:8081
+clamp.config.policy.url=http4://policy.api.simpledemo.onap.org:8081
clamp.config.policy.userName=test
clamp.config.policy.password=test
clamp.config.policy.pdpUrl1=http://policy.api.simpledemo.onap.org:8081/pdp/ , testpdp, alpha123
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 640120230..cf85f8869 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -150,7 +150,7 @@ clamp.config.dcae.deployment.template=classpath:/clds/templates/dcae-deployment-
#
#
# Configuration Settings for Policy Engine Components
-clamp.config.policy.url=http://policy.api.simpledemo.onap.org:8081
+clamp.config.policy.url=http4://policy.api.simpledemo.onap.org:8081
clamp.config.policy.userName=test
clamp.config.policy.password=test
clamp.config.policy.pdpUrl1=http://policy.api.simpledemo.onap.org:8081/pdp/ , testpdp, alpha123
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 6bd1132cc..bc1a07feb 100644
--- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml
+++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml
@@ -5,8 +5,9 @@
outType="java.lang.String[]"
produces="application/json">
<route>
- <doTry>
- <to
+ <removeHeaders pattern="*"/>
+ <doTry>
+ <to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get All ClosedLoop')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
@@ -14,14 +15,15 @@
uri="bean:org.onap.clamp.loop.LoopController?method=getLoopNames()" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- </doCatch>
- </doTry>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ </doCatch>
+ </doTry>
</route>
</get>
<get
@@ -29,8 +31,9 @@
outType="org.onap.clamp.loop.Loop"
produces="application/json">
<route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
<doTry>
- <to
+ <to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get Closed Loop')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
@@ -38,14 +41,15 @@
uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- </doCatch>
- </doTry>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ </doCatch>
+ </doTry>
</route>
</get>
<get
@@ -53,8 +57,9 @@
outType="java.lang.String"
produces="application/xml">
<route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
<doTry>
- <to
+ <to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get SVG Representation')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
@@ -62,14 +67,15 @@
uri="bean:org.onap.clamp.loop.LoopController?method=getSVGRepresentation(${header.loopName})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- </doCatch>
- </doTry>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ </doCatch>
+ </doTry>
</route>
</get>
@@ -80,8 +86,9 @@
outType="org.onap.clamp.loop.Loop"
produces="application/json">
<route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
<doTry>
- <to
+ <to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update the global properties')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
@@ -92,17 +99,18 @@
<to
uri="bean:org.onap.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${exchangeProperty[loopObject]})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- </doCatch>
- </doTry>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ </doCatch>
+ </doTry>
</route>
</post>
<post
@@ -112,8 +120,9 @@
outType="org.onap.clamp.loop.Loop"
produces="application/json">
<route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
<doTry>
- <to
+ <to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update operational policies')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
@@ -124,17 +133,18 @@
<to
uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational and Guard policies UPDATED','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational and Guard policies UPDATED','INFO',${exchangeProperty[loopObject]})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- </doCatch>
- </doTry>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ </doCatch>
+ </doTry>
</route>
</post>
<post
@@ -144,30 +154,32 @@
outType="org.onap.clamp.policy.microservice.MicroServicePolicy"
produces="application/json">
<route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
<doTry>
- <to
+ <to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update Microservice policies')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <setHeader headerName="MicroServicePolicyObject">
+ <setProperty propertyName="MicroServicePolicyObject">
<simple>${body}</simple>
- </setHeader>
+ </setProperty>
<to uri="direct:load-loop" />
<to
- uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${header.MicroServicePolicyObject})" />
+ uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${exchangeProperty[MicroServicePolicyObject]})" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${exchangeProperty[loopObject]})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- </doCatch>
- </doTry>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ </doCatch>
+ </doTry>
</route>
</post>
<put
@@ -175,8 +187,9 @@
outType="org.onap.clamp.loop.Loop"
produces="application/json">
<route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
<doTry>
- <to
+ <to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Deploy the closed loop')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
@@ -184,14 +197,15 @@
uri="bean:org.onap.clamp.operation.LoopOperation?method=deployLoop(*,${header.loopName})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- </doCatch>
- </doTry>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ </doCatch>
+ </doTry>
</route>
</put>
<put
@@ -199,8 +213,9 @@
outType="org.onap.clamp.loop.Loop"
produces="application/json">
<route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
<doTry>
- <to
+ <to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Undeploy the closed loop')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
@@ -208,14 +223,15 @@
uri="bean:org.onap.clamp.operation.LoopOperation?method=unDeployLoop(${header.loopName})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- </doCatch>
- </doTry>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ </doCatch>
+ </doTry>
</route>
</put>
<put
@@ -223,25 +239,27 @@
outType="org.onap.clamp.loop.Loop"
produces="application/json">
<route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
<doTry>
<log
loggingLevel="INFO"
message="Receive STOP request for loop: ${header.loopName}" />
- <to
+ <to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Stop the closed loop')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
<to uri="direct:load-loop" />
- <doTry>
+ <doTry>
<to uri="direct:remove-all-policy-from-active-pdp-group" />
<doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
- </doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ </doCatch>
</doTry>
@@ -249,19 +267,20 @@
loggingLevel="INFO"
message="STOP request successfully executed for loop: ${body}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${exchangeProperty[loopObject]})" />
<to
uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- </doCatch>
- </doTry>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ </doCatch>
+ </doTry>
</route>
</put>
<put
@@ -269,44 +288,47 @@
outType="org.onap.clamp.loop.Loop"
produces="application/json">
<route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
<doTry>
<log
loggingLevel="INFO"
message="Receive START request for loop: ${header.loopName}" />
- <to
+ <to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Start the closed loop')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
<to uri="direct:load-loop" />
-
- <doTry>
+
+ <doTry>
<to uri="direct:add-all-to-active-pdp-group" />
<doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
- </doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ </doCatch>
</doTry>
<log
loggingLevel="INFO"
message="START request successfully executed for loop: ${body}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('START request successfully executed','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('START request successfully executed','INFO',${exchangeProperty[loopObject]})" />
<to
uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- </doCatch>
- </doTry>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ </doCatch>
+ </doTry>
</route>
</put>
<put
@@ -314,280 +336,295 @@
outType="org.onap.clamp.loop.Loop"
produces="application/json">
<route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
<doTry>
<log
loggingLevel="INFO"
message="Receive SUBMIT request for loop: ${header.loopName}" />
- <to
- uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Submit the closed loop')" />
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Submit the closed loop')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
<to uri="direct:load-loop" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive SUBMIT request','INFO',${header.LoopObject})" />
- <setHeader headerName="RaiseHttpExceptionFlag">
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive SUBMIT request','INFO',${exchangeProperty[loopObject]})" />
+ <setProperty propertyName="raiseHttpExceptionFlag">
<simple resultType="java.lang.Boolean">false</simple>
- </setHeader>
-
- <doTry>
+ </setProperty>
+
+ <doTry>
<to uri="direct:remove-all-policy-from-active-pdp-group" />
<doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
- </doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ </doCatch>
</doTry>
<log
loggingLevel="INFO"
- message="Processing all MICRO-SERVICES policies defined in loop ${header.LoopObject.getName()}" />
+ message="Processing all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}" />
<split>
- <simple>${header.LoopObject.getMicroServicePolicies()}
+ <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
</simple>
- <setHeader headerName="microServicePolicy">
+ <setProperty propertyName="microServicePolicy">
<simple>${body}</simple>
- </setHeader>
+ </setProperty>
<log
loggingLevel="INFO"
- message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" />
- <setHeader headerName="RaiseHttpExceptionFlag">
+ message="Processing Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" />
+ <setProperty propertyName="raiseHttpExceptionFlag">
<simple resultType="java.lang.Boolean">false</simple>
- </setHeader>
+ </setProperty>
- <doTry>
+ <doTry>
<to uri="direct:delete-micro-service-policy" />
<doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
- </doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ </doCatch>
</doTry>
- <doTry>
+ <doTry>
<to uri="direct:create-micro-service-policy" />
<doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
- </doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ </doCatch>
</doTry>
-
+
</split>
<log
loggingLevel="INFO"
- message="Processing all OPERATIONAL policies defined in loop ${header.LoopObject.getName()}" />
+ message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" />
<split>
- <simple>${header.LoopObject.getOperationalPolicies()}
+ <simple>${exchangeProperty[loopObject].getOperationalPolicies()}
</simple>
- <setHeader headerName="operationalPolicy">
+ <setProperty propertyName="operationalPolicy">
<simple>${body}</simple>
- </setHeader>
+ </setProperty>
<log
loggingLevel="INFO"
- message="Processing Operational Policy: ${header.operationalPolicy.getName()}" />
- <setHeader headerName="RaiseHttpExceptionFlag">
+ message="Processing Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" />
+ <setProperty propertyName="raiseHttpExceptionFlag">
<simple resultType="java.lang.Boolean">false</simple>
- </setHeader>
+ </setProperty>
- <doTry>
+ <doTry>
<to uri="direct:delete-operational-policy" />
<doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
- </doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ </doCatch>
</doTry>
- <doTry>
+ <doTry>
<to uri="direct:create-operational-policy" />
<doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
- </doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ </doCatch>
</doTry>
-
+
<log
loggingLevel="INFO"
- message="Processing all GUARD policies defined in loop ${header.LoopObject.getName()}" />
+ message="Processing all GUARD policies defined in loop ${exchangeProperty[loopObject].getName()}" />
<split>
- <simple>${header.operationalPolicy.createGuardPolicyPayloads().entrySet()}
+ <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()}
</simple>
- <setHeader headerName="guardPolicy">
+ <setProperty propertyName="guardPolicy">
<simple>${body}</simple>
- </setHeader>
+ </setProperty>
<log
loggingLevel="INFO"
- message="Processing Guard Policy: ${header.guardPolicy.getKey()}" />
+ message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" />
- <setHeader headerName="RaiseHttpExceptionFlag">
+ <setProperty propertyName="raiseHttpExceptionFlag">
<simple resultType="java.lang.Boolean">false</simple>
- </setHeader>
-
- <doTry>
+ </setProperty>
+
+ <doTry>
<to uri="direct:delete-guard-policy" />
<doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
- </doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ </doCatch>
</doTry>
- <doTry>
+ <doTry>
<to uri="direct:create-guard-policy" />
<doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
- </doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ </doCatch>
</doTry>
</split>
</split>
-
-
- <doTry>
+
+
+ <doTry>
<to uri="direct:add-all-to-active-pdp-group" />
<doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
- </doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ </doCatch>
</doTry>
-
+
<log
loggingLevel="INFO"
message="SUBMIT request successfully executed for loop: ${body}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${exchangeProperty[loopObject]})" />
<to
uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
<to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- </doCatch>
- </doTry>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ </doCatch>
+ </doTry>
</route>
</put>
<put uri="/v2/loop/delete/{loopName}">
<route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
<doTry>
<log
loggingLevel="INFO"
message="Receive DELETE request for loop: ${header.loopName}" />
- <to
+ <to
uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Delete the closed loop')" />
<to
uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
<to uri="direct:load-loop" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive DELETE request','INFO',${header.LoopObject})" />
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive DELETE request','INFO',${exchangeProperty[loopObject]})" />
- <doTry>
+ <doTry>
<to uri="direct:remove-all-policy-from-active-pdp-group" />
<doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
- </doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ </doCatch>
</doTry>
-
+
<split>
- <simple>${header.LoopObject.getMicroServicePolicies()}
+ <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
</simple>
- <setHeader headerName="microServicePolicy">
+ <setProperty propertyName="microServicePolicy">
<simple>${body}</simple>
- </setHeader>
+ </setProperty>
<log
loggingLevel="INFO"
- message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" />
+ message="Processing Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" />
- <doTry>
+ <doTry>
<to uri="direct:delete-micro-service-policy" />
<doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
- </doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ </doCatch>
</doTry>
</split>
<log
loggingLevel="INFO"
- message="Processing all OPERATIONAL policies defined in loop ${header.LoopObject.getName()}" />
+ message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" />
<split>
- <simple>${header.LoopObject.getOperationalPolicies()}
+ <simple>${exchangeProperty[loopObject].getOperationalPolicies()}
</simple>
- <setHeader headerName="operationalPolicy">
+ <setProperty propertyName="operationalPolicy">
<simple>${body}</simple>
- </setHeader>
+ </setProperty>
<log
loggingLevel="INFO"
- message="Processing Operational Policy: ${header.operationalPolicy.getName()}" />
-
- <doTry>
+ message="Processing Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" />
+
+ <doTry>
<to uri="direct:delete-operational-policy" />
<doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
- </doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ </doCatch>
</doTry>
<log
loggingLevel="INFO"
- message="Processing all GUARD policies defined in loop ${header.LoopObject.getName()}" />
+ message="Processing all GUARD policies defined in loop ${exchangeProperty[loopObject].getName()}" />
<split>
- <simple>${header.operationalPolicy.createGuardPolicyPayloads().entrySet()}
+ <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()}
</simple>
- <setHeader headerName="guardPolicy">
+ <setProperty propertyName="guardPolicy">
<simple>${body}</simple>
- </setHeader>
+ </setProperty>
<log
loggingLevel="INFO"
- message="Processing Guard Policy: ${header.guardPolicy.getKey()}" />
+ message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" />
- <doTry>
+ <doTry>
<to uri="direct:delete-guard-policy" />
<doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
- </doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
+ </doCatch>
</doTry>
</split>
@@ -598,17 +635,18 @@
loggingLevel="INFO"
message="DELETE request successfully executed for loop: ${body}" />
<to
- uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request successfully executed','INFO',${header.LoopObject})" />
+ 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>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- </doCatch>
- </doTry>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>false</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
+ </doCatch>
+ </doTry>
</route>
</put>
</rest>
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
diff --git a/src/main/resources/logback-default.xml b/src/main/resources/logback-default.xml
index 2eba127e9..bc8ebb909 100644
--- a/src/main/resources/logback-default.xml
+++ b/src/main/resources/logback-default.xml
@@ -1,66 +1,97 @@
<included>
<jmxConfigurator />
<!-- Example evaluator filter applied against console appender -->
-<property name="p_tim" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}"/>
- <property name="p_lvl" value="%level"/>
- <property name="p_log" value="%logger"/>
- <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}"/>
- <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/>
- <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/>
- <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/>
- <property name="p_thr" value="%thread"/>
- <property name="defaultPattern" value="%nopexception${p_tim}\t${p_thr}\t${p_lvl}\t${p_log}\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n"/>
- <property name="debugPattern" value="%nopexception${p_tim}|${p_lvl}|${p_mdc}|${p_exc}|%msg%n"/>
+ <property
+ name="p_tim"
+ value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}" />
+ <property
+ name="p_lvl"
+ value="%level" />
+ <property
+ name="p_log"
+ value="%logger" />
+ <property
+ name="p_mdc"
+ value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}" />
+ <property
+ name="p_msg"
+ value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}" />
+ <property
+ name="p_exc"
+ value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}" />
+ <property
+ name="p_mak"
+ value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}" />
+ <property
+ name="p_thr"
+ value="%thread" />
+ <property
+ name="defaultPattern"
+ value="%nopexception${p_tim}\t${p_thr}\t${p_lvl}\t${p_log}\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n" />
+ <property
+ name="debugPattern"
+ value="%nopexception${p_tim}|${p_lvl}|${p_mdc}|${p_exc}|%msg%n" />
- <!-- Example evaluator filter applied against console appender -->
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>INFO</level>
- </filter>
- <encoder>
- <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n</pattern>
- </encoder>
- </appender>
+ <!-- Example evaluator filter applied against console appender -->
+ <appender
+ name="STDOUT"
+ class="ch.qos.logback.core.ConsoleAppender">
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>INFO</level>
+ </filter>
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n
+ </pattern>
+ </encoder>
+ </appender>
- <appender name="ERROR"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>INFO</level>
- </filter>
- <file>${logDirectory}/error.log</file>
- <append>true</append>
- <encoder>
- <pattern>${defaultPattern}</pattern>
- </encoder>
- <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${outputDirectory}/clamp/error.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
- <maxFileSize>50MB</maxFileSize>
- <maxHistory>30</maxHistory>
- <totalSizeCap>10GB</totalSizeCap>
- </rollingPolicy>
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>10MB</maxFileSize>
- </triggeringPolicy>
- </appender>
+ <appender
+ name="ERROR"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>INFO</level>
+ </filter>
+ <file>${logDirectory}/error.log</file>
+ <append>true</append>
+ <encoder>
+ <pattern>${defaultPattern}</pattern>
+ </encoder>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${outputDirectory}/clamp/error.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>10MB</maxFileSize>
+ </triggeringPolicy>
+ </appender>
- <appender name="DEBUG"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDirectory}/debug.log</file>
- <append>true</append>
- <encoder>
- <pattern>${debugPattern}</pattern>
- </encoder>
- <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${outputDirectory}/clamp/debug.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
- <maxFileSize>50MB</maxFileSize>
- <maxHistory>30</maxHistory>
- <totalSizeCap>10GB</totalSizeCap>
- </rollingPolicy>
- </appender>
+ <appender
+ name="DEBUG"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/debug.log</file>
+ <append>true</append>
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n
+ </pattern>
+ </encoder>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${outputDirectory}/clamp/debug.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
+ </rollingPolicy>
+ </appender>
- <appender name="AUDIT"
+ <appender
+ name="AUDIT"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logDirectory}/audit.log</file>
<append>true</append>
@@ -79,13 +110,15 @@
<maxFileSize>10MB</maxFileSize>
</triggeringPolicy>
</appender>
- <appender name="asyncEELFAudit"
+ <appender
+ name="asyncEELFAudit"
class="ch.qos.logback.classic.AsyncAppender">
<queueSize>256</queueSize>
<appender-ref ref="AUDIT" />
</appender>
- <appender name="METRIC"
+ <appender
+ name="METRIC"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logDirectory}/metric.log</file>
<append>true</append>
@@ -104,14 +137,16 @@
<maxFileSize>10MB</maxFileSize>
</triggeringPolicy>
</appender>
- <appender name="asyncEELFMetrics"
+ <appender
+ name="asyncEELFMetrics"
class="ch.qos.logback.classic.AsyncAppender">
<queueSize>256</queueSize>
<appender-ref ref="METRIC" />
</appender>
<!-- SECURITY related loggers -->
- <appender name="SECURITY"
+ <appender
+ name="SECURITY"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logDirectory}/security.log</file>
<append>true</append>
@@ -130,55 +165,15 @@
<maxFileSize>10MB</maxFileSize>
</triggeringPolicy>
</appender>
- <appender name="asyncEELFSecurity"
+ <appender
+ name="asyncEELFSecurity"
class="ch.qos.logback.classic.AsyncAppender">
<queueSize>256</queueSize>
<appender-ref ref="SECURITY" />
</appender>
- <!-- AAF related loggers -->
- <logger name="org.onap.aaf" level="INFO" additivity="true">
- <appender-ref ref="DEBUG" />
- </logger>
- <logger name="org.apache.catalina.core" level="INFO"
- additivity="true">
- <appender-ref ref="DEBUG" />
- </logger>
- <!-- CLDS related loggers -->
- <logger name="org.onap.clamp" level="INFO"
- additivity="true">
- <appender-ref ref="ERROR" />
- </logger>
-
- <!-- CLDS related loggers -->
- <logger name="com.att.eelf.error" level="OFF" additivity="true">
- <appender-ref ref="ERROR" />
- </logger>
- <!-- EELF related loggers -->
- <logger name="com.att.eelf.audit" level="INFO"
- additivity="false">
- <appender-ref ref="asyncEELFAudit" />
- </logger>
- <logger name="com.att.eelf.metrics" level="DEBUG"
- additivity="false">
- <appender-ref ref="asyncEELFMetrics" />
- </logger>
- <logger name="com.att.eelf.security" level="DEBUG"
- additivity="false">
- <appender-ref ref="asyncEELFSecurity" />
- </logger>
-
- <!-- Spring related loggers -->
- <logger name="org.springframework" level="DEBUG" />
-
- <!-- Other Loggers that may help troubleshoot -->
- <logger name="org.apache" level="DEBUG" />
-
- <!-- logback internals logging -->
- <logger name="ch.qos.logback.classic" level="INFO" />
- <logger name="ch.qos.logback.core" level="INFO" />
-
<!-- logback jms appenders & loggers definition starts here -->
- <appender name="auditLogs"
+ <appender
+ name="auditLogs"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
</filter>
@@ -198,7 +193,8 @@
<pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
</encoder>
</appender>
- <appender name="perfLogs"
+ <appender
+ name="perfLogs"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
</filter>
@@ -218,14 +214,81 @@
<pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
</encoder>
</appender>
- <logger name="AuditRecord" level="INFO" additivity="FALSE">
+
+ <logger
+ name="org.onap.aaf"
+ level="DEBUG">
+ <appender-ref ref="DEBUG" />
+ </logger>
+ <logger
+ name="org.apache"
+ level="DEBUG">
+ <appender-ref ref="DEBUG" />
+ </logger>
+ <!-- Spring related loggers -->
+ <logger
+ name="org.springframework"
+ level="DEBUG">
+ <appender-ref ref="DEBUG" />
+ </logger>
+
+ <!-- CLDS related loggers -->
+ <logger
+ name="org.onap.clamp"
+ level="DEBUG">
+ <appender-ref ref="ERROR" />
+ <appender-ref ref="DEBUG" />
+ </logger>
+
+ <!-- CLDS related loggers -->
+ <logger
+ name="com.att.eelf.error"
+ level="OFF">
+ <appender-ref ref="ERROR" />
+ </logger>
+ <!-- EELF related loggers -->
+ <logger
+ name="com.att.eelf.audit"
+ level="INFO"
+ additivity="false">
+ <appender-ref ref="asyncEELFAudit" />
+ </logger>
+ <logger
+ name="com.att.eelf.metrics"
+ level="DEBUG"
+ additivity="false">
+ <appender-ref ref="asyncEELFMetrics" />
+ </logger>
+ <logger
+ name="com.att.eelf.security"
+ level="DEBUG"
+ additivity="false">
+ <appender-ref ref="asyncEELFSecurity" />
+ </logger>
+
+ <!-- logback internals logging -->
+ <logger
+ name="ch.qos.logback.classic"
+ level="INFO" />
+ <logger
+ name="ch.qos.logback.core"
+ level="INFO" />
+ <logger
+ name="AuditRecord"
+ level="INFO"
+ additivity="false">
<appender-ref ref="auditLogs" />
</logger>
- <logger name="AuditRecord_DirectCall" level="INFO"
- additivity="FALSE">
+ <logger
+ name="AuditRecord_DirectCall"
+ level="INFO"
+ additivity="false">
<appender-ref ref="auditLogs" />
</logger>
- <logger name="PerfTrackerRecord" level="INFO" additivity="FALSE">
+ <logger
+ name="PerfTrackerRecord"
+ level="INFO"
+ additivity="false">
<appender-ref ref="perfLogs" />
</logger>
<!-- logback jms appenders & loggers definition ends here -->
diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties
index 9f711e3e9..26e0b3b9d 100644
--- a/src/test/resources/application.properties
+++ b/src/test/resources/application.properties
@@ -141,7 +141,7 @@ clamp.config.dcae.deployment.template=classpath:/clds/templates/dcae-deployment-
#
#
# Configuration Settings for Policy Engine Components
-clamp.config.policy.url=http://localhost:${docker.http-cache.port.host}
+clamp.config.policy.url=http4://localhost:${docker.http-cache.port.host}
clamp.config.policy.userName=test
clamp.config.policy.password=test
clamp.config.policy.pdpUrl1=http://localhost:${docker.http-cache.port.host}/pdp/ , testpdp, alpha123