X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fnetconf-topology-singleton%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Ftopology%2Fsingleton%2Fimpl%2Futils%2FNetconfTopologyUtils.java;h=0968ddbebd4ec86b57c072341afcb9ca072ca099;hb=f273cff9baab6d3bd6a93214b639ecab7061e242;hp=5114faecd2ee25c035698f26a53240efd5728f14;hpb=9800d265b6e0747d1295a2fa0bd2b42527b58359;p=netconf.git diff --git a/netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/utils/NetconfTopologyUtils.java b/netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/utils/NetconfTopologyUtils.java index 5114faecd2..0968ddbebd 100644 --- a/netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/utils/NetconfTopologyUtils.java +++ b/netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/utils/NetconfTopologyUtils.java @@ -8,8 +8,6 @@ package org.opendaylight.netconf.topology.singleton.impl.utils; -import akka.cluster.Member; -import akka.util.Timeout; import java.io.File; import java.math.BigDecimal; import java.net.InetSocketAddress; @@ -31,14 +29,11 @@ import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceFilter; import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource; import org.opendaylight.yangtools.yang.model.repo.util.FilesystemSchemaSourceCache; import org.opendaylight.yangtools.yang.parser.repo.SharedSchemaRepository; -import scala.concurrent.duration.Duration; public class NetconfTopologyUtils { private static final String DEFAULT_SCHEMA_REPOSITORY_NAME = "sal-netconf-connector"; - public static final Timeout TIMEOUT = new Timeout(Duration.create(10, "seconds")); - public static final long DEFAULT_REQUEST_TIMEOUT_MILLIS = 60000L; public static final int DEFAULT_KEEPALIVE_DELAY = 0; public static final boolean DEFAULT_RECONNECT_ON_CHANGED_SCHEMA = false; @@ -75,18 +70,18 @@ public class NetconfTopologyUtils { DEFAULT_SCHEMA_REPOSITORY.createSchemaContextFactory(SchemaSourceFilter.ALWAYS_ACCEPT); public static RemoteDeviceId createRemoteDeviceId(final NodeId nodeId, final NetconfNode node) { - IpAddress ipAddress = node.getHost().getIpAddress(); - InetSocketAddress address = new InetSocketAddress(ipAddress.getIpv4Address() != null + final IpAddress ipAddress = node.getHost().getIpAddress(); + final InetSocketAddress address = new InetSocketAddress(ipAddress.getIpv4Address() != null ? ipAddress.getIpv4Address().getValue() : ipAddress.getIpv6Address().getValue(), node.getPort().getValue()); return new RemoteDeviceId(nodeId.getValue(), address); } - public static String createActorPath(String masterMember, String name) { + public static String createActorPath(final String masterMember, final String name) { return masterMember + "/user/" + name; } - public static String createMasterActorName(String name, String masterAddress) { + public static String createMasterActorName(final String name, final String masterAddress) { return masterAddress.replaceAll("//", "") + "_" + name; }