summaryrefslogtreecommitdiffstats
path: root/src/main/resources/clds/camel/routes
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2019-08-23 08:31:36 -0700
committerSébastien Determe <sebastien.determe@intl.att.com>2019-08-24 15:32:55 +0000
commit3f5a8564f29f0284377688f9d3c288baf475d57a (patch)
treee8be84d564f49722bf99b8f90e7399880f407730 /src/main/resources/clds/camel/routes
parentb65f1215e7dfab5630c0e2c1da8afec4cd08173f (diff)
Fix the policy version
Change the code so that it create right queries as policy engine expects, for the get Policy the version must be an integer for legacy interface Issue-ID: CLAMP-384 Change-Id: I1839ae65bdda1752de6cdc08a95590d14647aeb9 Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/main/resources/clds/camel/routes')
-rw-r--r--src/main/resources/clds/camel/routes/loop-flows.xml9
-rw-r--r--src/main/resources/clds/camel/routes/policy-flows.xml4
2 files changed, 11 insertions, 2 deletions
diff --git a/src/main/resources/clds/camel/routes/loop-flows.xml b/src/main/resources/clds/camel/routes/loop-flows.xml
index 922d5f16..036e8efc 100644
--- a/src/main/resources/clds/camel/routes/loop-flows.xml
+++ b/src/main/resources/clds/camel/routes/loop-flows.xml
@@ -41,6 +41,9 @@
<setProperty propertyName="policyType">
<simple>${body.getModelType()}</simple>
</setProperty>
+ <setProperty propertyName="policyVersion">
+ <simple>1.0.0</simple>
+ </setProperty>
<setBody>
<constant>null</constant>
</setBody>
@@ -59,6 +62,9 @@
<setProperty propertyName="policyType">
<simple>onap.policies.controlloop.Operational</simple>
</setProperty>
+ <setProperty propertyName="policyVersion">
+ <simple>1</simple>
+ </setProperty>
<setProperty propertyName="operationalPolicy">
<simple>${body}</simple>
</setProperty>
@@ -79,6 +85,9 @@
<setProperty propertyName="policyType">
<simple>onap.policies.controlloop.Guard</simple>
</setProperty>
+ <setProperty propertyName="policyVersion">
+ <simple>1</simple>
+ </setProperty>
<setBody>
<constant>null</constant>
</setBody>
diff --git a/src/main/resources/clds/camel/routes/policy-flows.xml b/src/main/resources/clds/camel/routes/policy-flows.xml
index b6f30c37..75ac66c6 100644
--- a/src/main/resources/clds/camel/routes/policy-flows.xml
+++ b/src/main/resources/clds/camel/routes/policy-flows.xml
@@ -54,9 +54,9 @@
</simple>
</setHeader>
<log loggingLevel="INFO"
- message="Endpoint to get policy: {{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policyType]}/versions/1.0.0/policies/${exchangeProperty[policyName]}/versions/1.0.0"></log>
+ message="Endpoint to get policy: {{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policyType]}/versions/1.0.0/policies/${exchangeProperty[policyName]}/versions/${exchangeProperty[policyVersion]}"></log>
<toD
- uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policyType]}/versions/1.0.0/policies/${exchangeProperty[policyName]}/versions/1.0.0?bridgeEndpoint=true&amp;useSystemProperties=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authMethod=Basic&amp;authUsername={{clamp.config.policy.api.userName}}&amp;authPassword={{clamp.config.policy.api.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=20000&amp;authenticationPreemptive=true&amp;connectionClose=true" />
+ uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policyType]}/versions/1.0.0/policies/${exchangeProperty[policyName]}/versions/${exchangeProperty[policyVersion]}?bridgeEndpoint=true&amp;useSystemProperties=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authMethod=Basic&amp;authUsername={{clamp.config.policy.api.userName}}&amp;authPassword={{clamp.config.policy.api.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=20000&amp;authenticationPreemptive=true&amp;connectionClose=true" />
<doFinally>
<to uri="direct:reset-raise-http-exception-flag" />
<to