Migrate shell components to new APIs
[netconf.git] / netconf / netconf-console / src / main / java / org / opendaylight / netconf / console / commands / NetconfDisconnectDeviceCommand.java
index ccb9c41bd6c0cb26863d80d2f5bf71a33f225986..b9bf10bb6d365b8004725c30b345ee0efec1841f 100644 (file)
@@ -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);