Bump MRI upstreams
[openflowplugin.git] / applications / forwardingrules-manager / src / main / java / org / opendaylight / openflowplugin / applications / frm / impl / FrmReconciliationServiceImpl.java
index f25a34c2d57059a1776f2e1ef6ad8416af406d2c..9e43568b9a6a202950ffa175b5b1f80566d18c2e 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.applications.frm.impl;
 
 import com.google.common.util.concurrent.FutureCallback;
@@ -15,8 +14,6 @@ import com.google.common.util.concurrent.MoreExecutors;
 import com.google.common.util.concurrent.SettableFuture;
 import javax.inject.Inject;
 import javax.inject.Singleton;
-
-import org.apache.aries.blueprint.annotation.service.Service;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
@@ -28,14 +25,13 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.frm.reconciliation.service.rev180227.ReconcileNodeOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.frm.reconciliation.service.rev180227.ReconcileNodeOutputBuilder;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.common.RpcError;
+import org.opendaylight.yangtools.yang.common.ErrorType;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @Singleton
-@Service(classes = FrmReconciliationService.class)
 public class FrmReconciliationServiceImpl implements FrmReconciliationService {
 
     private static final Logger LOG = LoggerFactory.getLogger(FrmReconciliationServiceImpl.class);
@@ -47,7 +43,7 @@ public class FrmReconciliationServiceImpl implements FrmReconciliationService {
         this.forwardingRulesManagerImpl = forwardingRulesManagerImpl;
     }
 
-    private Node buildNode(long nodeIid) {
+    private static Node buildNode(long nodeIid) {
         NodeId nodeId = new NodeId("openflow:" + nodeIid);
         Node nodeDpn = new NodeBuilder().setId(nodeId).withKey(new NodeKey(nodeId)).build();
         return nodeDpn;
@@ -83,7 +79,7 @@ public class FrmReconciliationServiceImpl implements FrmReconciliationService {
                 futureResult.set(RpcResultBuilder.success(output).build());
             } else {
                 futureResult.set(RpcResultBuilder.<ReconcileNodeOutput>failed()
-                        .withError(RpcError.ErrorType.APPLICATION, "Error while triggering reconciliation").build());
+                        .withError(ErrorType.APPLICATION, "Error while triggering reconciliation").build());
             }
 
         }
@@ -92,7 +88,7 @@ public class FrmReconciliationServiceImpl implements FrmReconciliationService {
         public void onFailure(Throwable error) {
             LOG.error("initReconciliation failed", error);
             futureResult.set(RpcResultBuilder.<ReconcileNodeOutput>failed()
-                    .withError(RpcError.ErrorType.RPC,"Error while calling RPC").build());
+                    .withError(ErrorType.RPC, "Error while calling RPC").build());
         }
     }
 }