X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-ssh%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fosgi%2FNetconfSSHActivator.java;h=d2f6c8c81ce749a234d7ae2d433dad953e2e20c6;hp=6626f47b0375e4a7a0e503f78cd862ab647f2f62;hb=49bfc449558d0306f0b6550bc5bdf41e5cafca44;hpb=6bbe43e23f7f9f7d5373db577874d51636d4cea4 diff --git a/opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/netconf/osgi/NetconfSSHActivator.java b/opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/netconf/osgi/NetconfSSHActivator.java index 6626f47b03..d2f6c8c81c 100644 --- a/opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/netconf/osgi/NetconfSSHActivator.java +++ b/opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/netconf/osgi/NetconfSSHActivator.java @@ -37,10 +37,11 @@ public class NetconfSSHActivator implements BundleActivator{ logger.trace("Starting netconf SSH bridge."); Optional sshSocketAddressOptional = NetconfConfigUtil.extractSSHNetconfAddress(context); - Optional tcpSocketAddressOptional = NetconfConfigUtil.extractTCPNetconfAddress(context); + InetSocketAddress tcpSocketAddress = NetconfConfigUtil.extractTCPNetconfAddress(context, + "TCP is not configured, netconf ssh bridge is not available."); - if (sshSocketAddressOptional.isPresent() && tcpSocketAddressOptional.isPresent()){ - server = NetconfSSHServer.start(sshSocketAddressOptional.get().getPort(),tcpSocketAddressOptional.get()); + if (sshSocketAddressOptional.isPresent()){ + server = NetconfSSHServer.start(sshSocketAddressOptional.get().getPort(),tcpSocketAddress); Thread serverThread = new Thread(server,"netconf SSH server thread"); serverThread.setDaemon(true); serverThread.start();