summaryrefslogtreecommitdiffstats
path: root/src/main/resources/clds/camel
diff options
context:
space:
mode:
authorSébastien Determe <sebastien.determe@intl.att.com>2020-03-09 09:22:24 +0000
committerGerrit Code Review <gerrit@onap.org>2020-03-09 09:22:24 +0000
commit5c3a825851bb1a345620c5c4951726c5b94a0341 (patch)
treea9df35d4aa1de7b46ddd18d4faa75d7a9bfcd7b2 /src/main/resources/clds/camel
parent5c6d23852ea949335eb7f85d787eb24ac6dbab2a (diff)
parent3121b5bee2e70b1f753f9988344d41f3132edf69 (diff)
Merge "CLAMP-CDS integration to display all CDS actions for blueprint in CL"
Diffstat (limited to 'src/main/resources/clds/camel')
-rw-r--r--src/main/resources/clds/camel/routes/cds-flows.xml46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/main/resources/clds/camel/routes/cds-flows.xml b/src/main/resources/clds/camel/routes/cds-flows.xml
new file mode 100644
index 00000000..5c10a0cd
--- /dev/null
+++ b/src/main/resources/clds/camel/routes/cds-flows.xml
@@ -0,0 +1,46 @@
+<routes xmlns="http://camel.apache.org/schema/spring">
+ <route id="get-blueprint-workflow-list">
+ <from uri="direct:get-blueprint-workflow-list"/>
+ <log loggingLevel="INFO"
+ message="Getting blueprint workflow list from CDS"/>
+ <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('CDS', 'Getting workflow list from CDS')"/>
+ <doTry>
+ <setHeader headerName="CamelHttpMethod">
+ <constant>GET</constant>
+ </setHeader>
+ <setHeader headerName="Content-Type">
+ <constant>application/json</constant>
+ </setHeader>
+ <log loggingLevel="INFO"
+ message="Endpoint to query workflows from CDS : {{clamp.config.cds.url}}/api/v1/blueprint-model/workflows/blueprint-name/${exchangeProperty[blueprintName]}/version/${exchangeProperty[blueprintVersion]}"></log>
+ <toD uri="{{clamp.config.cds.url}}/api/v1/blueprint-model/workflows/blueprint-name/${exchangeProperty[blueprintName]}/version/${exchangeProperty[blueprintVersion]}?bridgeEndpoint=true&amp;useSystemProperties=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authMethod=Basic&amp;authUsername={{clamp.config.cds.userName}}&amp;authPassword={{clamp.config.cds.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=30000&amp;authenticationPreemptive=true&amp;connectionClose=true"/>
+ <convertBodyTo type="java.lang.String"/>
+ <doFinally>
+ <to uri="direct:reset-raise-http-exception-flag"/>
+ <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()"/>
+ </doFinally>
+ </doTry>
+ </route>
+ <route id="get-blueprint-workflow-input-properties">
+ <from uri="direct:get-blueprint-workflow-input-properties"/>
+ <log loggingLevel="INFO"
+ message="Getting blueprint input properties for workflow"/>
+ <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('CDS', 'Getting input properties for workflow')"/>
+ <doTry>
+ <setHeader headerName="CamelHttpMethod">
+ <constant>POST</constant>
+ </setHeader>
+ <setHeader headerName="Content-Type">
+ <constant>application/json</constant>
+ </setHeader>
+ <log loggingLevel="INFO"
+ message="Endpoint to query input properties for workflow from CDS : {{clamp.config.cds.url}}/api/v1/blueprint-model/workflow-spec"></log>
+ <toD uri="{{clamp.config.cds.url}}/api/v1/blueprint-model/workflow-spec?bridgeEndpoint=true&amp;useSystemProperties=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authMethod=Basic&amp;authUsername={{clamp.config.cds.userName}}&amp;authPassword={{clamp.config.cds.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=30000&amp;authenticationPreemptive=true&amp;connectionClose=true"/>
+ <convertBodyTo type="java.lang.String"/>
+ <doFinally>
+ <to uri="direct:reset-raise-http-exception-flag"/>
+ <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()"/>
+ </doFinally>
+ </doTry>
+ </route>
+</routes> \ No newline at end of file