2 * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.xsql;
11 import org.apache.karaf.shell.commands.Argument;
12 import org.apache.karaf.shell.commands.Command;
13 import org.apache.karaf.shell.commands.Option;
14 import org.apache.karaf.shell.console.OsgiCommandSupport;
15 import org.opendaylight.controller.md.sal.dom.xsql.XSQLAdapter;
17 @Command(scope = "odl", name = "xsql", description = "XSQL Karaf Command")
18 public class xsql extends OsgiCommandSupport {
20 @Option(name = "-o", aliases = { "--option" }, description = "An option to the command", required = false, multiValued = false)
21 private String option;
23 @Argument(name = "argument", description = "Argument to the command", required = false, multiValued = false)
24 private String argument;
26 protected Object doExecute() throws Exception {
28 System.out.println("Nothing to do..., please specify a command.");
31 XSQLAdapter.getInstance().processCommand(new StringBuffer(argument),