aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources/clds/camel/routes/cds-flows.xml
blob: 5c10a0cd2132c6b4dc5d22763d9ccd50e34e1f66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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>