OPNFLWPLUG-1032: Neon-MRI: Bump odlparent, yangtools, mdsal
[openflowplugin.git] / applications / southbound-cli / src / main / java / org / opendaylight / openflowplugin / applications / southboundcli / util / ShellUtil.java
index 31810a95f02876e68a6ed7b51512eee8cac859d2..f3dc9cada82b70979c2317c94b1c46c5fa94e7aa 100644 (file)
@@ -24,8 +24,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.admin.reconciliation.service.rev180227.ReconciliationCounter;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.admin.reconciliation.service.rev180227.reconciliation.counter.ReconcileCounter;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.reconciliation.service.rev180227.ReconciliationCounter;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.reconciliation.service.rev180227.reconciliation.counter.ReconcileCounter;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -56,9 +56,9 @@ public final class ShellUtil {
             for (Node node : nodes) {
                 String[] nodeId = node.getId().getValue().split(":");
                 String name = null;
-                FlowCapableNode flowCapableNode = node.<FlowCapableNode>getAugmentation(FlowCapableNode.class);
+                FlowCapableNode flowCapableNode = node.<FlowCapableNode>augmentation(FlowCapableNode.class);
                 if (flowCapableNode != null) {
-                    name = node.<FlowCapableNode>getAugmentation(FlowCapableNode.class).getDescription();
+                    name = node.<FlowCapableNode>augmentation(FlowCapableNode.class).getDescription();
                 } else {
                     LOG.error("Error while converting OFNode: {} to FlowCapableNode", node.getId());
                     return Collections.emptyList();
@@ -106,19 +106,19 @@ public final class ShellUtil {
                 String name = null;
                 List<NodeConnector> nodeConnectors = null;
                 List<String> portList = new ArrayList<>();
-                FlowCapableNode flowCapableNode = node.<FlowCapableNode>getAugmentation(FlowCapableNode.class);
+                FlowCapableNode flowCapableNode = node.<FlowCapableNode>augmentation(FlowCapableNode.class);
                 if (flowCapableNode != null) {
-                    name = node.<FlowCapableNode>getAugmentation(FlowCapableNode.class).getDescription();
+                    name = node.<FlowCapableNode>augmentation(FlowCapableNode.class).getDescription();
                 } else {
-                    LOG.error("Error while converting OFNode:{} to FlowCapableNode: {}", node.getId());
+                    LOG.error("Error while converting OFNode:{} to FlowCapableNode", node.getId());
                     return null;
                 }
                 nodeConnectors = node.getNodeConnector();
                 for (NodeConnector nodeConnector : nodeConnectors) {
                     FlowCapableNodeConnector flowCapableNodeConnector =
-                            nodeConnector.getAugmentation(FlowCapableNodeConnector.class);
+                            nodeConnector.augmentation(FlowCapableNodeConnector.class);
                     if (flowCapableNodeConnector == null) {
-                        LOG.error("Error for OFNode:{} while reading nodeConnectors {}", node.getId());
+                        LOG.error("Error for OFNode:{} while reading nodeConnectors", node.getId());
                         return null;
                     } else {
                         String portName = flowCapableNodeConnector.getName();
@@ -127,11 +127,11 @@ public final class ShellUtil {
                 }
                 ofNode = new OFNode(nodeId, name, portList);
             } else {
-                LOG.error("OFNode with nodeId {} not present Inventory DS: {}", nodeId);
+                LOG.error("OFNode with nodeId {} not present Inventory DS", nodeId);
                 return null;
             }
         } catch (ExecutionException | InterruptedException e) {
-            LOG.error("Error reading node {} from Inventory DS: {}", nodeId, e);
+            LOG.error("Error reading node {} from Inventory DS", nodeId, e);
         }
         return ofNode;
     }