X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fnetconf-console%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fconsole%2Fcommands%2FNetconfDisconnectDeviceCommand.java;fp=netconf%2Fnetconf-console%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fconsole%2Fcommands%2FNetconfDisconnectDeviceCommand.java;h=b9bf10bb6d365b8004725c30b345ee0efec1841f;hb=39481e39b40b93444c401e9aedddfc612640d543;hp=ccb9c41bd6c0cb26863d80d2f5bf71a33f225986;hpb=c79a111ef3ca5153f569bebfecb45fcf0ca3c7ec;p=netconf.git diff --git a/netconf/netconf-console/src/main/java/org/opendaylight/netconf/console/commands/NetconfDisconnectDeviceCommand.java b/netconf/netconf-console/src/main/java/org/opendaylight/netconf/console/commands/NetconfDisconnectDeviceCommand.java index ccb9c41bd6..b9bf10bb6d 100644 --- a/netconf/netconf-console/src/main/java/org/opendaylight/netconf/console/commands/NetconfDisconnectDeviceCommand.java +++ b/netconf/netconf-console/src/main/java/org/opendaylight/netconf/console/commands/NetconfDisconnectDeviceCommand.java @@ -10,13 +10,13 @@ package org.opendaylight.netconf.console.commands; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Strings; -import org.apache.karaf.shell.commands.Command; -import org.apache.karaf.shell.commands.Option; -import org.apache.karaf.shell.console.AbstractAction; +import org.apache.karaf.shell.api.action.Action; +import org.apache.karaf.shell.api.action.Command; +import org.apache.karaf.shell.api.action.Option; import org.opendaylight.netconf.console.api.NetconfCommands; @Command(name = "netconf:disconnect-device", scope = "netconf", description = "Disconnect netconf device.") -public class NetconfDisconnectDeviceCommand extends AbstractAction { +public class NetconfDisconnectDeviceCommand implements Action { protected final NetconfCommands service; @@ -55,7 +55,7 @@ public class NetconfDisconnectDeviceCommand extends AbstractAction { private String deviceId; @Override - protected Object doExecute() throws Exception { + public Object execute() { boolean status = false; if (!Strings.isNullOrEmpty(deviceId)) { status = service.disconnectDevice(deviceId);