When we are failing a future, make sure to include the name of the node.
Change-Id: If721b9dcef4b9fca23d087db6be3b73897008575
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
@Override
public ListenableFuture<Empty> disconnectNode(final NodeId nodeId) {
- LOG.debug("Disconnecting RemoteDevice{{}}", nodeId.getValue());
+ final var nodeName = nodeId.getValue();
+ LOG.debug("Disconnecting RemoteDevice{{}}", nodeName);
final NetconfConnectorDTO connectorDTO = activeConnectors.remove(nodeId);
if (connectorDTO == null) {
return Futures.immediateFailedFuture(
- new IllegalStateException("Unable to disconnect device that is not connected"));
+ new IllegalStateException("Cannot disconnect " + nodeName + " as it is not connected"));
}
connectorDTO.close();