commit(tx, device.key());
}
- private static void commit(WriteTransaction tx, DeviceKey device) {
+ private static void commit(final WriteTransaction tx, final DeviceKey device) {
tx.commit().addCallback(new FutureCallback<CommitInfo>() {
@Override
- public void onSuccess(CommitInfo result) {
+ public void onSuccess(final CommitInfo result) {
LOG.debug("Device {} committed", device);
}
@Override
- public void onFailure(Throwable cause) {
+ public void onFailure(final Throwable cause) {
LOG.warn("Failed to commit device {}", device, cause);
}
}, MoreExecutors.directExecutor());
try {
return devicesFuture.get().orElse(null);
} catch (ExecutionException | InterruptedException e) {
- LOG.error("Error trying to read the whitelist devices: {}", e);
+ LOG.error("Error trying to read the whitelist devices", e);
return null;
}
}
readAndUpdateStatus(confDevice);
}
} catch (ExecutionException | InterruptedException e) {
- LOG.error("Error trying to read the whitelist devices: {}", e);
+ LOG.error("Error trying to read the whitelist devices", e);
}
}
opTx.commit().addCallback(new FutureCallback<CommitInfo>() {
@Override
- public void onSuccess(CommitInfo result) {
+ public void onSuccess(final CommitInfo result) {
LOG.debug("Device deletions committed");
}
@Override
- public void onFailure(Throwable cause) {
+ public void onFailure(final Throwable cause) {
LOG.warn("Failed to commit device deletions", cause);
}
}, MoreExecutors.directExecutor());
return devicesFuture.get().map(AllowedDevices::getDevice).orElse(Collections.emptyList());
}
- private void readAndUpdateStatus(Device cfgDevice) throws InterruptedException, ExecutionException {
+ private void readAndUpdateStatus(final Device cfgDevice) throws InterruptedException, ExecutionException {
InstanceIdentifier<Device> deviceIID = InstanceIdentifier.create(NetconfCallhomeServer.class)
.child(AllowedDevices.class).child(Device.class, new DeviceKey(cfgDevice.getUniqueId()));
.setUniqueId(cfgDevice.getUniqueId()).build());
tx.commit().addCallback(new FutureCallback<CommitInfo>() {
@Override
- public void onSuccess(CommitInfo result) {
+ public void onSuccess(final CommitInfo result) {
LOG.debug("Device {} status update committed", cfgDevice.key());
}
@Override
- public void onFailure(Throwable cause) {
+ public void onFailure(final Throwable cause) {
LOG.warn("Failed to commit device {} status update", cfgDevice.key(), cause);
}
}, MoreExecutors.directExecutor());
// We do not support actions in clustered topology yet
if (domActionService != null) {
LOG.warn("{}: YANG 1.1 actions are not supported in clustered netconf topology, "
- + "DOMActionService will not be exposed for the device");
+ + "DOMActionService will not be exposed for the device", id);
}
onDeviceConnected(remoteSchemaContext, sessionPreferences, domRpcService);