Add CLI bundle to the startup archetype
[controller.git] / opendaylight / archetypes / opendaylight-startup / src / main / resources / archetype-resources / cli / src / main / resources / org / opendaylight / blueprint / cli-blueprint.xml
diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/cli/src/main/resources/org/opendaylight/blueprint/cli-blueprint.xml b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/cli/src/main/resources/org/opendaylight/blueprint/cli-blueprint.xml
new file mode 100644 (file)
index 0000000..5c3bd4d
--- /dev/null
@@ -0,0 +1,34 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright © ${copyrightYear} ${copyright} and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+  xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+  odl:use-default-for-reference-types="true">
+
+  <reference id="dataBroker"
+    interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
+    odl:type="default" />
+
+  <bean id="cliCommandsImpl" class="${package}.cli.impl.${classPrefix}CliCommandsImpl">
+    <argument ref="dataBroker" />
+  </bean>
+  <service ref="cliCommandsImpl" odl:type="default"
+    interface="${package}.cli.api.${classPrefix}CliCommands" />
+
+    <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.0.0">
+        <command name="test-command">
+            <action class="${package}.cli.commands.${classPrefix}CliTestCommand">
+                <argument ref="cliCommandsImpl"/>
+            </action>
+        </command>
+    </command-bundle>
+</blueprint>