[ONOS-6809] Implementation for packet out in p4Runtime
Change-Id: I873a1fd18529fe9fd41aa33f862298892ece7d1c
diff --git a/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineInterpreter.java b/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineInterpreter.java
index e71d910..25962ca 100644
--- a/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineInterpreter.java
+++ b/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineInterpreter.java
@@ -23,7 +23,7 @@
import org.onosproject.net.flow.criteria.Criterion;
import org.onosproject.net.packet.OutboundPacket;
import org.onosproject.net.pi.runtime.PiHeaderFieldId;
-import org.onosproject.net.pi.runtime.PiPacketMetadata;
+import org.onosproject.net.pi.runtime.PiPacketOperation;
import org.onosproject.net.pi.runtime.PiTableAction;
import org.onosproject.net.pi.runtime.PiTableId;
@@ -79,15 +79,15 @@
throws PiInterpreterException;
/**
- * Returns a collection of metadatas for a packet-out operation that are equivalent to
- * the traffic treatment of the given OutboundPacket, for the given pipeline configuration.
+ * Returns a collection of packet operations equivalent to the given OutboundPacket, for the given
+ * pipeline configuration.
*
* @param packet a ONOS outbound packet
* @param pipeconf a pipeline configuration
- * @return a collection of packet metadata
+ * @return a collection of packet operations
* @throws PiInterpreterException if the packet treatments cannot be mapped to any metadata
*/
- Collection<PiPacketMetadata> mapOutboundPacket(OutboundPacket packet, PiPipeconf pipeconf)
+ Collection<PiPacketOperation> mapOutboundPacket(OutboundPacket packet, PiPipeconf pipeconf)
throws PiInterpreterException;
/**
diff --git a/core/net/src/test/java/org/onosproject/net/pi/impl/MockInterpreter.java b/core/net/src/test/java/org/onosproject/net/pi/impl/MockInterpreter.java
index ddee2ca..14e698d 100644
--- a/core/net/src/test/java/org/onosproject/net/pi/impl/MockInterpreter.java
+++ b/core/net/src/test/java/org/onosproject/net/pi/impl/MockInterpreter.java
@@ -17,6 +17,7 @@
package org.onosproject.net.pi.impl;
import com.google.common.collect.ImmutableBiMap;
+import com.google.common.collect.ImmutableList;
import org.onlab.util.ImmutableByteSequence;
import org.onosproject.net.PortNumber;
import org.onosproject.net.driver.AbstractHandlerBehaviour;
@@ -31,7 +32,7 @@
import org.onosproject.net.pi.runtime.PiActionParam;
import org.onosproject.net.pi.runtime.PiActionParamId;
import org.onosproject.net.pi.runtime.PiHeaderFieldId;
-import org.onosproject.net.pi.runtime.PiPacketMetadata;
+import org.onosproject.net.pi.runtime.PiPacketOperation;
import org.onosproject.net.pi.runtime.PiTableAction;
import org.onosproject.net.pi.runtime.PiTableId;
@@ -102,9 +103,9 @@
}
@Override
- public Collection<PiPacketMetadata> mapOutboundPacket(OutboundPacket packet, PiPipeconf pipeconf)
+ public Collection<PiPacketOperation> mapOutboundPacket(OutboundPacket packet, PiPipeconf pipeconf)
throws PiInterpreterException {
- return null;
+ return ImmutableList.of();
}
/**