aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources/clds/camel/routes/policy-flows.xml
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2019-08-23 07:45:27 -0700
committersebdet <sebastien.determe@intl.att.com>2019-08-23 08:35:15 -0700
commit3142c70fb7530c444c891674fe55c6a9b236dfb3 (patch)
tree807ba054b1fea1af52cdc3bc45b4baa2ea9134a7 /src/main/resources/clds/camel/routes/policy-flows.xml
parent5e2b077e496ca28e9f91fc12cecb872228c81816 (diff)
Fix the log status
Fix the way the code (camel) computes the global loop state + introduce level in component state for that Issue-ID: CLAMP-384 Change-Id: I83a9306eabacfc1f118df6b828e521ee59d19b5f Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/main/resources/clds/camel/routes/policy-flows.xml')
-rw-r--r--src/main/resources/clds/camel/routes/policy-flows.xml31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main/resources/clds/camel/routes/policy-flows.xml b/src/main/resources/clds/camel/routes/policy-flows.xml
index 5d586154..b6f30c37 100644
--- a/src/main/resources/clds/camel/routes/policy-flows.xml
+++ b/src/main/resources/clds/camel/routes/policy-flows.xml
@@ -1,5 +1,36 @@
<routes xmlns="http://camel.apache.org/schema/spring">
+ <route id="verify-one-policy">
+ <from uri="direct:verify-one-policy" />
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setProperty>
+ <to uri="direct:get-policy" />
+ <when>
+ <simple> ${header.CamelHttpResponseCode} != 200 </simple>
+ <setProperty propertyName="policyFound">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setProperty>
+ <log loggingLevel="WARN"
+ message="At least one policy has not been found on policy engine: ${exchangeProperty[policyName]}" />
+ </when>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setProperty>
+ <to uri="direct:get-deployment-policy" />
+ <when>
+ <simple> ${header.CamelHttpResponseCode} != 200 </simple>
+ <setProperty propertyName="policyDeployed">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setProperty>
+ <log loggingLevel="WARN"
+ message="At least one policy has not been deployed on policy engine: ${exchangeProperty[policyName]}" />
+ </when>
+ <setProperty propertyName="newPolicyState">
+ <simple>${exchangeProperty[policyComponent].computeState(*)}</simple>
+ </setProperty>
+ </route>
+
<route id="get-policy">
<from uri="direct:get-policy" />
<doTry>