aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/resources/clds/camel/rest/clds-services.xml
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2019-10-08 17:53:08 +0200
committerSébastien Determe <sebastien.determe@intl.att.com>2019-10-08 16:41:30 +0000
commit74303b71e884cbaf6099031973d6c37e31c55bf3 (patch)
treec73a6112e2db01d7179a4803a6dd046dd4366f4a /src/test/resources/clds/camel/rest/clds-services.xml
parent0efeb6b141cb4abe84af8eb38e26d5ed1ab73bb0 (diff)
DCAE inventory calls in camel
Move the HTTP/HTTPS calls to camel so that there is no issue with the previous code that does not support the config required for HTTP4 Camel Issue-ID: CLAMP-532 Change-Id: I83db0da5bbe6906890d0d6aa9b529c264e5f9b20 Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/test/resources/clds/camel/rest/clds-services.xml')
-rw-r--r--src/test/resources/clds/camel/rest/clds-services.xml29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/test/resources/clds/camel/rest/clds-services.xml b/src/test/resources/clds/camel/rest/clds-services.xml
new file mode 100644
index 000000000..dd3a4bfdc
--- /dev/null
+++ b/src/test/resources/clds/camel/rest/clds-services.xml
@@ -0,0 +1,29 @@
+<rests xmlns="http://camel.apache.org/schema/spring">
+ <rest>
+ <get uri="/v1/clds/cldsInfo" outType="org.onap.clamp.clds.model.CldsInfo"
+ produces="application/json">
+ <to
+ uri="bean:org.onap.clamp.clds.service.CldsService?method=getCldsInfo()" />
+ </get>
+ <get uri="/v1/healthcheck" produces="application/json"
+ outType="org.onap.clamp.clds.model.CldsHealthCheck">
+ <route>
+ <setBody>
+ <method ref="org.onap.clamp.clds.service.CldsHealthcheckService"
+ method="gethealthcheck()" />
+ </setBody>
+ <when>
+ <simple> ${body} == 'NOT-OK'</simple>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>404</constant>
+ </setHeader>
+ <log loggingLevel="ERROR" message="HealthCheck failed" />
+ </when>
+ </route>
+ </get>
+
+ <get uri="/v1/user/getUser" produces="text/plain">
+ <to uri="bean:org.onap.clamp.clds.service.UserService?method=getUser()" />
+ </get>
+ </rest>
+</rests>