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%2FRemoteDeviceConnectorImpl.java;h=acf3854a83c7289b3b9bd91ae56b1b2217043d16;hb=202b4d062c1064fc061009d5725b8a102fcc13c4;hp=57bd458bf514e1614ba6c2589f4d29b9aa384bd2;hpb=7d5a5e624a2acdf98565738a36248389907d1ab3;p=netconf.git diff --git a/netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/RemoteDeviceConnectorImpl.java b/netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/RemoteDeviceConnectorImpl.java index 57bd458bf5..acf3854a83 100644 --- a/netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/RemoteDeviceConnectorImpl.java +++ b/netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/RemoteDeviceConnectorImpl.java @@ -26,6 +26,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; import javax.annotation.Nullable; +import org.opendaylight.aaa.encrypt.AAAEncryptionService; import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService; import org.opendaylight.netconf.api.NetconfMessage; import org.opendaylight.netconf.client.NetconfClientSessionListener; @@ -80,7 +81,7 @@ public class RemoteDeviceConnectorImpl implements RemoteDeviceConnector { private final Timeout actorResponseWaitTime; private final String privateKeyPath; private final String privateKeyPassphrase; - + private final AAAEncryptionService encryptionService; private NetconfConnectorDTO deviceCommunicatorDTO; public RemoteDeviceConnectorImpl(final NetconfTopologySetup netconfTopologyDeviceSetup, @@ -93,6 +94,7 @@ public class RemoteDeviceConnectorImpl implements RemoteDeviceConnector { this.mountService = mountService; this.privateKeyPath = netconfTopologyDeviceSetup.getPrivateKeyPath(); this.privateKeyPassphrase = netconfTopologyDeviceSetup.getPrivateKeyPassphrase(); + this.encryptionService = netconfTopologyDeviceSetup.getEncryptionService(); } @Override @@ -285,7 +287,8 @@ public class RemoteDeviceConnectorImpl implements RemoteDeviceConnector { .node.credentials.credentials.LoginPassword) credentials).getUsername(), ((org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf .node.credentials.credentials.LoginPassword) credentials).getPassword(), - this.privateKeyPath, this.privateKeyPassphrase); + this.privateKeyPath, this.privateKeyPassphrase, encryptionService); + } else { throw new IllegalStateException(remoteDeviceId + ": Only login/password authentication is supported"); }