import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.login.pw.LoginPassword;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.login.pw.unencrypted.LoginPasswordUnencrypted;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
+import org.opendaylight.yangtools.yang.common.Decimal64;
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
import org.opendaylight.yangtools.yang.model.repo.spi.PotentialSchemaSource;
this.netconfTopologyDeviceSetup = requireNonNull(netconfTopologyDeviceSetup);
this.remoteDeviceId = remoteDeviceId;
this.deviceActionFactory = requireNonNull(deviceActionFactory);
- this.privateKeyPath = netconfTopologyDeviceSetup.getPrivateKeyPath();
- this.privateKeyPassphrase = netconfTopologyDeviceSetup.getPrivateKeyPassphrase();
- this.encryptionService = netconfTopologyDeviceSetup.getEncryptionService();
+ privateKeyPath = netconfTopologyDeviceSetup.getPrivateKeyPath();
+ privateKeyPassphrase = netconfTopologyDeviceSetup.getPrivateKeyPassphrase();
+ encryptionService = netconfTopologyDeviceSetup.getEncryptionService();
keystoreAdapter = new NetconfKeystoreAdapter(netconfTopologyDeviceSetup.getDataBroker());
}
requireNonNull(netconfNode.getHost());
requireNonNull(netconfNode.getPort());
- this.deviceCommunicatorDTO = createDeviceCommunicator(nodeId, netconfNode, deviceHandler);
+ deviceCommunicatorDTO = createDeviceCommunicator(nodeId, netconfNode, deviceHandler);
final NetconfDeviceCommunicator deviceCommunicator = deviceCommunicatorDTO.getCommunicator();
final NetconfClientSessionListener netconfClientSessionListener = deviceCommunicatorDTO.getSessionListener();
final NetconfReconnectingClientConfiguration clientConfig =
: node.getBetweenAttemptsTimeoutMillis().toJava();
final boolean isTcpOnly = node.getTcpOnly() == null
? NetconfTopologyUtils.DEFAULT_IS_TCP_ONLY : node.getTcpOnly();
- final BigDecimal sleepFactor = node.getSleepFactor() == null
+ final Decimal64 sleepFactor = node.getSleepFactor() == null
? NetconfTopologyUtils.DEFAULT_SLEEP_FACTOR : node.getSleepFactor();
final InetSocketAddress socketAddress = getSocketAddress(node.getHost(), node.getPort().getValue().toJava());
final ReconnectStrategyFactory sf =
- new TimedReconnectStrategyFactory(netconfTopologyDeviceSetup.getEventExecutor(), maxConnectionAttempts,
- betweenAttemptsTimeoutMillis, sleepFactor);
+ new TimedReconnectStrategyFactory(netconfTopologyDeviceSetup.getEventExecutor(), maxConnectionAttempts,
+ betweenAttemptsTimeoutMillis, BigDecimal.valueOf(sleepFactor.unscaledValue(), sleepFactor.scale()));
final NetconfReconnectingClientConfigurationBuilder reconnectingClientConfigurationBuilder;
private static List<Uri> getOdlHelloCapabilities(final NetconfNode node) {
final OdlHelloMessageCapabilities helloCapabilities = node.getOdlHelloMessageCapabilities();
- return helloCapabilities != null ? helloCapabilities.getCapability() : null;
+ return helloCapabilities != null ? List.copyOf(helloCapabilities.getCapability()) : null;
}
private AuthenticationHandler getHandlerFromCredentials(final Credentials credentials) {