Created
February 6, 2015 10:39
-
-
Save unicolet/42608c4cded7fe7d4252 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| starts first, then stops. All other routes start after this one has completed | |
| Same as: curl -XPUT http://localhost:9200/_template/opennms -d @elmapping.json | |
| --> | |
| <route id="elastisearchTemplateMapping" autoStartup="true" startupOrder="1"> | |
| <from uri="timer://runOnce?repeatCount=1&delay=0"/> | |
| <setHeader headerName="CamelHttpMethod"> | |
| <constant>PUT</constant> | |
| </setHeader> | |
| <setHeader headerName="CamelContentType"> | |
| <constant>application/x-www-form-urlencoded</constant> | |
| </setHeader> | |
| <setBody> | |
| <groovy>new File('elmapping.json').text</groovy> | |
| </setBody> | |
| <to uri="http:127.0.0.1:9200/_template/opennms"/> | |
| <log message="${body}"/> | |
| </route> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment