Migrate test-provider to Uint types 58/92358/5
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 31 Aug 2020 15:11:20 +0000 (17:11 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 7 Sep 2020 08:12:52 +0000 (10:12 +0200)
There is a multitude of use of legacy compatibility methods, migrate
them in one go.

JIRA: OPNFLWPLUG-1099
Change-Id: Ibbf23fe87bd1e078921619d944f1b4729b5d593d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
test-provider/src/main/java/org/opendaylight/openflowplugin/test/NodeErrorListenerLoggingImpl.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkGroupTransactionProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginGroupTestCommandProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginMeterTestCommandProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestCommandProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java

index bc8d27ac4854a2972cf89588686f721efdb4d31e..f41e5d29216dd2d83e230036d61d9897b1899526 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.test;
 
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.errors.rev131116.ErrorType;
@@ -129,7 +128,7 @@ public class NodeErrorListenerLoggingImpl implements NodeErrorListener {
                 notification.getTransactionId().getValue()));
     }
 
-    private String toStr(ErrorType type, Uint16 code, Uint64 xid) {
+    private static String toStr(ErrorType type, Uint16 code, Uint64 xid) {
         return "[Type=" + type + ", Code=" + code + ", Xid =" + xid + "]";
     }
 }
index bfc7e90de17283dc957bfcc8eeb6c8323529911a..794cf92102c34dd2390cf73fcde7830bf727cc34 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.openflowplugin.test;
 
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.MoreExecutors;
-import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.List;
 import org.eclipse.osgi.framework.console.CommandInterpreter;
@@ -17,6 +16,7 @@ import org.eclipse.osgi.framework.console.CommandProvider;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.NotificationService;
 import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
+import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
@@ -96,6 +96,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4MatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.NodeErrorListener;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint64;
+import org.opendaylight.yangtools.yang.common.Uint8;
 import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -156,7 +160,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
 
         EthernetMatchBuilder eth = new EthernetMatchBuilder();
         EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x0800L));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x0800)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
         return match;
@@ -200,7 +204,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
 
         EthernetMatchBuilder eth = new EthernetMatchBuilder();
         EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x0800L));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x0800)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
         return match;
@@ -247,7 +251,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         EthernetMatchBuilder ethmatch = new EthernetMatchBuilder(); // ethernettype
         // match
         EthernetTypeBuilder ethtype = new EthernetTypeBuilder();
-        EtherType type = new EtherType(0x0800L);
+        EtherType type = new EtherType(Uint32.valueOf(0x0800));
         ethmatch.setEthernetType(ethtype.setType(type).build());
 
         EthernetDestinationBuilder ethdest = new EthernetDestinationBuilder(); // ethernet
@@ -274,7 +278,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
     private static InstructionsBuilder createMeterInstructions() {
 
         MeterBuilder aab = new MeterBuilder();
-        aab.setMeterId(new MeterId(1L));
+        aab.setMeterId(new MeterId(Uint32.ONE));
 
         InstructionBuilder ib = new InstructionBuilder();
         ib.setInstruction(new MeterCaseBuilder().setMeter(aab.build()).build());
@@ -292,7 +296,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         List<Action> actionList = new ArrayList<>();
         ActionBuilder ab = new ActionBuilder();
         ControllerActionBuilder controller = new ControllerActionBuilder();
-        controller.setMaxLength(5);
+        controller.setMaxLength(Uint16.valueOf(5));
         ab.setAction(new ControllerActionCaseBuilder().setControllerAction(controller.build()).build());
         actionList.add(ab.build());
         // Create an Apply Action
@@ -317,7 +321,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         ActionBuilder ab = new ActionBuilder();
 
         SetVlanIdActionBuilder vl = new SetVlanIdActionBuilder();
-        VlanId vlanId = new VlanId(4012);
+        VlanId vlanId = new VlanId(Uint16.valueOf(4012));
         vl.setVlanId(vlanId);
         ab.setAction(new SetVlanIdActionCaseBuilder().setSetVlanIdAction(vl.build()).build());
         actionList.add(ab.build());
@@ -368,7 +372,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         ActionBuilder ab = new ActionBuilder();
 
         PushMplsActionBuilder push = new PushMplsActionBuilder();
-        push.setEthernetType(0x8847);
+        push.setEthernetType(Uint16.valueOf(0x8847));
         ab.setAction(new PushMplsActionCaseBuilder().setPushMplsAction(push.build()).build());
         actionList.add(ab.build());
         // Create an Apply Action
@@ -393,7 +397,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         ActionBuilder ab = new ActionBuilder();
 
         PushPbbActionBuilder pbb = new PushPbbActionBuilder();
-        pbb.setEthernetType(0x88E7);
+        pbb.setEthernetType(Uint16.valueOf(0x88E7));
         ab.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build());
         actionList.add(ab.build());
         // Create an Apply Action
@@ -415,7 +419,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
     private static InstructionsBuilder createGotoTableInstructions() {
 
         GoToTableBuilder aab = new GoToTableBuilder();
-        aab.setTableId((short) 2);
+        aab.setTableId(Uint8.TWO);
 
         InstructionBuilder ib = new InstructionBuilder();
         ib.setInstruction(new GoToTableCaseBuilder().setGoToTable(aab.build()).build());
@@ -514,38 +518,36 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
             flow.setBarrier(Boolean.FALSE);
         }
         // flow.setBufferId(12L);
-        BigInteger value = BigInteger.valueOf(10);
-        BigInteger outputPort = BigInteger.valueOf(4294967295L);
-        flow.setCookie(new FlowCookie(value));
-        flow.setCookieMask(new FlowCookie(value));
-        flow.setHardTimeout(0);
-        flow.setIdleTimeout(0);
+        flow.setCookie(new FlowCookie(Uint64.TEN));
+        flow.setCookieMask(new FlowCookie(Uint64.TEN));
+        flow.setHardTimeout(Uint16.ZERO);
+        flow.setIdleTimeout(Uint16.ZERO);
         flow.setInstallHw(false);
         flow.setStrict(false);
         flow.setContainerName(null);
         flow.setFlags(new FlowModFlags(false, false, false, false, true));
         flow.setId(new FlowId("12"));
         flow.setTableId(getTableId(tableId));
-        flow.setOutGroup(4294967295L);
+        flow.setOutGroup(Uint32.MAX_VALUE);
         // set outport to OFPP_NONE (65535) to disable remove restriction for
         // flow
-        flow.setOutPort(outputPort);
+        flow.setOutPort(Uint64.valueOf(4294967295L));
 
         flow.withKey(key);
-        flow.setPriority(2);
+        flow.setPriority(Uint16.TWO);
         flow.setFlowName(originalFlowName + "X" + flowType);
         return flow;
     }
 
-    private short getTableId(String tableId) {
-        short table = 2;
+    private static Uint8 getTableId(String tableId) {
+        Uint8 table = Uint8.TWO;
         if (tableId == null) {
             return table;
         }
 
         try {
-            table = Short.parseShort(tableId);
-        } catch (NumberFormatException ex) {
+            table = Uint8.valueOf(tableId);
+        } catch (IllegalArgumentException ex) {
             // ignore exception and continue with default value
         }
 
@@ -715,9 +717,9 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         modification.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, nodeToInstanceId(testNode12),
                 testNode12);
         modification.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, path2, group1);
