Code Review
/
netconf.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Update MRI projects for Aluminium
[netconf.git]
/
netconf
/
callhome-provider
/
src
/
main
/
java
/
org
/
opendaylight
/
netconf
/
callhome
/
mount
/
IetfZeroTouchCallHomeServerProvider.java
diff --git
a/netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/IetfZeroTouchCallHomeServerProvider.java
b/netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/IetfZeroTouchCallHomeServerProvider.java
index c1bdc628d5ee6d597a9d3168cb409cfc146b82f5..eb20f0c483d99900067e5659c81015ded4274d3c 100644
(file)
--- a/
netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/IetfZeroTouchCallHomeServerProvider.java
+++ b/
netconf/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/IetfZeroTouchCallHomeServerProvider.java
@@
-17,7
+17,6
@@
import java.net.InetSocketAddress;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
-import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ExecutionException;
@@
-201,9
+200,9
@@
public class IetfZeroTouchCallHomeServerProvider implements AutoCloseable, DataT
}, MoreExecutors.directExecutor());
}
}, MoreExecutors.directExecutor());
}
- private static
List
<Device> getReadDevices(final ListenableFuture<Optional<AllowedDevices>> devicesFuture)
+ private static
Collection
<Device> getReadDevices(final ListenableFuture<Optional<AllowedDevices>> devicesFuture)
throws InterruptedException, ExecutionException {
throws InterruptedException, ExecutionException {
- return devicesFuture.get().map(AllowedDevices::
getDevice).orElse(Collections.emptyList()
);
+ return devicesFuture.get().map(AllowedDevices::
nonnullDevice).orElse(Collections.emptyMap()).values(
);
}
private void readAndUpdateStatus(final Device cfgDevice) throws InterruptedException, ExecutionException {
}
private void readAndUpdateStatus(final Device cfgDevice) throws InterruptedException, ExecutionException {
@@
-222,7
+221,7
@@
public class IetfZeroTouchCallHomeServerProvider implements AutoCloseable, DataT
}
tx.merge(LogicalDatastoreType.OPERATIONAL, deviceIID, new DeviceBuilder()
}
tx.merge(LogicalDatastoreType.OPERATIONAL, deviceIID, new DeviceBuilder()
- .addAugmentation(
Device1.class,
devStatus).setSshHostKey(cfgDevice.getSshHostKey())
+ .addAugmentation(devStatus).setSshHostKey(cfgDevice.getSshHostKey())
.setUniqueId(cfgDevice.getUniqueId()).build());
tx.commit().addCallback(new FutureCallback<CommitInfo>() {
@Override
.setUniqueId(cfgDevice.getUniqueId()).build());
tx.commit().addCallback(new FutureCallback<CommitInfo>() {
@Override