summaryrefslogtreecommitdiffstats
path: root/src/main/resources/clds/camel/rest/clds-services.xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/clds/camel/rest/clds-services.xml')
-rw-r--r--src/main/resources/clds/camel/rest/clds-services.xml24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/main/resources/clds/camel/rest/clds-services.xml b/src/main/resources/clds/camel/rest/clds-services.xml
new file mode 100644
index 000000000..ce52f31d6
--- /dev/null
+++ b/src/main/resources/clds/camel/rest/clds-services.xml
@@ -0,0 +1,24 @@
+<rests xmlns="http://camel.apache.org/schema/spring">
+ <rest>
+ <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.authorization.UserService?method=getUser()" />
+ </get>
+ </rest>
+</rests>