Fix callhome start problem 27/77227/2
authorLuis Gomez <ecelgp@gmail.com>
Tue, 23 Oct 2018 18:10:08 +0000 (11:10 -0700)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 24 Oct 2018 00:04:02 +0000 (02:04 +0200)
Make sure we align bootstrap class with the service factory.

Change-Id: I84baad3d7ab816ec67f50c8445c38e7f2433eae4
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
netconf/callhome-protocol/src/main/java/org/opendaylight/netconf/callhome/protocol/NetconfCallHomeServerBuilder.java
netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/IetfZeroTouchCallHomeServerProvider.java

index decb75968961db396cecac9736788a64fd4197d2..73d4c5b473538ad46a58aa4d6bcf7e5c40c7e066 100644 (file)
@@ -5,12 +5,11 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.netconf.callhome.protocol;
 
 import com.google.common.base.Optional;
+import io.netty.channel.DefaultEventLoopGroup;
 import io.netty.channel.EventLoopGroup;
-import io.netty.channel.local.LocalEventLoopGroup;
 import io.netty.util.HashedWheelTimer;
 import java.net.InetSocketAddress;
 import java.util.concurrent.TimeUnit;
@@ -117,7 +116,7 @@ public class NetconfCallHomeServerBuilder implements Builder<NetconfCallHomeServ
     }
 
     private static EventLoopGroup defaultNettyGroup() {
-        return new LocalEventLoopGroup();
+        return new DefaultEventLoopGroup();
     }
 
     private static InetSocketAddress defaultBindAddress() {
index 30a10cd5fa5e62b5a4bdc28ceccd426bd0dfb63c..8bb21ffa51b3582add48ef346dafd5ec00a5d70f 100644 (file)
@@ -11,6 +11,7 @@ package org.opendaylight.netconf.callhome.mount;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Optional;
 import com.google.common.util.concurrent.ListenableFuture;
+import io.netty.channel.nio.NioEventLoopGroup;
 import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.util.Collection;
@@ -106,6 +107,7 @@ public class IetfZeroTouchCallHomeServerProvider implements AutoCloseable, DataT
         if (port > 0) {
             builder.setBindAddress(new InetSocketAddress(port));
         }
+        builder.setNettyGroup(new NioEventLoopGroup());
         server = builder.build();
         server.bind();
         mountDispacher.createTopology();