Change-Id: Idcfa502603cd0cfd9975cb79ba71070bc63d84e6
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
}
LOG.info(message);
} catch (InterruptedException | ExecutionException e) {
}
LOG.info(message);
} catch (InterruptedException | ExecutionException e) {
- // TODO Auto-generated catch block
- LOG.error("Failed to process changed vpp endpoint - before: {}, after {}: ", event.getBefore(),
- event.getBefore());
+ LOG.error("Failed to process changed vpp endpoint. before: {}, after: {}.Exception: {} ", event.getBefore(),
+ event.getAfter(), e);
return deleteIfaceOnVpp(ifaceWithoutBdCommand, vppNodeIid, vppEndpoint);
}
return deleteIfaceOnVpp(ifaceWithoutBdCommand, vppNodeIid, vppEndpoint);
}
- private ListenableFuture<Void> deleteIfaceOnVpp(AbstractInterfaceCommand deleteIfaceWithoutBdCommand, InstanceIdentifier<Node> vppIid,
- VppEndpoint vppEndpoint) {
- InterfaceBuilder intfBuilder = deleteIfaceWithoutBdCommand.getInterfaceBuilder();
- final boolean transactionState = GbpNetconfTransaction.netconfSyncedDelete(vppIid,
- deleteIfaceWithoutBdCommand, GbpNetconfTransaction.RETRY_COUNT);
+ private ListenableFuture<Void> deleteIfaceOnVpp(AbstractInterfaceCommand interfaceCommand,
+ InstanceIdentifier<Node> vppIid, VppEndpoint vppEndpoint) {
+ final boolean transactionState = GbpNetconfTransaction.netconfSyncedDelete(vppIid, interfaceCommand,
+ GbpNetconfTransaction.RETRY_COUNT);
- LOG.debug("Delete interface on VPP command was successful: VPP: {} Command: {}", vppIid,
- deleteIfaceWithoutBdCommand);
- AccessListWrapper.removeAclsForInterface(vppIid, new InterfaceKey(intfBuilder.getName()));
+ LOG.debug("Delete interface on VPP command was successful: VPP: {} Command: {}", vppIid, interfaceCommand);
+ AccessListWrapper.removeAclsForInterface(vppIid, new InterfaceKey(interfaceCommand.getName()));
return vppEndpointLocationProvider.deleteLocationForVppEndpoint(vppEndpoint);
} else {
final String message = "Delete interface on VPP command was not successful: VPP: " + vppIid
return vppEndpointLocationProvider.deleteLocationForVppEndpoint(vppEndpoint);
} else {
final String message = "Delete interface on VPP command was not successful: VPP: " + vppIid
- + " Command: " + deleteIfaceWithoutBdCommand;
+ + " Command: " + interfaceCommand;
LOG.warn(message);
return Futures.immediateFailedFuture(new VppRendererProcessingException(message));
}
LOG.warn(message);
return Futures.immediateFailedFuture(new VppRendererProcessingException(message));
}
.collect(Collectors.toList());
}
};
.collect(Collectors.toList());
}
};
-}
\ No newline at end of file
LOG.trace("Submitting routing for routing command: {}, nodeId: {}", routing, nodeIid);
Optional<DataBroker> mountPointDataBroker = mountDataProvider.resolveDataBrokerForMountPoint(nodeIid);
LOG.trace("Submitting routing for routing command: {}, nodeId: {}", routing, nodeIid);
Optional<DataBroker> mountPointDataBroker = mountDataProvider.resolveDataBrokerForMountPoint(nodeIid);
- if (mountPointDataBroker.isPresent()) {
+ if (!mountPointDataBroker.isPresent()) {
throw new IllegalStateException("Cannot find data broker for mount point " + nodeIid);
}
LOG.info("Routing was created for forwarding. Routing: {}, for node: {}", routing, nodeIid);
throw new IllegalStateException("Cannot find data broker for mount point " + nodeIid);
}
LOG.info("Routing was created for forwarding. Routing: {}, for node: {}", routing, nodeIid);
}
} catch (TimeoutException e) {
LOG.warn("Mountpoint not obtained within {} seconds. Iid: {}", NODE_CONNECTION_TIMER, iidToMountPoint, e);
}
} catch (TimeoutException e) {
LOG.warn("Mountpoint not obtained within {} seconds. Iid: {}", NODE_CONNECTION_TIMER, iidToMountPoint, e);
+ return Optional.absent();
} catch (ExecutionException | InterruptedException e) {
LOG.warn("Error while getting mountpoint. Iid: {}", iidToMountPoint, e);
} catch (ExecutionException | InterruptedException e) {
LOG.warn("Error while getting mountpoint. Iid: {}", iidToMountPoint, e);
+ return Optional.absent();