- DataStoreJobCoordinator dataStoreJobCoordinator = DataStoreJobCoordinator.getInstance();
- dataStoreJobCoordinator.enqueueJob(interfaceName, () -> {
- WriteTransaction writeTransaction = dataBroker.newWriteOnlyTransaction();
- writeTransaction.delete(LogicalDatastoreType.CONFIGURATION, boundServicesInstanceIdentifier);
- List<ListenableFuture<Void>> futures = new ArrayList<>();
- futures.add(writeTransaction.submit());
- return futures;
- });
- }
-
- public static List<TerminationPoint> getTerminationPointsOnBridge(DataBroker dataBroker, BigInteger dpnId) {
- BridgeRefEntry bridgeRefEntry = InterfaceMetaUtils.getBridgeRefEntryFromOperDS(dpnId, dataBroker);
- if (bridgeRefEntry == null || bridgeRefEntry.getBridgeReference() == null) {
- LOG.debug("BridgeRefEntry for DPNID {} not found", dpnId);
- return Collections.emptyList();
- }
- InstanceIdentifier<Node> nodeIid =
- bridgeRefEntry.getBridgeReference().getValue().firstIdentifierOf(Node.class);
- com.google.common.base.Optional<Node> optNode =
- IfmUtil.read(LogicalDatastoreType.OPERATIONAL, nodeIid, dataBroker);
- if (optNode.isPresent()) {
- return optNode.get().getTerminationPoint();
- }
- return Collections.emptyList();