Add blueprint wiring for netconf-console
[netconf.git] / netconf / netconf-console / src / main / java / org / opendaylight / netconf / console / commands / NetconfDisconnectDeviceCommand.java
index efba6b62a3988773651a0be84e202be54150d932..20f1234ac90dc9af0ebf30353370d5916d695648 100644 (file)
@@ -8,13 +8,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.opendaylight.netconf.console.api.NetconfCommands;
 
-import com.google.common.base.Strings;
-
 @Command(name = "netconf:disconnect-device", scope = "netconf", description = "Disconnect netconf device.")
 public class NetconfDisconnectDeviceCommand extends AbstractAction {
 
@@ -24,12 +24,21 @@ public class NetconfDisconnectDeviceCommand extends AbstractAction {
         this.service = service;
     }
 
+    @VisibleForTesting
+    NetconfDisconnectDeviceCommand(final NetconfCommands service, final String deviceId, final String deviceIp,
+                                   final String devicePort) {
+        this.service = service;
+        this.deviceId = deviceId;
+        this.deviceIp = deviceIp;
+        this.devicePort = devicePort;
+    }
+
     @Option(name = "-i",
             aliases = { "--ipaddress" },
             description = "IP address of the netconf device",
             required = false,
             multiValued = false)
-    private String deviceIp = "";
+    private String deviceIp;
 
     @Option(name = "-p",
             aliases = { "--port" },
@@ -43,7 +52,7 @@ public class NetconfDisconnectDeviceCommand extends AbstractAction {
             description = "Node Identifier of the netconf device",
             required = false,
             multiValued = false)
-    private String deviceId = "";
+    private String deviceId;
 
     @Override
     protected Object doExecute() throws Exception {