Update MRI upstreams for Phosphorus
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / services / RoleService.java
index 0a941797eaf922dad99ada9d23b79e87b64313a4..6cbae9a91bdbbb534f9194e2fcf5cc47be0543ea 100644 (file)
@@ -12,7 +12,6 @@ import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.MoreExecutors;
 import com.google.common.util.concurrent.SettableFuture;
-import java.math.BigInteger;
 import java.util.Collection;
 import java.util.concurrent.ExecutionException;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
@@ -32,6 +31,7 @@ import org.opendaylight.yangtools.yang.common.RpcError;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.opendaylight.yangtools.yang.common.Uint64;
+import org.opendaylight.yangtools.yang.common.Uint8;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -53,14 +53,14 @@ public class RoleService extends AbstractSimpleService<RoleRequestInputBuilder,
         return input.build();
     }
 
-    public ListenableFuture<Uint64> getGenerationIdFromDevice(final Short version) {
+    public ListenableFuture<Uint64> getGenerationIdFromDevice(final Uint8 version) {
         LOG.info("getGenerationIdFromDevice called for device: {}", getDeviceInfo().getNodeId().getValue());
 
         // send a dummy no-change role request to get the generation-id of the switch
         final RoleRequestInputBuilder roleRequestInputBuilder = new RoleRequestInputBuilder();
         roleRequestInputBuilder.setRole(toOFJavaRole(OfpRole.NOCHANGE));
         roleRequestInputBuilder.setVersion(version);
-        roleRequestInputBuilder.setGenerationId(BigInteger.ZERO);
+        roleRequestInputBuilder.setGenerationId(Uint64.ZERO);
 
         final SettableFuture<Uint64> finalFuture = SettableFuture.create();
         final ListenableFuture<RpcResult<RoleRequestOutput>> genIdListenableFuture =
@@ -97,7 +97,7 @@ public class RoleService extends AbstractSimpleService<RoleRequestInputBuilder,
     }
 
 
-    public ListenableFuture<RpcResult<SetRoleOutput>> submitRoleChange(final OfpRole ofpRole, final Short version,
+    public ListenableFuture<RpcResult<SetRoleOutput>> submitRoleChange(final OfpRole ofpRole, final Uint8 version,
                                                                        final Uint64 generationId) {
         LOG.info("submitRoleChange called for device:{}, role:{}",
                 getDeviceInfo().getNodeId(), ofpRole);