diff options
Diffstat (limited to 'src/main/resources/clds/camel')
-rw-r--r-- | src/main/resources/clds/camel/rest/clamp-api-v2.xml | 2 | ||||
-rw-r--r-- | src/main/resources/clds/camel/rest/clds-services.xml | 26 |
2 files changed, 19 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 6ee44cade..cf99625ee 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -68,7 +68,7 @@ <to uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> <to - uri="bean:org.onap.clamp.loop.LoopController?method=getSVGRepresentation(${header.loopName})" /> + uri="bean:org.onap.clamp.loop.LoopController?method=getSvgRepresentation(${header.loopName})" /> <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> <doCatch> diff --git a/src/main/resources/clds/camel/rest/clds-services.xml b/src/main/resources/clds/camel/rest/clds-services.xml index b3061dc42..dd3a4bfdc 100644 --- a/src/main/resources/clds/camel/rest/clds-services.xml +++ b/src/main/resources/clds/camel/rest/clds-services.xml @@ -1,19 +1,29 @@ <rests xmlns="http://camel.apache.org/schema/spring"> - <rest > - <get uri="/v1/clds/cldsInfo" - outType="org.onap.clamp.clds.model.CldsInfo" + <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"> - <to - uri="bean:org.onap.clamp.clds.service.CldsHealthcheckService?method=gethealthcheck()" /> + <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()" /> + <to uri="bean:org.onap.clamp.clds.service.UserService?method=getUser()" /> </get> </rest> </rests> |