X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Ftopology-manager%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fmd%2Fcontroller%2Ftopology%2Fmanager%2FFlowCapableTopologyExporter.java;h=542e972deb2d7585348876219b5f82dab6ceca14;hp=f4685d2bd918b7a3aa0653e6ed809e010662abc9;hb=66249d6ccc367fad055a269f561860d2d96af385;hpb=fee7a0ff61c980453e0302e750b464988f58a5ce diff --git a/opendaylight/md-sal/topology-manager/src/main/java/org/opendaylight/md/controller/topology/manager/FlowCapableTopologyExporter.java b/opendaylight/md-sal/topology-manager/src/main/java/org/opendaylight/md/controller/topology/manager/FlowCapableTopologyExporter.java index f4685d2bd9..542e972deb 100644 --- a/opendaylight/md-sal/topology-manager/src/main/java/org/opendaylight/md/controller/topology/manager/FlowCapableTopologyExporter.java +++ b/opendaylight/md-sal/topology-manager/src/main/java/org/opendaylight/md/controller/topology/manager/FlowCapableTopologyExporter.java @@ -193,8 +193,7 @@ class FlowCapableTopologyExporter implements // } for (Link link : topologyData.getLink()) { if (id.equals(link.getSource().getSourceNode()) || id.equals(link.getDestination().getDestNode())) { - InstanceIdentifier path = InstanceIdentifier.builder(topologyPath) - .child(Link.class, link.getKey()).build(); + InstanceIdentifier path = topologyPath.child(Link.class, link.getKey()); transaction.removeOperationalData(path); } } @@ -208,8 +207,7 @@ class FlowCapableTopologyExporter implements // } for (Link link : topologyData.getLink()) { if (id.equals(link.getSource().getSourceTp()) || id.equals(link.getDestination().getDestTp())) { - InstanceIdentifier path = InstanceIdentifier.builder(topologyPath) - .child(Link.class, link.getKey()).build(); + InstanceIdentifier path = topologyPath.child(Link.class, link.getKey()); transaction.removeOperationalData(path); } } @@ -233,20 +231,20 @@ class FlowCapableTopologyExporter implements // .child(Topology.class, topology).child(Link.class, link.getKey()).build(); return linkInstanceId; } - + /** * @param txId transaction identificator * @param future transaction result */ private static void listenOnTransactionState(final Object txId, Future> future) { Futures.addCallback(JdkFutureAdapters.listenInPoolThread(future),new FutureCallback>() { - + @Override public void onFailure(Throwable t) { LOG.error("Topology export failed for Tx:{}", txId, t); - + } - + @Override public void onSuccess(RpcResult result) { if(!result.isSuccessful()) {