+
+ private Node getUniOvsdbNode(InstanceIdentifier<?> iidUni) {
+ Optional<Node> nodeOpt = UnimgrUtils.readNode(dataBroker, iidUni);
+ if (nodeOpt.isPresent()) {
+ return nodeOpt.get();
+ }
+ return null;
+ }
+
+ private boolean deleteTerminationPoint(TerminationPoint termPoint, Node ovsdbNode) {
+ boolean result = false;
+ InstanceIdentifier<TerminationPoint> terminationPointPath = InstanceIdentifier
+ .create(NetworkTopology.class)
+ .child(Topology.class, new TopologyKey(UnimgrConstants.OVSDB_TOPOLOGY_ID))
+ .child(Node.class,ovsdbNode.getKey())
+ .child(TerminationPoint.class, termPoint.getKey());
+ final WriteTransaction transaction = dataBroker.newWriteOnlyTransaction();
+ transaction.delete(LogicalDatastoreType.OPERATIONAL, terminationPointPath);
+ CheckedFuture<Void, TransactionCommitFailedException> future = transaction.submit();
+ try {
+ future.checkedGet();
+ result = true;
+ } catch (TransactionCommitFailedException e) {
+ LOG.warn("Failed to delete {} ", terminationPointPath, e);
+ }
+ return result;
+ }