Fixup Augmentable and Identifiable methods changing
[openflowplugin.git] / applications / topology-manager / src / main / java / org / opendaylight / openflowplugin / applications / topology / manager / TopologyManagerUtil.java
index bc2fb8a994f9579c1611903f814ce00ef7a6402c..d2577e25df781d8c3698e2f5d958c6c50e02e732 100644 (file)
@@ -10,8 +10,8 @@ package org.opendaylight.openflowplugin.applications.topology.manager;
 import com.google.common.base.Optional;
 import java.util.Collections;
 import java.util.List;
+import java.util.concurrent.ExecutionException;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
 import org.opendaylight.openflowplugin.common.txchain.TransactionChainManager;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId;
@@ -32,8 +32,8 @@ final class TopologyManagerUtil {
                                     InstanceIdentifier<Topology> topology) {
         Optional<Topology> topologyOptional = Optional.absent();
         try {
-            topologyOptional = manager.readFromTransaction(LogicalDatastoreType.OPERATIONAL, topology).checkedGet();
-        } catch (ReadFailedException e) {
+            topologyOptional = manager.readFromTransaction(LogicalDatastoreType.OPERATIONAL, topology).get();
+        } catch (InterruptedException | ExecutionException e) {
             LOG.warn("Error reading topology data for topology {}: {}", topology, e.getMessage());
             LOG.debug("Error reading topology data for topology.. ", e);
         }
@@ -62,8 +62,8 @@ final class TopologyManagerUtil {
                                     final InstanceIdentifier<Topology> topology) {
         Optional<Topology> topologyOptional = Optional.absent();
         try {
-            topologyOptional = manager.readFromTransaction(LogicalDatastoreType.OPERATIONAL, topology).checkedGet();
-        } catch (ReadFailedException e) {
+            topologyOptional = manager.readFromTransaction(LogicalDatastoreType.OPERATIONAL, topology).get();
+        } catch (InterruptedException | ExecutionException e) {
             LOG.warn("Error reading topology data for topology {}: {}", topology, e.getMessage());
             LOG.debug("Error reading topology data for topology..", e);
         }
@@ -89,7 +89,7 @@ final class TopologyManagerUtil {
     }
 
     static InstanceIdentifier<Link> linkPath(final Link link, final InstanceIdentifier<Topology> topology) {
-        return topology.child(Link.class, link.getKey());
+        return topology.child(Link.class, link.key());
     }