summaryrefslogtreecommitdiffstats
path: root/src/main/resources/clds
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2019-04-09 18:10:32 +0200
committersebdet <sebastien.determe@intl.att.com>2019-04-09 18:10:32 +0200
commiteb71d70552c827e1d8405862f73e8cbd827c6e48 (patch)
tree947b3c8d6bb26f6d966875e285beef883a1ba920 /src/main/resources/clds
parentfb35c3e3c80bd17308abfd34964e854ad9975342 (diff)
PDP Group support
Add support to push all policies to pdp group + log Issue-ID: CLAMP-303 Change-Id: Ie53b1dfd11ef8db9c2b5ccca0511e6f6343fb70a Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/main/resources/clds')
-rw-r--r--src/main/resources/clds/camel/rest/clamp-api-v2.xml11
-rw-r--r--src/main/resources/clds/camel/routes/flexible-flow.xml43
2 files changed, 45 insertions, 9 deletions
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 810c9d205..8a39f1358 100644
--- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml
+++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml
@@ -175,8 +175,17 @@
</setHeader>
<to uri="direct:create-guard-policy" />
</split>
-
</split>
+ <setHeader headerName="HttpQueryExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setHeader>
+ <to uri="direct:create-pdp-group-policy" />
+
+ <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})" />
</route>
</put>
<put uri="/v2/loop/delete/{loopName}">
diff --git a/src/main/resources/clds/camel/routes/flexible-flow.xml b/src/main/resources/clds/camel/routes/flexible-flow.xml
index 33419c219..64af7b264 100644
--- a/src/main/resources/clds/camel/routes/flexible-flow.xml
+++ b/src/main/resources/clds/camel/routes/flexible-flow.xml
@@ -113,7 +113,7 @@
<constant>application/json</constant>
</setHeader>
<setHeader headerName="CamelHttpUri">
- <simple>{{clamp.config.policy.url}}/policyTypes/${header.microServicePolicy.getModelType()}/versions/1.0.0/policies
+ <simple>{{clamp.config.policy.url}}/policy/api/v1/policyTypes/${header.microServicePolicy.getModelType()}/versions/1.0.0/policies
</simple>
</setHeader>
<log
@@ -136,7 +136,7 @@
<constant>DELETE</constant>
</setHeader>
<setHeader headerName="CamelHttpUri">
- <simple>{{clamp.config.policy.url}}/policyTypes/${header.microServicePolicy.getModelType()}/versions/1.0.0/policies/${header.microServicePolicy.getName()}
+ <simple>{{clamp.config.policy.url}}/policy/api/v1/policyTypes/${header.microServicePolicy.getModelType()}/versions/1.0.0/policies/${header.microServicePolicy.getName()}
</simple>
</setHeader>
<log
@@ -161,10 +161,10 @@
<constant>POST</constant>
</setHeader>
<setHeader headerName="Content-Type">
- <constant>application/json</constant>
+ <constant>application/yaml; legacy-version</constant>
</setHeader>
<setHeader headerName="CamelHttpUri">
- <simple>{{clamp.config.policy.url}}/policyTypes/onap.policies.controloop.operational/versions/1.0.0/policies
+ <simple>{{clamp.config.policy.url}}/policy/api/v1/policyTypes/onap.policies.controloop.operational/versions/1.0.0/policies
</simple>
</setHeader>
<log
@@ -187,7 +187,7 @@
<constant>DELETE</constant>
</setHeader>
<setHeader headerName="CamelHttpUri">
- <simple>{{clamp.config.policy.url}}/policyTypes/onap.policies.controloop.operational/versions/1.0.0/policies/${header.operationalPolicy.getName()}
+ <simple>{{clamp.config.policy.url}}/policy/api/v1/policyTypes/onap.policies.controloop.operational/versions/1.0.0/policies/${header.operationalPolicy.getName()}
</simple>
</setHeader>
<log
@@ -215,7 +215,7 @@
<constant>application/json</constant>
</setHeader>
<setHeader headerName="CamelHttpUri">
- <simple>{{clamp.config.policy.url}}/policyTypes/onap.policies.controlloop.Guard/versions/1.0.0/policies
+ <simple>{{clamp.config.policy.url}}/policy/api/v1/policyTypes/onap.policies.controlloop.Guard/versions/1.0.0/policies
</simple>
</setHeader>
<log
@@ -238,7 +238,7 @@
<constant>DELETE</constant>
</setHeader>
<setHeader headerName="CamelHttpUri">
- <simple>{{clamp.config.policy.url}}/policyTypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/${header.guardPolicy.getKey()}
+ <simple>{{clamp.config.policy.url}}/policy/api/v1/policyTypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/${header.guardPolicy.getKey()}
</simple>
</setHeader>
<log
@@ -249,5 +249,32 @@
<to
uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Guard policy deleted successfully','INFO',${header.LoopObject})" />
</route>
-
+
+ <route id="create-pdp-group-policy">
+ <from uri="direct:create-pdp-group-policy" />
+ <log
+ loggingLevel="INFO"
+ message="Creating PDP Group Policy: ${header.guardPolicy.getKey()}" />
+ <setBody>
+ <simple>${header.LoopObject.createPoliciesPayloadPdpGroup()}
+ </simple>
+ </setBody>
+ <setHeader headerName="CamelHttpMethod">
+ <constant>POST</constant>
+ </setHeader>
+ <setHeader headerName="Content-Type">
+ <constant>application/json</constant>
+ </setHeader>
+ <setHeader headerName="CamelHttpUri">
+ <simple>{{clamp.config.policy.url}}/policy/pap/v1/pdps
+ </simple>
+ </setHeader>
+ <log
+ loggingLevel="INFO"
+ message="Endpoint to create PDP Group policy: ${header.CamelHttpMethod} ${header.CamelHttpUri}"></log>
+ <toD
+ uri="http4://policyhost:8085?throwExceptionOnFailure=${header.HttpQueryExceptionFlag}" />
+ <to
+ uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Pdp Group created successfully','INFO',${header.LoopObject})" />
+ </route>
</routes> \ No newline at end of file