-        modification.commit().addCallback(new FutureCallback<Object>() {
+        modification.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(Object notUsed) {
+            public void onSuccess(CommitInfo notUsed) {
                 ci.println("Status of Group Data Loaded Transaction: success.");
             }
 
@@ -740,9 +742,9 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
                 .child(Group.class, new GroupKey(group1.getGroupId()));
         modification.delete(LogicalDatastoreType.OPERATIONAL, path2);
         modification.delete(LogicalDatastoreType.CONFIGURATION, path2);
-        modification.commit().addCallback(new FutureCallback<Object>() {
+        modification.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(Object notUsed) {
+            public void onSuccess(CommitInfo notUsed) {
                 ci.println("Status of Group Data Loaded Transaction: success.");
             }
 
@@ -758,8 +760,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
 
         GroupBuilder group = new GroupBuilder();
         BucketBuilder bucket = new BucketBuilder();
-        bucket.setBucketId(new BucketId((long) 12));
-        bucket.withKey(new BucketKey(new BucketId((long) 12)));
+        bucket.withKey(new BucketKey(new BucketId(Uint32.valueOf(12))));
 
         if (groupType == null) {
             groupType = "g1";
@@ -825,20 +826,18 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         }
 
         if ("add".equals(groupmod)) {
-            bucket.setWatchGroup((long) 14);
-            bucket.setWatchPort((long) 1234);
-            bucket.setWeight(50);
+            bucket.setWatchGroup(Uint32.valueOf(14));
+            bucket.setWatchPort(Uint32.valueOf(1234));
+            bucket.setWeight(Uint16.valueOf(50));
         } else {
-            bucket.setWatchGroup((long) 13);
-            bucket.setWatchPort((long) 134);
-            bucket.setWeight(30);
+            bucket.setWatchGroup(Uint32.valueOf(13));
+            bucket.setWatchPort(Uint32.valueOf(134));
+            bucket.setWeight(Uint16.valueOf(30));
         }
 
-        long id = Long.parseLong(strId);
-        GroupKey key = new GroupKey(new GroupId(id));
+        GroupKey key = new GroupKey(new GroupId(Uint32.valueOf(strId)));
         group.withKey(key);
         // group.setInstall(false);
-        group.setGroupId(new GroupId(id));
         group.setGroupName(originalGroupName);
         group.setBarrier(false);
         BucketsBuilder value = new BucketsBuilder();
@@ -849,7 +848,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         return group;
     }
 
-    private List<Action> createPopVlanAction() {
+    private static List<Action> createPopVlanAction() {
         PopVlanActionBuilder vlanAction = new PopVlanActionBuilder();
         ActionBuilder action = new ActionBuilder();
         action.setAction(new PopVlanActionCaseBuilder().setPopVlanAction(vlanAction.build()).build());
@@ -859,10 +858,10 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         return actions;
     }
 
-    private List<Action> createPushVlanAction() {
+    private static List<Action> createPushVlanAction() {
         PushVlanActionBuilder vlan = new PushVlanActionBuilder();
-        vlan.setEthernetType(0x8100);
-        VlanId vlanId = new VlanId(2);
+        vlan.setEthernetType(Uint16.valueOf(0x8100));
+        VlanId vlanId = new VlanId(Uint16.TWO);
         vlan.setVlanId(vlanId);
         ActionBuilder action = new ActionBuilder();
         action.setAction(new PushVlanActionCaseBuilder().setPushVlanAction(vlan.build()).build());
@@ -871,9 +870,9 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         return actions;
     }
 
-    private List<Action> createPushMplsAction() {
+    private static List<Action> createPushMplsAction() {
         PushMplsActionBuilder push = new PushMplsActionBuilder();
-        push.setEthernetType(0x8847);
+        push.setEthernetType(Uint16.valueOf(0x8847));
         ActionBuilder action = new ActionBuilder();
         action.setAction(new PushMplsActionCaseBuilder().setPushMplsAction(push.build()).build());
         List<Action> actions = new ArrayList<>();
@@ -881,9 +880,9 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         return actions;
     }
 
-    private List<Action> createPopMplsAction() {
+    private static List<Action> createPopMplsAction() {
         PopMplsActionBuilder popMplsActionBuilder = new PopMplsActionBuilder();
-        popMplsActionBuilder.setEthernetType(0XB);
+        popMplsActionBuilder.setEthernetType(Uint16.valueOf(0XB));
         ActionBuilder action = new ActionBuilder();
         action.setAction(new PopMplsActionCaseBuilder().setPopMplsAction(popMplsActionBuilder.build()).build());
         List<Action> actions = new ArrayList<>();
@@ -891,7 +890,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         return actions;
     }
 
-    private List<Action> createPopPbbAction() {
+    private static List<Action> createPopPbbAction() {
         PopPbbActionBuilder popPbbActionBuilder = new PopPbbActionBuilder();
         ActionBuilder action = new ActionBuilder();
         action.setAction(new PopPbbActionCaseBuilder().setPopPbbAction(popPbbActionBuilder.build()).build());
@@ -900,9 +899,9 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         return actions;
     }
 
-    private List<Action> createPushPbbAction() {
+    private static List<Action> createPushPbbAction() {
         PushPbbActionBuilder pbb = new PushPbbActionBuilder();
-        pbb.setEthernetType(0x88E7);
+        pbb.setEthernetType(Uint16.valueOf(0x88E7));
         ActionBuilder action = new ActionBuilder();
         action.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build());
         List<Action> actions = new ArrayList<>();
@@ -910,7 +909,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         return actions;
     }
 
-    private List<Action> createCopyTtlInAction() {
+    private static List<Action> createCopyTtlInAction() {
         CopyTtlInBuilder ttlin = new CopyTtlInBuilder();
         ActionBuilder action = new ActionBuilder();
         action.setAction(new CopyTtlInCaseBuilder().setCopyTtlIn(ttlin.build()).build());
@@ -919,7 +918,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         return actions;
     }
 
-    private List<Action> createCopyTtlOutAction() {
+    private static List<Action> createCopyTtlOutAction() {
         CopyTtlOutBuilder ttlout = new CopyTtlOutBuilder();
         ActionBuilder action = new ActionBuilder();
         action.setAction(new CopyTtlOutCaseBuilder().setCopyTtlOut(ttlout.build()).build());
@@ -928,7 +927,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         return actions;
     }
 
-    private List<Action> createDecMplsTtlAction() {
+    private static List<Action> createDecMplsTtlAction() {
         DecMplsTtlBuilder mpls = new DecMplsTtlBuilder();
         ActionBuilder action = new ActionBuilder();
         action.setAction(new DecMplsTtlCaseBuilder().setDecMplsTtl(mpls.build()).build());
@@ -937,10 +936,10 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         return actions;
     }
 
-    private List<Action> createGroupAction() {
+    private static List<Action> createGroupAction() {
 
         GroupActionBuilder groupActionB = new GroupActionBuilder();
-        groupActionB.setGroupId(1L);
+        groupActionB.setGroupId(Uint32.ONE);
         groupActionB.setGroup("0");
         ActionBuilder action = new ActionBuilder();
         action.setAction(new GroupActionCaseBuilder().setGroupAction(groupActionB.build()).build());
@@ -955,7 +954,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         ActionBuilder ab = new ActionBuilder();
 
         GroupActionBuilder groupActionB = new GroupActionBuilder();
-        groupActionB.setGroupId(1L);
+        groupActionB.setGroupId(Uint32.ONE);
         groupActionB.setGroup("0");
         ab.setAction(new GroupActionCaseBuilder().setGroupAction(groupActionB.build()).build());
 
index 6cf574b7203524701336f3ce9337c87519c41e96..84f3f2c7eae30c63dae1068a6806f93b87a8fc18 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.openflowplugin.test;
 
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.MoreExecutors;
-import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.List;
 import org.eclipse.osgi.framework.console.CommandInterpreter;
@@ -17,6 +16,7 @@ import org.eclipse.osgi.framework.console.CommandProvider;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.NotificationService;
 import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
+import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6FlowLabel;
@@ -94,7 +94,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.Meter
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetDestinationBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetSourceBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetTypeBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ipv6.match.fields.Ipv6ExtHeaderBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ipv6.match.fields.Ipv6LabelBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder;
@@ -105,6 +104,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv6MatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.NodeErrorListener;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint64;
+import org.opendaylight.yangtools.yang.common.Uint8;
 import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -392,44 +395,37 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
             flow.setBarrier(Boolean.FALSE);
         }
         // flow.setBufferId(12L);
-        BigInteger value = BigInteger.valueOf(10);
-        BigInteger outputPort = BigInteger.valueOf(4294967295L);
-        flow.setCookie(new FlowCookie(value));
-        flow.setCookieMask(new FlowCookie(value));
-        flow.setHardTimeout(0);
-        flow.setIdleTimeout(0);
+        flow.setCookie(new FlowCookie(Uint64.TEN));
+        flow.setCookieMask(new FlowCookie(Uint64.TEN));
+        flow.setHardTimeout(Uint16.ZERO);
+        flow.setIdleTimeout(Uint16.ZERO);
         flow.setInstallHw(false);
         flow.setStrict(false);
         flow.setContainerName(null);
         flow.setFlags(new FlowModFlags(false, false, false, false, true));
         flow.setId(new FlowId("12"));
         flow.setTableId(getTableId(tableId));
-        flow.setOutGroup(4294967295L);
+        flow.setOutGroup(Uint32.MAX_VALUE);
         // set outport to OFPP_NONE (65535) to disable remove restriction for
         // flow
-        flow.setOutPort(outputPort);
+        flow.setOutPort(Uint64.valueOf(4294967295L));
 
         FlowKey key = new FlowKey(new FlowId(Long.toString(id)));
         flow.withKey(key);
-        flow.setPriority(2);
+        flow.setPriority(Uint16.TWO);
         flow.setFlowName(originalFlowName + "X" + flowType);
         return flow;
     }
 
-    private short getTableId(String tableId) {
-        short table = 2;
-        if (tableId == null) {
-            return table;
-        }
-
-        try {
-            table = Short.parseShort(tableId);
-        } catch (NumberFormatException ex) {
-            // ignore exception and continue with default value
+    private static Uint8 getTableId(String tableId) {
+        if (tableId != null) {
+            try {
+                return Uint8.valueOf(tableId);
+            } catch (IllegalArgumentException ex) {
+                // ignore exception and continue with default value
+            }
         }
-
-        return table;
-
+        return Uint8.TWO;
     }
 
     public void _addFlows(CommandInterpreter ci) {
@@ -647,9 +643,9 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         modification.delete(LogicalDatastoreType.OPERATIONAL, path4);
         modification.delete(LogicalDatastoreType.CONFIGURATION, nodeBuilderToInstanceId(tn));
         modification.delete(LogicalDatastoreType.CONFIGURATION, path4);
-        modification.commit().addCallback(new FutureCallback<Object>() {
+        modification.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(Object notUsed) {
+            public void onSuccess(CommitInfo notUsed) {
                 ci.println("Status of Group Data Loaded Transaction: success.");
             }
 
@@ -703,9 +699,9 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         modification.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, nodeBuilderToInstanceId(nodeBuilder),
                 nodeBuilder.build());
         modification.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, path4, flow3.build());
-        modification.commit().addCallback(new FutureCallback<Object>() {
+        modification.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(Object notUsed) {
+            public void onSuccess(CommitInfo notUsed) {
                 ci.println("Status of Group Data Loaded Transaction: success.");
             }
 
@@ -748,7 +744,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
     private static InstructionsBuilder createMeterInstructions() {
 
         MeterBuilder aab = new MeterBuilder();
-        aab.setMeterId(new MeterId(1L));
+        aab.setMeterId(new MeterId(Uint32.ONE));
 
         InstructionBuilder ib = new InstructionBuilder();
         ib.setInstruction(new MeterCaseBuilder().setMeter(aab.build()).build());
@@ -764,7 +760,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
     private static InstructionsBuilder createGotoTableInstructions() {
 
         GoToTableBuilder aab = new GoToTableBuilder();
-        aab.setTableId((short) 2);
+        aab.setTableId(Uint8.TWO);
 
         InstructionBuilder ib = new InstructionBuilder();
         ib.setInstruction(new GoToTableCaseBuilder().setGoToTable(aab.build()).build());
@@ -808,7 +804,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         List<Action> actionList = new ArrayList<>();
         ActionBuilder ab = new ActionBuilder();
         ControllerActionBuilder controller = new ControllerActionBuilder();
-        controller.setMaxLength(5);
+        controller.setMaxLength(Uint16.valueOf(5));
         ab.setAction(new ControllerActionCaseBuilder().setControllerAction(controller.build()).build());
         actionList.add(ab.build());
         // Create an Apply Action
@@ -831,7 +827,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         ActionBuilder ab = new ActionBuilder();
 
         OutputActionBuilder output = new OutputActionBuilder();
-        output.setMaxLength(0xffff);
+        output.setMaxLength(Uint16.MAX_VALUE);
         Uri value = new Uri(OutputPortValues.CONTROLLER.toString());
         output.setOutputNodeConnector(value);
         ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
@@ -864,7 +860,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         ActionBuilder ab = new ActionBuilder();
 
         PushMplsActionBuilder push = new PushMplsActionBuilder();
-        push.setEthernetType(0x8847);
+        push.setEthernetType(Uint16.valueOf(0x8847));
         ab.setAction(new PushMplsActionCaseBuilder().setPushMplsAction(push.build()).build());
         actionList.add(ab.build());
         // Create an Apply Action
@@ -889,7 +885,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         ActionBuilder ab = new ActionBuilder();
 
         PushPbbActionBuilder pbb = new PushPbbActionBuilder();
-        pbb.setEthernetType(0x88E7);
+        pbb.setEthernetType(Uint16.valueOf(0x88E7));
         ab.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build());
         actionList.add(ab.build());
         // Create an Apply Action
@@ -940,7 +936,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         ActionBuilder ab = new ActionBuilder();
 
         SetVlanIdActionBuilder vl = new SetVlanIdActionBuilder();
-        VlanId vlanId = new VlanId(4012);
+        VlanId vlanId = new VlanId(Uint16.valueOf(4012));
         vl.setVlanId(vlanId);
         ab.setAction(new SetVlanIdActionCaseBuilder().setSetVlanIdAction(vl.build()).build());
         actionList.add(ab.build());
@@ -966,7 +962,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         ActionBuilder ab = new ActionBuilder();
 
         SetVlanPcpActionBuilder pcp = new SetVlanPcpActionBuilder();
-        VlanPcp pcp1 = new VlanPcp((short) 2);
+        VlanPcp pcp1 = new VlanPcp(Uint8.TWO);
         pcp.setVlanPcp(pcp1);
         ab.setAction(new SetVlanPcpActionCaseBuilder().setSetVlanPcpAction(pcp.build()).build());
         actionList.add(ab.build());
@@ -1014,7 +1010,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         ActionBuilder ab = new ActionBuilder();
 
         GroupActionBuilder groupActionB = new GroupActionBuilder();
-        groupActionB.setGroupId(1L);
+        groupActionB.setGroupId(Uint32.ONE);
         groupActionB.setGroup("0");
         ab.setAction(new GroupActionCaseBuilder().setGroupAction(groupActionB.build()).build());
 
@@ -1173,7 +1169,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         MatchBuilder match = new MatchBuilder();
         EthernetMatchBuilder eth = new EthernetMatchBuilder();
         EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x88ccL));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x88cc)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
         return match;
@@ -1189,7 +1185,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
 
         EthernetMatchBuilder eth = new EthernetMatchBuilder();
         EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x0800L));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x0800)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
         return match;
@@ -1205,7 +1201,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
 
         EthernetMatchBuilder eth = new EthernetMatchBuilder();
         EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x0800L));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x0800)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
         return match;
@@ -1221,7 +1217,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
 
         EthernetMatchBuilder eth = new EthernetMatchBuilder();
         EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x0800L));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x0800)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
         return match;
@@ -1249,7 +1245,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         EthernetMatchBuilder ethmatch = new EthernetMatchBuilder(); // ethernettype
         // match
         EthernetTypeBuilder ethtype = new EthernetTypeBuilder();
-        EtherType type = new EtherType(0x0800L);
+        EtherType type = new EtherType(Uint32.valueOf(0x0800));
         ethmatch.setEthernetType(ethtype.setType(type).build());
 
         EthernetDestinationBuilder ethdest = new EthernetDestinationBuilder(); // ethernet
@@ -1279,21 +1275,19 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
 
         EthernetMatchBuilder eth = new EthernetMatchBuilder();
         EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x86ddL));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x86dd)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
 
-        Ipv6ExtHeaderBuilder nextheader = new Ipv6ExtHeaderBuilder();
-        nextheader.setIpv6Exthdr(58);
         Ipv6LabelBuilder ipv6label = new Ipv6LabelBuilder();
-        Ipv6FlowLabel label = new Ipv6FlowLabel(10028L);
+        Ipv6FlowLabel label = new Ipv6FlowLabel(Uint32.valueOf(10028));
         ipv6label.setIpv6Flabel(label);
         // ipv6label.setFlabelMask(new byte[] { 0, 1, -1, -1 });
 
         Icmpv6MatchBuilder icmpv6match = new Icmpv6MatchBuilder(); // icmpv6
         // match
-        icmpv6match.setIcmpv6Type((short) 135);
-        icmpv6match.setIcmpv6Code((short) 0);
+        icmpv6match.setIcmpv6Type(Uint8.valueOf(135));
+        icmpv6match.setIcmpv6Code(Uint8.ZERO);
         match.setIcmpv6Match(icmpv6match.build());
 
         Ipv6MatchBuilder ipv6match = new Ipv6MatchBuilder();
@@ -1316,18 +1310,18 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         MatchBuilder match = new MatchBuilder();
         EthernetMatchBuilder eth = new EthernetMatchBuilder();
         EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x86ddL));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x86dd)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
 
         IpMatchBuilder ipmatch = new IpMatchBuilder(); // ipv4 version
-        ipmatch.setIpProtocol((short) 58);
+        ipmatch.setIpProtocol(Uint8.valueOf(58));
         match.setIpMatch(ipmatch.build());
 
         Icmpv6MatchBuilder icmpv6match = new Icmpv6MatchBuilder(); // icmpv6
         // match
-        icmpv6match.setIcmpv6Type((short) 135);
-        icmpv6match.setIcmpv6Code((short) 1);
+        icmpv6match.setIcmpv6Type(Uint8.valueOf(135));
+        icmpv6match.setIcmpv6Code(Uint8.ONE);
         match.setIcmpv6Match(icmpv6match.build());
 
         return match;
@@ -1336,7 +1330,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
     private static MatchBuilder createMetadataMatch() {
         MatchBuilder match = new MatchBuilder();
         MetadataBuilder metadata = new MetadataBuilder(); // metadata match
-        metadata.setMetadata(BigInteger.valueOf(500L));
+        metadata.setMetadata(Uint64.valueOf(500));
         // metadata.setMetadataMask(metamask);
         match.setMetadata(metadata.build());
 
index 03226cecd3b4f07b1c0ad3ed3aaa5cb0ecfce60c..b6faea922d115fd62ff00be38b9c63b0d682cd49 100644 (file)
@@ -17,6 +17,7 @@ import org.eclipse.osgi.framework.console.CommandInterpreter;
 import org.eclipse.osgi.framework.console.CommandProvider;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
+import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.CopyTtlInCaseBuilder;
@@ -70,6 +71,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.N
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
 import org.osgi.framework.BundleContext;
 
 @SuppressWarnings("checkstyle:MethodName")
@@ -113,9 +117,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         // Sample data , committing to DataStore
 
         GroupBuilder group = new GroupBuilder();
-        BucketBuilder bucket = new BucketBuilder();
-        bucket.setBucketId(new BucketId((long) 12));
-        bucket.withKey(new BucketKey(new BucketId((long) 12)));
+        BucketBuilder bucket = new BucketBuilder().withKey(new BucketKey(new BucketId(Uint32.valueOf(12))));
 
         if (groupType == null) {
             groupType = "g1";
@@ -210,7 +212,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
                 bucket.setAction(createInportOutputAction());
                 break;
             case "a24":
-                bucket.setAction(Collections.EMPTY_LIST);
+                bucket.setAction(Collections.emptyList());
                 break;
             case "a25":
                 bucket.setAction(createNonAppyOutputAction());
@@ -229,20 +231,18 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         }
 
         if ("add".equals(groupMod)) {
-            bucket.setWatchGroup((long) 14);
-            bucket.setWatchPort((long) 1234);
-            bucket.setWeight(50);
+            bucket.setWatchGroup(Uint32.valueOf(14));
+            bucket.setWatchPort(Uint32.valueOf(1234));
+            bucket.setWeight(Uint16.valueOf(50));
         } else {
-            bucket.setWatchGroup((long) 13);
-            bucket.setWatchPort((long) 134);
-            bucket.setWeight(30);
+            bucket.setWatchGroup(Uint32.valueOf(13));
+            bucket.setWatchPort(Uint32.valueOf(134));
+            bucket.setWeight(Uint16.valueOf(30));
         }
 
-        long id = 1;
-        GroupKey key = new GroupKey(new GroupId(id));
+        GroupKey key = new GroupKey(new GroupId(Uint32.ONE));
         group.withKey(key);
         // group.setInstall(false);
-        group.setGroupId(new GroupId(id));
         group.setGroupName(ORIGINAL_GROUP_NAME);
         group.setBarrier(false);
         BucketsBuilder value = new BucketsBuilder();
@@ -255,7 +255,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
     }
 
 
-    private List<Action> createPopVlanAction() {
+    private static List<Action> createPopVlanAction() {
         PopVlanActionBuilder vlanAction = new PopVlanActionBuilder();
         ActionBuilder action = new ActionBuilder();
         action.setAction(new PopVlanActionCaseBuilder().setPopVlanAction(vlanAction.build()).build());
@@ -265,9 +265,9 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createPushVlanAction() {
+    private static List<Action> createPushVlanAction() {
         PushVlanActionBuilder vlan = new PushVlanActionBuilder();
-        vlan.setEthernetType(0x8100);
+        vlan.setEthernetType(Uint16.valueOf(0x8100));
         ActionBuilder action = new ActionBuilder();
         action.setAction(new PushVlanActionCaseBuilder().setPushVlanAction(vlan.build()).build());
         List<Action> actions = new ArrayList<>();
@@ -275,9 +275,9 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createPushMplsAction() {
+    private static List<Action> createPushMplsAction() {
         PushMplsActionBuilder push = new PushMplsActionBuilder();
-        push.setEthernetType(0x8847);
+        push.setEthernetType(Uint16.valueOf(0x8847));
         ActionBuilder action = new ActionBuilder();
         action.setAction(new PushMplsActionCaseBuilder().setPushMplsAction(push.build()).build());
         List<Action> actions = new ArrayList<>();
@@ -285,9 +285,9 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createPopMplsAction() {
+    private static List<Action> createPopMplsAction() {
         PopMplsActionBuilder popMplsActionBuilder = new PopMplsActionBuilder();
-        popMplsActionBuilder.setEthernetType(0XB);
+        popMplsActionBuilder.setEthernetType(Uint16.valueOf(0XB));
         ActionBuilder action = new ActionBuilder();
         action.setAction(new PopMplsActionCaseBuilder().setPopMplsAction(popMplsActionBuilder.build()).build());
         List<Action> actions = new ArrayList<>();
@@ -295,7 +295,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createPopPbbAction() {
+    private static List<Action> createPopPbbAction() {
         PopPbbActionBuilder popPbbActionBuilder = new PopPbbActionBuilder();
         ActionBuilder action = new ActionBuilder();
         action.setAction(new PopPbbActionCaseBuilder().setPopPbbAction(popPbbActionBuilder.build()).build());
@@ -304,9 +304,9 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createPushPbbAction() {
+    private static List<Action> createPushPbbAction() {
         PushPbbActionBuilder pbb = new PushPbbActionBuilder();
-        pbb.setEthernetType(0x88E7);
+        pbb.setEthernetType(Uint16.valueOf(0x88E7));
         ActionBuilder action = new ActionBuilder();
         action.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build());
         List<Action> actions = new ArrayList<>();
@@ -314,9 +314,9 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createSetMplsTtlAction() {
+    private static List<Action> createSetMplsTtlAction() {
         SetMplsTtlActionBuilder setMplsTtlActionBuilder = new SetMplsTtlActionBuilder();
-        setMplsTtlActionBuilder.setMplsTtl((short) 0X1);
+        setMplsTtlActionBuilder.setMplsTtl(Uint8.ONE);
         ActionBuilder action = new ActionBuilder();
         action.setAction(new SetMplsTtlActionCaseBuilder().setSetMplsTtlAction(
                 setMplsTtlActionBuilder.build()).build());
@@ -325,9 +325,9 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createSetNwTtlAction() {
+    private static List<Action> createSetNwTtlAction() {
         SetNwTtlActionBuilder setNwTtlActionBuilder = new SetNwTtlActionBuilder();
-        setNwTtlActionBuilder.setNwTtl((short) 1);
+        setNwTtlActionBuilder.setNwTtl(Uint8.ONE);
         ActionBuilder action = new ActionBuilder();
         action.setAction(new SetNwTtlActionCaseBuilder().setSetNwTtlAction(setNwTtlActionBuilder.build()).build());
         List<Action> actions = new ArrayList<>();
@@ -335,9 +335,9 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createSetQueueAction() {
+    private static List<Action> createSetQueueAction() {
         SetQueueActionBuilder setQueueActionBuilder = new SetQueueActionBuilder();
-        setQueueActionBuilder.setQueueId(1L);
+        setQueueActionBuilder.setQueueId(Uint32.ONE);
         ActionBuilder action = new ActionBuilder();
         action.setAction(new SetQueueActionCaseBuilder().setSetQueueAction(setQueueActionBuilder.build()).build());
         action.withKey(new ActionKey(0));
@@ -347,7 +347,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
     }
 
 
-    private List<Action> createCopyTtlInAction() {
+    private static List<Action> createCopyTtlInAction() {
         CopyTtlInBuilder ttlin = new CopyTtlInBuilder();
         ActionBuilder action = new ActionBuilder();
         action.setAction(new CopyTtlInCaseBuilder().setCopyTtlIn(ttlin.build()).build());
@@ -356,7 +356,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createCopyTtlOutAction() {
+    private static List<Action> createCopyTtlOutAction() {
         CopyTtlOutBuilder ttlout = new CopyTtlOutBuilder();
         ActionBuilder action = new ActionBuilder();
         action.setAction(new CopyTtlOutCaseBuilder().setCopyTtlOut(ttlout.build()).build());
@@ -365,7 +365,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createDecMplsTtlAction() {
+    private static List<Action> createDecMplsTtlAction() {
         DecMplsTtlBuilder mpls = new DecMplsTtlBuilder();
         ActionBuilder action = new ActionBuilder();
         action.setAction(new DecMplsTtlCaseBuilder().setDecMplsTtl(mpls.build()).build());
@@ -374,7 +374,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createDecNwTtlAction() {
+    private static List<Action> createDecNwTtlAction() {
         DecNwTtlBuilder nwttl = new DecNwTtlBuilder();
         ActionBuilder action = new ActionBuilder();
         action.setAction(new DecNwTtlCaseBuilder().setDecNwTtl(nwttl.build()).build());
@@ -394,10 +394,10 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createFloodOutputAction() {
+    private static List<Action> createFloodOutputAction() {
         ActionBuilder ab = new ActionBuilder();
         OutputActionBuilder output = new OutputActionBuilder();
-        output.setMaxLength(30);
+        output.setMaxLength(Uint16.valueOf(30));
         Uri value = new Uri(OutputPortValues.FLOOD.toString());
         output.setOutputNodeConnector(value);
         ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
@@ -408,10 +408,10 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createAllOutputAction() {
+    private static List<Action> createAllOutputAction() {
         ActionBuilder ab = new ActionBuilder();
         OutputActionBuilder output = new OutputActionBuilder();
-        output.setMaxLength(30);
+        output.setMaxLength(Uint16.valueOf(30));
         Uri value = new Uri(OutputPortValues.ALL.toString());
         output.setOutputNodeConnector(value);
         ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
@@ -422,10 +422,10 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createAnyOutputAction() {
+    private static List<Action> createAnyOutputAction() {
         ActionBuilder ab = new ActionBuilder();
         OutputActionBuilder output = new OutputActionBuilder();
-        output.setMaxLength(30);
+        output.setMaxLength(Uint16.valueOf(30));
         Uri value = new Uri(OutputPortValues.ANY.toString());
         output.setOutputNodeConnector(value);
         ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
@@ -436,10 +436,10 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createNormalOutputAction() {
+    private static List<Action> createNormalOutputAction() {
         ActionBuilder ab = new ActionBuilder();
         OutputActionBuilder output = new OutputActionBuilder();
-        output.setMaxLength(30);
+        output.setMaxLength(Uint16.valueOf(30));
         Uri value = new Uri(OutputPortValues.NORMAL.toString());
         output.setOutputNodeConnector(value);
         ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
@@ -450,10 +450,10 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createInportOutputAction() {
+    private static List<Action> createInportOutputAction() {
         ActionBuilder ab = new ActionBuilder();
         OutputActionBuilder output = new OutputActionBuilder();
-        output.setMaxLength(30);
+        output.setMaxLength(Uint16.valueOf(30));
         Uri value = new Uri(OutputPortValues.INPORT.toString());
         output.setOutputNodeConnector(value);
         ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
@@ -464,10 +464,10 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> creatTableOutputAction() {
+    private static List<Action> creatTableOutputAction() {
         ActionBuilder ab = new ActionBuilder();
         OutputActionBuilder output = new OutputActionBuilder();
-        output.setMaxLength(30);
+        output.setMaxLength(Uint16.valueOf(30));
         Uri value = new Uri(OutputPortValues.TABLE.toString());
         output.setOutputNodeConnector(value);
         ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
@@ -478,10 +478,10 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createControllerAction() {
+    private static List<Action> createControllerAction() {
         ActionBuilder ab = new ActionBuilder();
         OutputActionBuilder output = new OutputActionBuilder();
-        output.setMaxLength(30);
+        output.setMaxLength(Uint16.valueOf(30));
         Uri value = new Uri(OutputPortValues.CONTROLLER.toString());
         output.setOutputNodeConnector(value);
         ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
@@ -492,10 +492,10 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createLocalOutputAction() {
+    private static List<Action> createLocalOutputAction() {
         ActionBuilder ab = new ActionBuilder();
         OutputActionBuilder output = new OutputActionBuilder();
-        output.setMaxLength(30);
+        output.setMaxLength(Uint16.valueOf(30));
         Uri value = new Uri(OutputPortValues.LOCAL.toString());
         output.setOutputNodeConnector(value);
         ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
@@ -506,9 +506,9 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         return actions;
     }
 
-    private List<Action> createGroupAction() {
+    private static List<Action> createGroupAction() {
         GroupActionBuilder groupActionB = new GroupActionBuilder();
-        groupActionB.setGroupId(1L);
+        groupActionB.setGroupId(Uint32.ONE);
         groupActionB.setGroup("0");
         ActionBuilder action = new ActionBuilder();
         action.setAction(new GroupActionCaseBuilder().setGroupAction(groupActionB.build()).build());
@@ -524,7 +524,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         Uri value = new Uri(OutputPortValues.CONTROLLER.toString());
         output.setOutputNodeConnector(value);
         //output.setMaxLength(null);
-        output.setMaxLength(66000);
+        output.setMaxLength(Uint16.valueOf(66000));
         ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
 
         List<Action> actionList = new ArrayList<>();
@@ -533,35 +533,30 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
     }
 
     private static List<Action> createNonAppyPushMplsAction() {
-
         List<Action> actionList = new ArrayList<>();
         ActionBuilder ab = new ActionBuilder();
         PushMplsActionBuilder push = new PushMplsActionBuilder();
-        push.setEthernetType(0x8849);
+        push.setEthernetType(Uint16.valueOf(0x8849));
         ab.setAction(new PushMplsActionCaseBuilder().setPushMplsAction(push.build()).build());
         actionList.add(ab.build());
         return actionList;
     }
 
     private static List<Action> createNonAppyPushPbbAction() {
-
         List<Action> actionList = new ArrayList<>();
         ActionBuilder ab = new ActionBuilder();
         PushPbbActionBuilder pbb = new PushPbbActionBuilder();
-        pbb.setEthernetType(0x88E8);
+        pbb.setEthernetType(Uint16.valueOf(0x88E8));
         ab.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build());
         actionList.add(ab.build());
         return actionList;
-
     }
 
-
     private static List<Action> createNonAppyPushVlanAction() {
-
         List<Action> actionList = new ArrayList<>();
         ActionBuilder ab = new ActionBuilder();
         PushVlanActionBuilder vlan = new PushVlanActionBuilder();
-        vlan.setEthernetType(0x8101);
+        vlan.setEthernetType(Uint16.valueOf(0x8101));
         ab.setAction(new PushVlanActionCaseBuilder().setPushVlanAction(vlan.build()).build());
         actionList.add(ab.build());
         return actionList;
@@ -582,9 +577,9 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         InstanceIdentifier<Group> path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.key())
                 .augmentation(FlowCapableNode.class).child(Group.class, new GroupKey(gbuilder.getGroupId()));
         modification.delete(LogicalDatastoreType.CONFIGURATION, path1);
-        modification.commit().addCallback(new FutureCallback<Object>() {
+        modification.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(Object notUsed) {
+            public void onSuccess(CommitInfo notUsed) {
                 ci.println("Status of Group Data Loaded Transaction: success.");
             }
 
@@ -617,9 +612,9 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         modification.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, nodeToInstanceId(testNode),
                 testNode);
         modification.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, path1, group);
-        modification.commit().addCallback(new FutureCallback<Object>() {
+        modification.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(Object notUsed) {
+            public void onSuccess(CommitInfo notUsed) {
                 ci.println("Status of Group Data Loaded Transaction: success.");
             }
 
index f385405a12c64487223db3cd487ea91ba9b8230e..5617733c6e0d23398621c6471293014c7e4754ee 100644 (file)
@@ -16,6 +16,7 @@ import org.eclipse.osgi.framework.console.CommandProvider;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.NotificationService;
 import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
+import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter;
@@ -41,6 +42,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter.meter.band.headers.meter.band.header.MeterBandTypesBuilder;
 import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
 import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -120,27 +123,26 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider {
     private MeterBuilder createTestMeter() {
         // Sample data , committing to DataStore
 
-        long id = 12;
-        MeterKey key = new MeterKey(new MeterId(id));
+        MeterKey key = new MeterKey(new MeterId(Uint32.valueOf(12)));
         MeterBuilder meter = new MeterBuilder();
         meter.setContainerName("abcd");
         meter.withKey(key);
-        meter.setMeterId(new MeterId(9L));
+        meter.setMeterId(new MeterId(Uint32.valueOf(9)));
         meter.setMeterName(originalMeterName);
         meter.setFlags(new MeterFlags(true, false, false, false));
         MeterBandHeaderBuilder bandHeader = new MeterBandHeaderBuilder();
-        bandHeader.setBandRate((long) 234);
-        bandHeader.setBandBurstSize((long) 444);
+        bandHeader.setBandRate(Uint32.valueOf(234));
+        bandHeader.setBandBurstSize(Uint32.valueOf(444));
         DscpRemarkBuilder dscpRemark = new DscpRemarkBuilder();
-        dscpRemark.setDscpRemarkBurstSize((long) 5);
-        dscpRemark.setPrecLevel((short) 1);
-        dscpRemark.setDscpRemarkRate((long) 12);
+        dscpRemark.setDscpRemarkBurstSize(Uint32.valueOf(5));
+        dscpRemark.setPrecLevel(Uint8.ONE);
+        dscpRemark.setDscpRemarkRate(Uint32.valueOf(12));
         bandHeader.setBandType(dscpRemark.build());
         MeterBandTypesBuilder bandTypes = new MeterBandTypesBuilder();
         MeterBandType bandType = new MeterBandType(false, true, false);
         bandTypes.setFlags(bandType);
         bandHeader.setMeterBandTypes(bandTypes.build());
-        bandHeader.setBandId(new BandId(0L));
+        bandHeader.setBandId(new BandId(Uint32.ZERO));
 
         List<MeterBandHeader> bandHdr = new ArrayList<>();
         bandHdr.add(bandHeader.build());
@@ -155,33 +157,32 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider {
 
     private MeterBuilder createTestMeters(String s1, String s2) {
         // Sample data , committing to DataStore
-        long id = Integer.parseInt(s1);
-        MeterKey key = new MeterKey(new MeterId(id));
+        MeterKey key = new MeterKey(new MeterId(Uint32.valueOf(s1)));
         MeterBuilder meter = new MeterBuilder();
         meter.setContainerName("abcd");
         meter.withKey(key);
-        meter.setMeterId(new MeterId(9L));
+        meter.setMeterId(new MeterId(Uint32.valueOf(9)));
         MeterBandHeaderBuilder bandHeader = new MeterBandHeaderBuilder();
         if (s2.equalsIgnoreCase("modify")) {
             meter.setMeterName(updatedMeterName);
-            bandHeader.setBandRate((long) 234);
+            bandHeader.setBandRate(Uint32.valueOf(234));
         } else {
             meter.setMeterName(originalMeterName);
-            bandHeader.setBandRate((long) 123);
+            bandHeader.setBandRate(Uint32.valueOf(123));
         }
         meter.setFlags(new MeterFlags(true, false, false, false));
 
-        bandHeader.setBandBurstSize((long) 444);
+        bandHeader.setBandBurstSize(Uint32.valueOf(444));
         DscpRemarkBuilder dscpRemark = new DscpRemarkBuilder();
-        dscpRemark.setDscpRemarkBurstSize((long) 5);
-        dscpRemark.setPrecLevel((short) 1);
-        dscpRemark.setDscpRemarkRate((long) 12);
+        dscpRemark.setDscpRemarkBurstSize(Uint32.valueOf(5));
+        dscpRemark.setPrecLevel(Uint8.ONE);
+        dscpRemark.setDscpRemarkRate(Uint32.valueOf(12));
         bandHeader.setBandType(dscpRemark.build());
         MeterBandTypesBuilder bandTypes = new MeterBandTypesBuilder();
         MeterBandType bandType = new MeterBandType(false, true, false);
         bandTypes.setFlags(bandType);
         bandHeader.setMeterBandTypes(bandTypes.build());
-        bandHeader.setBandId(new BandId(0L));
+        bandHeader.setBandId(new BandId(Uint32.ZERO));
 
         List<MeterBandHeader> bandHdr = new ArrayList<>();
         bandHdr.add(bandHeader.build());
@@ -226,9 +227,9 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider {
         InstanceIdentifier<Meter> path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, testNode.key())
                 .augmentation(FlowCapableNode.class).child(Meter.class, new MeterKey(testMeter.getMeterId()));
         modification.delete(LogicalDatastoreType.CONFIGURATION, path1);
-        modification.commit().addCallback(new FutureCallback<Object>() {
+        modification.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(Object notUsed) {
+            public void onSuccess(CommitInfo notUsed) {
                 ci.println("Status of Group Data Loaded Transaction: success.");
             }
 
@@ -307,9 +308,9 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider {
                 break;
         }
 
-        modification.commit().addCallback(new FutureCallback<Object>() {
+        modification.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(Object notUsed) {
+            public void onSuccess(CommitInfo notUsed) {
                 ci.println("Status of Group Data Loaded Transaction: success.");
             }
 
@@ -380,9 +381,9 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider {
         modification.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, nodeToInstanceId(testNode),
                 testNode);
         modification.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, path1, meter);
-        modification.commit().addCallback(new FutureCallback<Object>() {
+        modification.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(Object notUsed) {
+            public void onSuccess(CommitInfo notUsed) {
                 ci.println("Status of Group Data Loaded Transaction: success.");
             }
 
@@ -406,9 +407,9 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider {
                 testNode);
         modification.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, path2, meter1);
 
-        modification.commit().addCallback(new FutureCallback<Object>() {
+        modification.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(Object notUsed) {
+            public void onSuccess(CommitInfo notUsed) {
                 ci.println("Status of Group Data Loaded Transaction: success.");
             }
 
index 282c3f4b65cf448871025e98fde5d0a293d63610..2e034e49bd162c95f22e2b8d29c76cca039a0b75 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.openflowplugin.test;
 import com.google.common.base.Preconditions;
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.MoreExecutors;
-import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -18,6 +17,7 @@ import org.eclipse.osgi.framework.console.CommandInterpreter;
 import org.eclipse.osgi.framework.console.CommandProvider;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
+import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.CopyTtlInCaseBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.CopyTtlOutCaseBuilder;
@@ -66,6 +66,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table
 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.table.features.table.properties.TableFeaturePropertiesKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint64;
 import org.opendaylight.yangtools.yang.common.Uint8;
 import org.osgi.framework.BundleContext;
 
@@ -117,13 +119,13 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr
         if (!tableFeatureType.equals("t1")) {
 
 
-            tableFeature.setTableId((short) 0);
+            tableFeature.setTableId(Uint8.ZERO);
             tableFeature.setName("Table 0");
 
 
-            tableFeature.setMetadataMatch(BigInteger.valueOf(10));
-            tableFeature.setMetadataWrite(BigInteger.valueOf(10));
-            tableFeature.setMaxEntries(10000L);
+            tableFeature.setMetadataMatch(Uint64.TEN);
+            tableFeature.setMetadataWrite(Uint64.TEN);
+            tableFeature.setMaxEntries(Uint32.valueOf(10000));
 
             tableFeature.setConfig(new TableConfig(false));
 
@@ -580,9 +582,9 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr
         modification.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, nodeToInstanceId(testNode),
                 testNode);
         modification.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, path1, tableFeatures);
-        modification.commit().addCallback(new FutureCallback<Object>() {
+        modification.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(Object notUsed) {
+            public void onSuccess(CommitInfo notUsed) {
                 ci.println("Status of Group Data Loaded Transaction: success.");
             }
 
index d4de894d6671aa2ebe73860441deaea40273896e..0dc6a63e7a900db6a6d57dd65cbd67064c5b2f65 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.openflowplugin.test;
 
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.MoreExecutors;
-import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.ExecutorService;
@@ -20,6 +19,7 @@ import org.eclipse.osgi.framework.console.CommandProvider;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.NotificationService;
 import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
+import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Dscp;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix;
@@ -169,6 +169,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.vlan.match.fields.VlanIdBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.NodeErrorListener;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint64;
+import org.opendaylight.yangtools.yang.common.Uint8;
 import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -204,7 +208,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         createTestFlow(createTestNode(null), null, null);
     }
 
-    private NodeBuilder createTestNode(final String nodeId) {
+    private static NodeBuilder createTestNode(final String nodeId) {
         String localNodeId;
 
         if (nodeId == null) {
@@ -219,11 +223,12 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         return builder;
     }
 
-    private InstanceIdentifier<Node> nodeBuilderToInstanceId(final NodeBuilder node) {
+    private static InstanceIdentifier<Node> nodeBuilderToInstanceId(final NodeBuilder node) {
         return InstanceIdentifier.create(Nodes.class).child(Node.class, node.key());
     }
 
-    private FlowBuilder createTestFlow(final NodeBuilder nodeBuilder, final String flowTypeArg, final String tableId) {
+    private static FlowBuilder createTestFlow(final NodeBuilder nodeBuilder, final String flowTypeArg,
+            final String tableId) {
         final long TEST_ID = 123;
 
         final FlowBuilder flow = new FlowBuilder();
@@ -234,7 +239,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
             flowType = "f1";
         }
 
-        flow.setPriority(2);
+        flow.setPriority(Uint16.TWO);
 
         switch (flowType) {
             case "f1":
@@ -509,7 +514,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
                 id += 54;
                 flow.setMatch(new MatchBuilder().build());
                 flow.setInstructions(createSentToControllerInstructions().build());
-                flow.setPriority(0);
+                flow.setPriority(Uint16.ZERO);
                 break;
             case "f55":
                 id += 55;
@@ -519,37 +524,37 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
             case "f56":
                 id += 56;
                 flow.setMatch(createToSMatch().build());
-                flow.setInstructions(createOutputInstructions("INPORT", 10).build());
+                flow.setInstructions(createOutputInstructions("INPORT", Uint16.TEN).build());
                 break;
             case "f57":
                 id += 57;
                 flow.setMatch(createToSMatch().build());
-                flow.setInstructions(createOutputInstructions("FLOOD", 20).build());
+                flow.setInstructions(createOutputInstructions("FLOOD", Uint16.valueOf(20)).build());
                 break;
             case "f58":
                 id += 58;
                 flow.setMatch(createToSMatch().build());
-                flow.setInstructions(createOutputInstructions("ALL", 30).build());
+                flow.setInstructions(createOutputInstructions("ALL", Uint16.valueOf(30)).build());
                 break;
             case "f59":
                 id += 59;
                 flow.setMatch(createToSMatch().build());
-                flow.setInstructions(createOutputInstructions("NORMAL", 40).build());
+                flow.setInstructions(createOutputInstructions("NORMAL", Uint16.valueOf(40)).build());
                 break;
             case "f60":
                 id += 60;
                 flow.setMatch(createToSMatch().build());
-                flow.setInstructions(createOutputInstructions("LOCAL", 50).build());
+                flow.setInstructions(createOutputInstructions("LOCAL", Uint16.valueOf(50)).build());
                 break;
             case "f61":
                 id += 61;
                 flow.setMatch(createToSMatch().build());
-                flow.setInstructions(createOutputInstructions("TABLE", 60).build());
+                flow.setInstructions(createOutputInstructions("TABLE", Uint16.valueOf(60)).build());
                 break;
             case "f62":
                 id += 62;
                 flow.setMatch(createToSMatch().build());
-                flow.setInstructions(createOutputInstructions("NONE", 70).build());
+                flow.setInstructions(createOutputInstructions("NONE", Uint16.valueOf(70)).build());
                 break;
             case "f63":
                 id += 63;
@@ -685,11 +690,10 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         if (null == flow.isBarrier()) {
             flow.setBarrier(Boolean.FALSE);
         }
-        final BigInteger value = BigInteger.valueOf(10);
-        flow.setCookie(new FlowCookie(value));
-        flow.setCookieMask(new FlowCookie(value));
-        flow.setHardTimeout(0);
-        flow.setIdleTimeout(0);
+        flow.setCookie(new FlowCookie(Uint64.TEN));
+        flow.setCookieMask(new FlowCookie(Uint64.TEN));
+        flow.setHardTimeout(Uint16.ZERO);
+        flow.setIdleTimeout(Uint16.ZERO);
         flow.setInstallHw(false);
         flow.setStrict(false);
         flow.setContainerName(null);
@@ -703,7 +707,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
     }
 
 
-    private FlowBuilder createTestFlowPerfTest(final String flowTypeArg, final String tableId, final int id) {
+    private static FlowBuilder createTestFlowPerfTest(final String flowTypeArg, final String tableId, final int id) {
         final FlowBuilder flow = new FlowBuilder();
         String flowType = flowTypeArg;
         int flowId = id;
@@ -712,7 +716,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
             flowType = "f1";
         }
 
-        flow.setPriority(flowId);
+        flow.setPriority(Uint16.valueOf(flowId));
 
         switch (flowType) {
             case "f1":
@@ -728,11 +732,10 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         if (null == flow.isBarrier()) {
             flow.setBarrier(Boolean.FALSE);
         }
-        final BigInteger value = BigInteger.valueOf(10);
-        flow.setCookie(new FlowCookie(value));
-        flow.setCookieMask(new FlowCookie(value));
-        flow.setHardTimeout(0);
-        flow.setIdleTimeout(0);
+        flow.setCookie(new FlowCookie(Uint64.TEN));
+        flow.setCookieMask(new FlowCookie(Uint64.TEN));
+        flow.setHardTimeout(Uint16.ZERO);
+        flow.setIdleTimeout(Uint16.ZERO);
         flow.setInstallHw(false);
         flow.setStrict(false);
         flow.setContainerName(null);
@@ -745,29 +748,28 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         return flow;
     }
 
-    private FlowBuilder createtablemiss() {
+    private static FlowBuilder createtablemiss() {
         final FlowBuilder flow = new FlowBuilder();
         final long id = 456;
         final MatchBuilder matchBuilder = new MatchBuilder();
         flow.setMatch(matchBuilder.build());
         flow.setInstructions(createSentToControllerInstructions().build());
-        flow.setPriority(0);
-        flow.setTableId((short) 0);
+        flow.setPriority(Uint16.ZERO);
+        flow.setTableId(Uint8.ZERO);
         final FlowKey key = new FlowKey(new FlowId(Long.toString(id)));
         flow.withKey(key);
         return flow;
     }
 
-    private short getTableId(final String tableId) {
-        final short TABLE_ID = 2;
-        short table = TABLE_ID;
+    private static Uint8 getTableId(final String tableId) {
+        Uint8 table = Uint8.TWO;
 
         if (tableId == null) {
             return table;
         }
 
         try {
-            table = Short.parseShort(tableId);
+            table = Uint8.valueOf(tableId);
         } catch (NumberFormatException ex) {
             LOG.info("Parsing String tableId {} failed. Continuing with default tableId {}.",
                     tableId, table);
@@ -807,7 +809,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
     private static InstructionsBuilder createMeterInstructions() {
 
         final MeterBuilder aab = new MeterBuilder();
-        aab.setMeterId(new MeterId(1L));
+        aab.setMeterId(new MeterId(Uint32.ONE));
 
         final InstructionBuilder ib = new InstructionBuilder();
         ib.setInstruction(new MeterCaseBuilder().setMeter(aab.build()).build());
@@ -824,8 +826,8 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
     private static InstructionsBuilder createMetadataInstructions() {
 
         final WriteMetadataBuilder aab = new WriteMetadataBuilder();
-        aab.setMetadata(BigInteger.valueOf(10));
-        aab.setMetadataMask(BigInteger.valueOf(10));
+        aab.setMetadata(Uint64.valueOf(10));
+        aab.setMetadataMask(Uint64.valueOf(10));
 
         final InstructionBuilder ib = new InstructionBuilder();
         ib.setInstruction(new WriteMetadataCaseBuilder().setWriteMetadata(aab.build()).build());
@@ -842,7 +844,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
     private static InstructionsBuilder createGotoTableInstructions() {
 
         final GoToTableBuilder aab = new GoToTableBuilder();
-        aab.setTableId((short) 5);
+        aab.setTableId(Uint8.valueOf(5));
 
         final InstructionBuilder ib = new InstructionBuilder();
         ib.setInstruction(new GoToTableCaseBuilder().setGoToTable(aab.build()).build());
@@ -888,7 +890,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final List<Action> actionList = new ArrayList<>();
         final ActionBuilder ab = new ActionBuilder();
         final ControllerActionBuilder controller = new ControllerActionBuilder();
-        controller.setMaxLength(5);
+        controller.setMaxLength(Uint16.valueOf(5));
         ab.setAction(new ControllerActionCaseBuilder().setControllerAction(controller.build()).build());
         ab.withKey(new ActionKey(0));
         actionList.add(ab.build());
@@ -915,7 +917,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final OutputActionBuilder output = new OutputActionBuilder();
-        output.setMaxLength(56);
+        output.setMaxLength(Uint16.valueOf(56));
         final Uri value = new Uri("PCEP");
         output.setOutputNodeConnector(value);
         ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
@@ -971,7 +973,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         return isb;
     }
 
-    private static InstructionsBuilder createOutputInstructions(final String outputType, final int outputValue) {
+    private static InstructionsBuilder createOutputInstructions(final String outputType, final Uint16 outputValue) {
         final List<Action> actionList = new ArrayList<>();
         final ActionBuilder ab = new ActionBuilder();
 
@@ -1006,7 +1008,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final OutputActionBuilder output = new OutputActionBuilder();
-        output.setMaxLength(Integer.valueOf(0xffff));
+        output.setMaxLength(Uint16.MAX_VALUE);
         final Uri value = new Uri(OutputPortValues.CONTROLLER.toString());
         output.setOutputNodeConnector(value);
         ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
@@ -1065,7 +1067,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final PushMplsActionBuilder push = new PushMplsActionBuilder();
-        push.setEthernetType(Integer.valueOf(0x8847));
+        push.setEthernetType(Uint16.valueOf(0x8847));
         ab.setAction(new PushMplsActionCaseBuilder().setPushMplsAction(push.build()).build());
         ab.withKey(new ActionKey(0));
         actionList.add(ab.build());
@@ -1092,7 +1094,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final PushPbbActionBuilder pbb = new PushPbbActionBuilder();
-        pbb.setEthernetType(Integer.valueOf(0x88E7));
+        pbb.setEthernetType(Uint16.valueOf(0x88E7));
         ab.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build());
         ab.withKey(new ActionKey(0));
         actionList.add(ab.build());
@@ -1119,7 +1121,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final PushVlanActionBuilder vlan = new PushVlanActionBuilder();
-        vlan.setEthernetType(Integer.valueOf(0x8100));
+        vlan.setEthernetType(Uint16.valueOf(0x8100));
         ab.setAction(new PushVlanActionCaseBuilder().setPushVlanAction(vlan.build()).build());
         ab.withKey(new ActionKey(0));
         actionList.add(ab.build());
@@ -1202,7 +1204,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final SetVlanIdActionBuilder vl = new SetVlanIdActionBuilder();
-        final VlanId a = new VlanId(4000);
+        final VlanId a = new VlanId(Uint16.valueOf(4000));
         vl.setVlanId(a);
         ab.setAction(new SetVlanIdActionCaseBuilder().setSetVlanIdAction(vl.build()).build());
         ab.withKey(new ActionKey(0));
@@ -1230,7 +1232,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final SetVlanPcpActionBuilder pcp = new SetVlanPcpActionBuilder();
-        final VlanPcp pcp1 = new VlanPcp((short) 2);
+        final VlanPcp pcp1 = new VlanPcp(Uint8.TWO);
         pcp.setVlanPcp(pcp1);
         ab.setAction(new SetVlanPcpActionCaseBuilder().setSetVlanPcpAction(pcp.build()).build());
         ab.withKey(new ActionKey(0));
@@ -1259,7 +1261,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
 
         final SetVlanPcpActionBuilder pcp = new SetVlanPcpActionBuilder();
         // the code point is a 3-bit(0-7) field representing the frame priority level
-        final VlanPcp pcp1 = new VlanPcp((short) 4);
+        final VlanPcp pcp1 = new VlanPcp(Uint8.valueOf(4));
         pcp.setVlanPcp(pcp1);
         ab.setAction(new SetVlanPcpActionCaseBuilder().setSetVlanPcpAction(pcp.build()).build());
         ab.withKey(new ActionKey(0));
@@ -1472,7 +1474,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final GroupActionBuilder groupActionB = new GroupActionBuilder();
-        groupActionB.setGroupId(1L);
+        groupActionB.setGroupId(Uint32.ONE);
         groupActionB.setGroup("0");
         ab.setAction(new GroupActionCaseBuilder().setGroupAction(groupActionB.build()).build());
         ab.withKey(new ActionKey(0));
@@ -1554,7 +1556,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final PopMplsActionBuilder popMplsActionBuilder = new PopMplsActionBuilder();
-        popMplsActionBuilder.setEthernetType(0XB);
+        popMplsActionBuilder.setEthernetType(Uint16.valueOf(0xB));
         ab.setAction(new PopMplsActionCaseBuilder().setPopMplsAction(popMplsActionBuilder.build()).build());
         ab.withKey(new ActionKey(0));
         actionList.add(ab.build());
@@ -1634,7 +1636,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final SetDlTypeActionBuilder setDlTypeActionBuilder = new SetDlTypeActionBuilder();
-        setDlTypeActionBuilder.setDlType(new EtherType(8L));
+        setDlTypeActionBuilder.setDlType(new EtherType(Uint32.valueOf(8)));
         ab.setAction(new SetDlTypeActionCaseBuilder().setSetDlTypeAction(setDlTypeActionBuilder.build()).build());
         ab.withKey(new ActionKey(0));
         actionList.add(ab.build());
@@ -1687,7 +1689,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final SetMplsTtlActionBuilder setMplsTtlActionBuilder = new SetMplsTtlActionBuilder();
-        setMplsTtlActionBuilder.setMplsTtl((short) 0X1);
+        setMplsTtlActionBuilder.setMplsTtl(Uint8.ONE);
         ab.setAction(new SetMplsTtlActionCaseBuilder().setSetMplsTtlAction(setMplsTtlActionBuilder.build()).build());
         ab.withKey(new ActionKey(0));
         actionList.add(ab.build());
@@ -1835,7 +1837,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final SetNwTtlActionBuilder setNwTtlActionBuilder = new SetNwTtlActionBuilder();
-        setNwTtlActionBuilder.setNwTtl((short) 1);
+        setNwTtlActionBuilder.setNwTtl(Uint8.ONE);
         ab.setAction(new SetNwTtlActionCaseBuilder().setSetNwTtlAction(setNwTtlActionBuilder.build()).build());
         ab.withKey(new ActionKey(0));
         actionList.add(ab.build());
@@ -1863,7 +1865,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final SetQueueActionBuilder setQueueActionBuilder = new SetQueueActionBuilder();
-        setQueueActionBuilder.setQueueId(1L);
+        setQueueActionBuilder.setQueueId(Uint32.ONE);
         ab.setAction(new SetQueueActionCaseBuilder().setSetQueueAction(setQueueActionBuilder.build()).build());
         ab.withKey(new ActionKey(0));
         actionList.add(ab.build());
@@ -1890,7 +1892,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final SetTpDstActionBuilder setTpDstActionBuilder = new SetTpDstActionBuilder();
-        setTpDstActionBuilder.setPort(new PortNumber(109));
+        setTpDstActionBuilder.setPort(new PortNumber(Uint16.valueOf(109)));
 
         ab.setAction(new SetTpDstActionCaseBuilder().setSetTpDstAction(setTpDstActionBuilder.build()).build());
         ab.withKey(new ActionKey(0));
@@ -1918,7 +1920,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ActionBuilder ab = new ActionBuilder();
 
         final SetTpSrcActionBuilder setTpSrcActionBuilder = new SetTpSrcActionBuilder();
-        setTpSrcActionBuilder.setPort(new PortNumber(109));
+        setTpSrcActionBuilder.setPort(new PortNumber(Uint16.valueOf(109)));
         ab.setAction(new SetTpSrcActionCaseBuilder().setSetTpSrcAction(setTpSrcActionBuilder.build()).build());
         ab.withKey(new ActionKey(0));
         actionList.add(ab.build());
@@ -2015,7 +2017,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         ethDestBuilder.setAddress(new MacAddress("00:00:00:00:00:02"));
         final EthernetMatchBuilder ethernetMatch2 = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x86ddL));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x86dd)));
 
         ethernetMatch.setEthernetSource(ethSourceBuilder.build());
         ethernetMatch1.setEthernetDestination(ethDestBuilder.build());
@@ -2064,8 +2066,8 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final VlanMatchBuilder vlanBuilder = new VlanMatchBuilder();
         final VlanMatchBuilder vlanBuilder1 = new VlanMatchBuilder();
         final VlanIdBuilder vlanIdBuilder = new VlanIdBuilder();
-        final VlanId vlanId = new VlanId(10);
-        final VlanPcp vpcp = new VlanPcp((short) 3);
+        final VlanId vlanId = new VlanId(Uint16.TEN);
+        final VlanPcp vpcp = new VlanPcp(Uint8.valueOf(3));
         vlanBuilder.setVlanPcp(vpcp);
         vlanBuilder1.setVlanId(vlanIdBuilder.setVlanId(vlanId).setVlanIdPresent(true).build());
         setFieldBuilder.setVlanMatch(vlanBuilder.build());
@@ -2106,10 +2108,10 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final IpMatchBuilder ipmatch = new IpMatchBuilder();
         final IpMatchBuilder ipmatch1 = new IpMatchBuilder();
         final IpMatchBuilder ipmatch2 = new IpMatchBuilder();
-        final Dscp dscp = new Dscp((short) 3);
+        final Dscp dscp = new Dscp(Uint8.valueOf(3));
         ipmatch.setIpDscp(dscp);
-        ipmatch1.setIpEcn((short) 2);
-        ipmatch2.setIpProtocol((short) 120);
+        ipmatch1.setIpEcn(Uint8.TWO);
+        ipmatch2.setIpProtocol(Uint8.valueOf(120));
         setFieldBuilder.setIpMatch(ipmatch.build());
         ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build());
         ab.withKey(new ActionKey(0));
@@ -2190,8 +2192,8 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final SetFieldBuilder setFieldBuilder1 = new SetFieldBuilder();
 
         // Tcp
-        final PortNumber tcpsrcport = new PortNumber(1213);
-        final PortNumber tcpdstport = new PortNumber(646);
+        final PortNumber tcpsrcport = new PortNumber(Uint16.valueOf(1213));
+        final PortNumber tcpdstport = new PortNumber(Uint16.valueOf(646));
         final TcpMatchBuilder tcpmatch = new TcpMatchBuilder();
         final TcpMatchBuilder tcpmatch1 = new TcpMatchBuilder();
         tcpmatch.setTcpSourcePort(tcpsrcport);
@@ -2231,8 +2233,8 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final SetFieldBuilder setFieldBuilder1 = new SetFieldBuilder();
 
         // Udp
-        final PortNumber udpsrcport = new PortNumber(1325);
-        final PortNumber udpdstport = new PortNumber(42);
+        final PortNumber udpsrcport = new PortNumber(Uint16.valueOf(1325));
+        final PortNumber udpdstport = new PortNumber(Uint16.valueOf(42));
         final UdpMatchBuilder udpmatch = new UdpMatchBuilder();
         final UdpMatchBuilder udpmatch1 = new UdpMatchBuilder();
         udpmatch.setUdpDestinationPort(udpdstport);
@@ -2274,8 +2276,8 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         // Sctp
         final SctpMatchBuilder sctpmatch = new SctpMatchBuilder();
         final SctpMatchBuilder sctpmatch1 = new SctpMatchBuilder();
-        final PortNumber srcport = new PortNumber(1435);
-        final PortNumber dstport = new PortNumber(22);
+        final PortNumber srcport = new PortNumber(Uint16.valueOf(1435));
+        final PortNumber dstport = new PortNumber(Uint16.valueOf(22));
         sctpmatch.setSctpSourcePort(srcport);
         sctpmatch1.setSctpDestinationPort(dstport);
         setFieldBuilder.setLayer4Match(sctpmatch.build());
@@ -2314,8 +2316,8 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         // Icmpv4
         final Icmpv4MatchBuilder icmpv4match = new Icmpv4MatchBuilder();
         final Icmpv4MatchBuilder icmpv4match1 = new Icmpv4MatchBuilder();
-        icmpv4match.setIcmpv4Type((short) 8);
-        icmpv4match1.setIcmpv4Code((short) 0);
+        icmpv4match.setIcmpv4Type(Uint8.valueOf(8));
+        icmpv4match1.setIcmpv4Code(Uint8.ZERO);
         setFieldBuilder.setIcmpv4Match(icmpv4match.build());
         ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build());
         ab.withKey(new ActionKey(0));
@@ -2371,7 +2373,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         arpsrc.setAddress(macsrc);
         final ArpTargetHardwareAddressBuilder arpdst = new ArpTargetHardwareAddressBuilder();
         arpdst.setAddress(macdest);
-        arpmatch.setArpOp(2);
+        arpmatch.setArpOp(Uint16.TWO);
         arpmatch1.setArpSourceHardwareAddress(arpsrc.build());
         arpmatch2.setArpTargetHardwareAddress(arpdst.build());
         arpmatch3.setArpSourceTransportAddress(srciparp);
@@ -2437,9 +2439,9 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final Ipv6Prefix dstip6 = new Ipv6Prefix("2002::2/128");
         final Ipv6Prefix srcip6 = new Ipv6Prefix("2001:0:0:0:0:0:0:1/128");
         final Ipv6ExtHeaderBuilder nextheader = new Ipv6ExtHeaderBuilder();
-        nextheader.setIpv6Exthdr(58);
+        nextheader.setIpv6Exthdr(Uint16.valueOf(58));
         final Ipv6LabelBuilder ipv6label = new Ipv6LabelBuilder();
-        final Ipv6FlowLabel label = new Ipv6FlowLabel(10028L);
+        final Ipv6FlowLabel label = new Ipv6FlowLabel(Uint32.valueOf(10028));
         ipv6label.setIpv6Flabel(label);
 
         ipv6Builder.setIpv6Source(srcip6);
@@ -2493,8 +2495,8 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         // Icmpv6
         final Icmpv6MatchBuilder icmpv6match = new Icmpv6MatchBuilder();
         final Icmpv6MatchBuilder icmpv6match1 = new Icmpv6MatchBuilder();
-        icmpv6match.setIcmpv6Type((short) 135);
-        icmpv6match1.setIcmpv6Code((short) 0);
+        icmpv6match.setIcmpv6Type(Uint8.valueOf(135));
+        icmpv6match1.setIcmpv6Code(Uint8.ZERO);
         setFieldBuilder.setIcmpv6Match(icmpv6match.build());
         ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build());
         ab.withKey(new ActionKey(0));
@@ -2534,9 +2536,9 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ProtocolMatchFieldsBuilder protomatch = new ProtocolMatchFieldsBuilder();
         final ProtocolMatchFieldsBuilder protomatch1 = new ProtocolMatchFieldsBuilder();
         final ProtocolMatchFieldsBuilder protomatch2 = new ProtocolMatchFieldsBuilder();
-        protomatch.setMplsLabel((long) 36008);
-        protomatch1.setMplsTc((short) 4);
-        protomatch2.setMplsBos((short) 1);
+        protomatch.setMplsLabel(Uint32.valueOf(36008));
+        protomatch1.setMplsTc(Uint8.valueOf(4));
+        protomatch2.setMplsBos(Uint8.ONE);
         setFieldBuilder.setProtocolMatchFields(protomatch.build());
         ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build());
         ab.withKey(new ActionKey(0));
@@ -2574,8 +2576,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
         // PBB
         final ProtocolMatchFieldsBuilder protomatch = new ProtocolMatchFieldsBuilder();
-        protomatch.setPbb(new PbbBuilder().setPbbIsid(4L).setPbbMask(
-                new BigInteger(new byte[]{0, 1, 0, 0}).longValue()).build());
+        protomatch.setPbb(new PbbBuilder().setPbbIsid(Uint32.valueOf(4)).setPbbMask(Uint32.valueOf(0x10000)).build());
         setFieldBuilder.setProtocolMatchFields(protomatch.build());
         ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build());
         actionList.add(ab.build());
@@ -2602,7 +2603,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
         // Tunnel
         final TunnelBuilder tunnel = new TunnelBuilder();
-        tunnel.setTunnelId(BigInteger.valueOf(10668));
+        tunnel.setTunnelId(Uint64.valueOf(10668));
         setFieldBuilder.setTunnel(tunnel.build());
         ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build());
         ab.withKey(new ActionKey(0));
@@ -2691,7 +2692,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final MatchBuilder match = new MatchBuilder();
         final EthernetMatchBuilder eth = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x88ccL));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x88cc)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
         return match;
@@ -2707,7 +2708,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
 
         final EthernetMatchBuilder eth = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x0800L));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x0800)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
         return match;
@@ -2723,7 +2724,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
 
         final EthernetMatchBuilder eth = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x0800L));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x0800)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
         return match;
@@ -2745,7 +2746,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final MatchBuilder match = new MatchBuilder();
         final EthernetMatchBuilder eth = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x86ddL));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x86dd)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
 
@@ -2758,8 +2759,8 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final Icmpv6MatchBuilder icmpv6match = new Icmpv6MatchBuilder();
 
         // match
-        icmpv6match.setIcmpv6Type((short) 135);
-        icmpv6match.setIcmpv6Code((short) 1);
+        icmpv6match.setIcmpv6Type(Uint8.valueOf(135));
+        icmpv6match.setIcmpv6Code(Uint8.ONE);
         match.setIcmpv6Match(icmpv6match.build());
 
         return match;
@@ -2776,7 +2777,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
 
         final EthernetMatchBuilder eth = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0xfffeL));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0xfffe)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
         return match;
@@ -2794,7 +2795,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final EthernetMatchBuilder ethmatch = new EthernetMatchBuilder(); // ethernettype
         // match
         final EthernetTypeBuilder ethtype = new EthernetTypeBuilder();
-        final EtherType type = new EtherType(0x0800L);
+        final EtherType type = new EtherType(Uint32.valueOf(0x0800));
         ethmatch.setEthernetType(ethtype.setType(type).build());
 
         final EthernetDestinationBuilder ethdest = new EthernetDestinationBuilder(); // ethernet
@@ -2822,8 +2823,8 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         // vlan match
         final VlanMatchBuilder vlanBuilder = new VlanMatchBuilder();
         final VlanIdBuilder vlanIdBuilder = new VlanIdBuilder();
-        final VlanId vlanId = new VlanId(10);
-        final VlanPcp vpcp = new VlanPcp((short) 3);
+        final VlanId vlanId = new VlanId(Uint16.TEN);
+        final VlanPcp vpcp = new VlanPcp(Uint8.valueOf(3));
         vlanBuilder.setVlanPcp(vpcp);
         vlanIdBuilder.setVlanId(vlanId);
         vlanIdBuilder.setVlanIdPresent(true);
@@ -2840,7 +2841,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final MacAddress macsrc = new MacAddress(SRC_MAC_ADDRESS);
 
         final EthernetTypeBuilder ethtype = new EthernetTypeBuilder();
-        final EtherType type = new EtherType(0x0806L);
+        final EtherType type = new EtherType(Uint32.valueOf(0x0806));
         ethmatch.setEthernetType(ethtype.setType(type).build());
 
         // ipv4 match
@@ -2855,7 +2856,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final ArpTargetHardwareAddressBuilder arpdst = new ArpTargetHardwareAddressBuilder();
         arpdst.setAddress(macdest);
         arpdst.setMask(new MacAddress("ff:ff:00:00:00:00"));
-        arpmatch.setArpOp(2);
+        arpmatch.setArpOp(Uint16.TWO);
         arpmatch.setArpSourceHardwareAddress(arpsrc.build());
         arpmatch.setArpTargetHardwareAddress(arpdst.build());
         arpmatch.setArpSourceTransportAddress(srcip);
@@ -2872,23 +2873,21 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
 
         final EthernetMatchBuilder eth = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x86ddL));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x86dd)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
 
         final MacAddress ndsll = new MacAddress("c2:00:54:f5:00:00");
         final MacAddress ndtll = new MacAddress("00:0c:29:0e:4c:67");
-        final Ipv6ExtHeaderBuilder nextheader = new Ipv6ExtHeaderBuilder();
-        nextheader.setIpv6Exthdr(58);
         final Ipv6LabelBuilder ipv6label = new Ipv6LabelBuilder();
-        final Ipv6FlowLabel label = new Ipv6FlowLabel(10028L);
+        final Ipv6FlowLabel label = new Ipv6FlowLabel(Uint32.valueOf(10028));
         ipv6label.setIpv6Flabel(label);
-        ipv6label.setFlabelMask(new Ipv6FlowLabel(1L));
+        ipv6label.setFlabelMask(new Ipv6FlowLabel(Uint32.ONE));
 
         final Icmpv6MatchBuilder icmpv6match = new Icmpv6MatchBuilder(); // icmpv6
         // match
-        icmpv6match.setIcmpv6Type((short) 135);
-        icmpv6match.setIcmpv6Code((short) 0);
+        icmpv6match.setIcmpv6Type(Uint8.valueOf(135));
+        icmpv6match.setIcmpv6Code(Uint8.ZERO);
         match.setIcmpv6Match(icmpv6match.build());
 
         final Ipv6MatchBuilder ipv6match = new Ipv6MatchBuilder();
@@ -2909,18 +2908,18 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final MatchBuilder match = new MatchBuilder();
         final EthernetMatchBuilder eth = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x0800L));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x0800)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
 
         final IpMatchBuilder ipmatch = new IpMatchBuilder(); // ipv4 version
-        ipmatch.setIpProtocol((short) 1);
+        ipmatch.setIpProtocol(Uint8.ONE);
         match.setIpMatch(ipmatch.build());
 
         final Icmpv4MatchBuilder icmpv4match = new Icmpv4MatchBuilder(); // icmpv4
         // match
-        icmpv4match.setIcmpv4Type((short) 8);
-        icmpv4match.setIcmpv4Code((short) 0);
+        icmpv4match.setIcmpv4Type(Uint8.valueOf(8));
+        icmpv4match.setIcmpv4Code(Uint8.ZERO);
         match.setIcmpv4Match(icmpv4match.build());
         return match;
     }
@@ -2930,18 +2929,18 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final MatchBuilder match = new MatchBuilder();
         final EthernetMatchBuilder eth = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x86ddL));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x86dd)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
 
         final IpMatchBuilder ipmatch = new IpMatchBuilder(); // ipv4 version
-        ipmatch.setIpProtocol((short) 58);
+        ipmatch.setIpProtocol(Uint8.valueOf(58));
         match.setIpMatch(ipmatch.build());
 
         final Icmpv6MatchBuilder icmpv6match = new Icmpv6MatchBuilder(); // icmpv6
         // match
-        icmpv6match.setIcmpv6Type((short) 135);
-        icmpv6match.setIcmpv6Code((short) 1);
+        icmpv6match.setIcmpv6Type(Uint8.valueOf(135));
+        icmpv6match.setIcmpv6Code(Uint8.ONE);
         match.setIcmpv6Match(icmpv6match.build());
 
         return match;
@@ -2951,13 +2950,13 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         final MatchBuilder match = new MatchBuilder();
         final EthernetMatchBuilder ethmatch = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethtype = new EthernetTypeBuilder();
-        final EtherType type = new EtherType(0x0800L);
+        final EtherType type = new EtherType(Uint32.valueOf(0x0800));
         ethmatch.setEthernetType(ethtype.setType(type).build());
         match.setEthernetMatch(ethmatch.build());
 
         final IpMatchBuilder ipmatch = new IpMatchBuilder(); // ipv4 version
-        ipmatch.setIpProtocol((short) 6);
-        final Dscp dscp = new Dscp((short) 8);
+        ipmatch.setIpProtocol(Uint8.valueOf(6));
+        final Dscp dscp = new Dscp(Uint8.valueOf(8));
         ipmatch.setIpDscp(dscp);
         match.setIpMatch(ipmatch.build());
         return match;
@@ -2968,16 +2967,16 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
 
         final EthernetMatchBuilder eth = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x0800L));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x0800)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
 
         final IpMatchBuilder ipmatch = new IpMatchBuilder(); // ipv4 version
-        ipmatch.setIpProtocol((short) 6);
+        ipmatch.setIpProtocol(Uint8.valueOf(6));
         match.setIpMatch(ipmatch.build());
 
-        final PortNumber srcport = new PortNumber(1213);
-        final PortNumber dstport = new PortNumber(646);
+        final PortNumber srcport = new PortNumber(Uint16.valueOf(1213));
+        final PortNumber dstport = new PortNumber(Uint16.valueOf(646));
         final TcpMatchBuilder tcpmatch = new TcpMatchBuilder(); // tcp match
         tcpmatch.setTcpSourcePort(srcport);
         tcpmatch.setTcpDestinationPort(dstport);
@@ -2991,16 +2990,16 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
 
         final EthernetMatchBuilder eth = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x0800L));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x0800)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
 
         final IpMatchBuilder ipmatch = new IpMatchBuilder(); // ipv4 version
-        ipmatch.setIpProtocol((short) 17);
+        ipmatch.setIpProtocol(Uint8.valueOf(17));
         match.setIpMatch(ipmatch.build());
 
-        final PortNumber srcport = new PortNumber(1325);
-        final PortNumber dstport = new PortNumber(42);
+        final PortNumber srcport = new PortNumber(Uint16.valueOf(1325));
+        final PortNumber dstport = new PortNumber(Uint16.valueOf(42));
         final UdpMatchBuilder udpmatch = new UdpMatchBuilder(); // udp match
         udpmatch.setUdpDestinationPort(dstport);
         udpmatch.setUdpSourcePort(srcport);
@@ -3014,17 +3013,17 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
 
         final EthernetMatchBuilder eth = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x0800L));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x0800)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
 
         final IpMatchBuilder ipmatch = new IpMatchBuilder(); // ipv4 version
-        ipmatch.setIpProtocol((short) 132);
+        ipmatch.setIpProtocol(Uint8.valueOf(132));
         match.setIpMatch(ipmatch.build());
 
         final SctpMatchBuilder sctpmatch = new SctpMatchBuilder();
-        final PortNumber srcport = new PortNumber(1435);
-        final PortNumber dstport = new PortNumber(22);
+        final PortNumber srcport = new PortNumber(Uint16.valueOf(1435));
+        final PortNumber dstport = new PortNumber(Uint16.valueOf(22));
         sctpmatch.setSctpSourcePort(srcport);
         sctpmatch.setSctpDestinationPort(dstport);
         match.setLayer4Match(sctpmatch.build());
@@ -3034,10 +3033,9 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
 
     private static MatchBuilder createMetadataMatch() {
         final MatchBuilder match = new MatchBuilder();
-        final byte[] metamask = new byte[]{(byte) -1, (byte) -1, (byte) -1, 0, 0, 0, (byte) 1, (byte) 1};
         final MetadataBuilder metadata = new MetadataBuilder(); // metadata match
-        metadata.setMetadata(BigInteger.valueOf(500L));
-        metadata.setMetadataMask(new BigInteger(1, metamask));
+        metadata.setMetadata(Uint64.valueOf(500));
+        metadata.setMetadataMask(Uint64.valueOf(0xFFFFFF00_00000101L));
         match.setMetadata(metadata.build());
 
         return match;
@@ -3048,15 +3046,15 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
 
         final EthernetMatchBuilder eth = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x8847L));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x8847)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
 
         final ProtocolMatchFieldsBuilder protomatch = new ProtocolMatchFieldsBuilder(); // mpls
         // match
-        protomatch.setMplsLabel((long) 36008);
-        protomatch.setMplsTc((short) 4);
-        protomatch.setMplsBos((short) 1);
+        protomatch.setMplsLabel(Uint32.valueOf(36008));
+        protomatch.setMplsTc(Uint8.valueOf(4));
+        protomatch.setMplsBos(Uint8.ONE);
         match.setProtocolMatchFields(protomatch.build());
 
         return match;
@@ -3068,14 +3066,13 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
 
         final EthernetMatchBuilder eth = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x88E7L));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x88E7)));
         eth.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(eth.build());
 
         final ProtocolMatchFieldsBuilder protomatch = new ProtocolMatchFieldsBuilder(); // mpls
         // match
-        protomatch.setPbb(new PbbBuilder().setPbbIsid(4L).setPbbMask(
-                new BigInteger(new byte[]{0, 1, 0, 0}).longValue()).build());
+        protomatch.setPbb(new PbbBuilder().setPbbIsid(Uint32.valueOf(4)).setPbbMask(Uint32.valueOf(0x10000)).build());
         match.setProtocolMatchFields(protomatch.build());
 
         return match;
@@ -3085,9 +3082,8 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
     private static MatchBuilder createTunnelIDMatch() {
         final MatchBuilder match = new MatchBuilder();
         final TunnelBuilder tunnel = new TunnelBuilder(); // tunnel id match
-        tunnel.setTunnelId(BigInteger.valueOf(10668));
-        final byte[] mask = new byte[]{(byte) -1, (byte) -1, (byte) -1, 0, 0, 0, (byte) 1, (byte) 1};
-        tunnel.setTunnelMask(new BigInteger(1, mask));
+        tunnel.setTunnelId(Uint64.valueOf(10668));
+        tunnel.setTunnelMask(Uint64.valueOf(0xFFFFFF00_00000101L));
         match.setTunnel(tunnel.build());
 
         return match;
@@ -3105,17 +3101,17 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         // Ethertype match
         final EthernetMatchBuilder ethernetType = new EthernetMatchBuilder();
         final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(0x0800L));
+        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x0800)));
         ethernetType.setEthernetType(ethTypeBuilder.build());
         match.setEthernetMatch(ethernetType.build());
 
         // TCP Protocol Match
         final IpMatchBuilder ipMatch = new IpMatchBuilder(); // ipv4 version
-        ipMatch.setIpProtocol((short) 6);
+        ipMatch.setIpProtocol(Uint8.valueOf(6));
         match.setIpMatch(ipMatch.build());
 
         // TCP Port Match
-        final PortNumber dstPort = new PortNumber(80);
+        final PortNumber dstPort = new PortNumber(Uint16.valueOf(80));
         final TcpMatchBuilder tcpMatch = new TcpMatchBuilder();
         tcpMatch.setTcpDestinationPort(dstPort);
         match.setLayer4Match(tcpMatch.build());
@@ -3126,7 +3122,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
          * TCP_ECE 0x040 / TCP_CWR 0x080 / TCP_NS  0x100
          */
         final TcpFlagsMatchBuilder tcpFlagsMatch = new TcpFlagsMatchBuilder();
-        tcpFlagsMatch.setTcpFlags(0x002);
+        tcpFlagsMatch.setTcpFlags(Uint16.valueOf(0x002));
         match.setTcpFlagsMatch(tcpFlagsMatch.build());
 
         return match;
@@ -3146,9 +3142,9 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
                 .augmentation(FlowCapableNode.class).child(Table.class, new TableKey(tf.getTableId()))
                 .child(Flow.class, tf.key());
         modification.delete(LogicalDatastoreType.CONFIGURATION, path1);
-        modification.commit().addCallback(new FutureCallback<Object>() {
+        modification.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(final Object notUsed) {
+            public void onSuccess(final CommitInfo notUsed) {
                 ci.println("Status of Group Data Loaded Transaction: success.");
             }
 
@@ -3185,9 +3181,9 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         modification.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION,
                 nodeBuilderToInstanceId(nodeBuilder), nodeBuilder.build());
         modification.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, path1, flow.build());
-        modification.commit().addCallback(new FutureCallback<Object>() {
+        modification.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
-            public void onSuccess(final Object notUsed) {
+            public void onSuccess(final CommitInfo notUsed) {
                 ci.println("Status of Group Data Loaded Transaction: success.");
             }