X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-testtool%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Ftest%2Ftool%2FNetconfDeviceSimulator.java;h=c6cad90355705961ca72e6cd64da36ff41780e14;hp=36e7dca76138095c6bca8796e778084bb5d074cb;hb=7f2ecd54dd3eb09af469a610fdd541b48ed95b80;hpb=594885b1c0800a4e9fb9588ac964b421a1906365 diff --git a/opendaylight/netconf/netconf-testtool/src/main/java/org/opendaylight/controller/netconf/test/tool/NetconfDeviceSimulator.java b/opendaylight/netconf/netconf-testtool/src/main/java/org/opendaylight/controller/netconf/test/tool/NetconfDeviceSimulator.java index 36e7dca761..c6cad90355 100644 --- a/opendaylight/netconf/netconf-testtool/src/main/java/org/opendaylight/controller/netconf/test/tool/NetconfDeviceSimulator.java +++ b/opendaylight/netconf/netconf-testtool/src/main/java/org/opendaylight/controller/netconf/test/tool/NetconfDeviceSimulator.java @@ -186,6 +186,10 @@ public class NetconfDeviceSimulator implements Closeable { final PEMGeneratorHostKeyProvider keyPairProvider = getPemGeneratorHostKeyProvider(); for (int i = 0; i < params.deviceCount; i++) { + if (currentPort > 65535) { + LOG.warn("Port cannot be greater than 65535, stopping further attempts."); + break; + } final InetSocketAddress address = getAddress(currentPort); final ChannelFuture server; @@ -246,6 +250,8 @@ public class NetconfDeviceSimulator implements Closeable { if(openDevices.size() == params.deviceCount) { LOG.info("All simulated devices started successfully from port {} to {}", params.startingPort, currentPort - 1); + } else if (openDevices.size() == 0) { + LOG.warn("No simulated devices started."); } else { LOG.warn("Not all simulated devices started successfully. Started devices ar on ports {}", openDevices); }