- Optional<NaptSwitches> optNaptSwitches =
- MDSALUtil.read(dataBroker, LogicalDatastoreType.CONFIGURATION, getNaptSwitchesIdentifier());
+ Optional<NaptSwitches> optNaptSwitches = Optional.empty();
+ try {
+ optNaptSwitches = SingleTransactionDataBroker.syncReadOptional(dataBroker,
+ LogicalDatastoreType.CONFIGURATION, getNaptSwitchesIdentifier());
+ } catch (ExecutionException | InterruptedException e) {
+ LOG.error("constructNAPTSwitches: Exception while reading the NaptSwitches DS", e);
+ }