NextId should be int instead of byte
Change-Id: I58b1dc7181eadc83dc6782756e631c241f62b15b
diff --git a/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/pipeliner/FabricForwardingPipeliner.java b/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/pipeliner/FabricForwardingPipeliner.java
index c4ecdfd..bdc6d5e 100644
--- a/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/pipeliner/FabricForwardingPipeliner.java
+++ b/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/pipeliner/FabricForwardingPipeliner.java
@@ -19,7 +19,6 @@
import com.google.common.collect.ImmutableSet;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
-import org.onlab.util.ImmutableByteSequence;
import org.onosproject.net.DeviceId;
import org.onosproject.net.flow.DefaultFlowRule;
import org.onosproject.net.flow.DefaultTrafficSelector;
@@ -255,8 +254,7 @@
treatment = fwd.treatment();
if (fwd.nextId() != null) {
- PiActionParam nextIdParam = new PiActionParam(FabricConstants.NEXT_ID,
- ImmutableByteSequence.copyFrom(fwd.nextId().byteValue()));
+ PiActionParam nextIdParam = new PiActionParam(FabricConstants.NEXT_ID, fwd.nextId());
PiAction nextIdAction = PiAction.builder()
.withId(FabricConstants.FABRIC_INGRESS_FORWARDING_POP_MPLS_AND_NEXT)
.withParameter(nextIdParam)
@@ -291,8 +289,7 @@
* @return treatment with set_next_id action; empty treatment if next id is null
*/
private static TrafficTreatment buildSetNextIdTreatment(Integer nextId, PiActionId actionId) {
- PiActionParam nextIdParam = new PiActionParam(FabricConstants.NEXT_ID,
- ImmutableByteSequence.copyFrom(nextId.byteValue()));
+ PiActionParam nextIdParam = new PiActionParam(FabricConstants.NEXT_ID, nextId);
PiAction nextIdAction = PiAction.builder()
.withId(actionId)
.withParameter(nextIdParam)
diff --git a/pipelines/fabric/src/test/java/org/onosproject/pipelines/fabric/pipeliner/FabricForwardingPipelineTest.java b/pipelines/fabric/src/test/java/org/onosproject/pipelines/fabric/pipeliner/FabricForwardingPipelineTest.java
index fdeb7a4..77bb035 100644
--- a/pipelines/fabric/src/test/java/org/onosproject/pipelines/fabric/pipeliner/FabricForwardingPipelineTest.java
+++ b/pipelines/fabric/src/test/java/org/onosproject/pipelines/fabric/pipeliner/FabricForwardingPipelineTest.java
@@ -22,7 +22,6 @@
import org.onlab.packet.IPv4;
import org.onlab.packet.TpPort;
import org.onlab.packet.UDP;
-import org.onlab.util.ImmutableByteSequence;
import org.onosproject.net.flow.DefaultFlowRule;
import org.onosproject.net.flow.DefaultTrafficSelector;
import org.onosproject.net.flow.DefaultTrafficTreatment;
@@ -240,8 +239,7 @@
.matchMplsLabel(MPLS_10)
.build();
- PiActionParam nextIdParam = new PiActionParam(FabricConstants.NEXT_ID,
- ImmutableByteSequence.copyFrom(NEXT_ID_1.byteValue()));
+ PiActionParam nextIdParam = new PiActionParam(FabricConstants.NEXT_ID, NEXT_ID_1);
PiAction setNextIdAction = PiAction.builder()
.withId(FabricConstants.FABRIC_INGRESS_FORWARDING_POP_MPLS_AND_NEXT)
.withParameter(nextIdParam)
@@ -260,8 +258,7 @@
// Ref: RoutingRulePopulator.java->revokeIpRuleForRouter
setNextIdTreatment = DefaultTrafficTreatment.builder().build();
} else {
- PiActionParam nextIdParam = new PiActionParam(FabricConstants.NEXT_ID,
- ImmutableByteSequence.copyFrom(nextId.byteValue()));
+ PiActionParam nextIdParam = new PiActionParam(FabricConstants.NEXT_ID, nextId);
PiAction.Builder setNextIdAction = PiAction.builder()
.withParameter(nextIdParam);