alshabib
Committed by Gerrit Code Review

decoupling extension types from of protocol

numbers renaming extension instruction to
extension treatment

Change-Id: Ie949d6235c2a5a984f7c7867262f8336721f1ee7
Showing 17 changed files with 95 additions and 92 deletions
......@@ -18,14 +18,14 @@ package org.onosproject.net.behaviour;
import com.google.common.annotations.Beta;
import org.onosproject.net.driver.HandlerBehaviour;
import org.onosproject.net.flow.instructions.ExtensionInstruction;
import org.onosproject.net.flow.instructions.ExtensionType;
import org.onosproject.net.flow.instructions.ExtensionTreatment;
import org.onosproject.net.flow.instructions.ExtensionTreatmentType;
/**
* Provides access to the extension implemented by this driver.
*/
@Beta
public interface ExtensionResolver extends HandlerBehaviour {
public interface ExtensionTreatmentResolver extends HandlerBehaviour {
/**
* Gets an extension instruction instance of the specified type, if supported
......@@ -36,5 +36,5 @@ public interface ExtensionResolver extends HandlerBehaviour {
* @throws UnsupportedOperationException if the extension type is not
* supported by this driver
*/
ExtensionInstruction getExtensionInstruction(ExtensionType type);
ExtensionTreatment getExtensionInstruction(ExtensionTreatmentType type);
}
......
......@@ -30,7 +30,7 @@ import org.onosproject.core.GroupId;
import org.onosproject.net.DeviceId;
import org.onosproject.net.IndexedLambda;
import org.onosproject.net.PortNumber;
import org.onosproject.net.flow.instructions.ExtensionInstruction;
import org.onosproject.net.flow.instructions.ExtensionTreatment;
import org.onosproject.net.flow.instructions.Instruction;
import org.onosproject.net.flow.instructions.Instructions;
import org.onosproject.net.meter.MeterId;
......@@ -489,7 +489,7 @@ public final class DefaultTrafficTreatment implements TrafficTreatment {
}
@Override
public TrafficTreatment.Builder extension(ExtensionInstruction extension,
public TrafficTreatment.Builder extension(ExtensionTreatment extension,
DeviceId deviceId) {
return add(Instructions.extension(extension, deviceId));
}
......
......@@ -26,7 +26,7 @@ import org.onlab.packet.VlanId;
import org.onosproject.core.GroupId;
import org.onosproject.net.DeviceId;
import org.onosproject.net.PortNumber;
import org.onosproject.net.flow.instructions.ExtensionInstruction;
import org.onosproject.net.flow.instructions.ExtensionTreatment;
import org.onosproject.net.flow.instructions.Instruction;
import org.onosproject.net.flow.instructions.Instructions;
import org.onosproject.net.meter.MeterId;
......@@ -430,7 +430,7 @@ public interface TrafficTreatment {
* @param deviceId device ID
* @return a treatment builder
*/
Builder extension(ExtensionInstruction extension, DeviceId deviceId);
Builder extension(ExtensionTreatment extension, DeviceId deviceId);
/**
* Builds an immutable traffic treatment descriptor.
......
......@@ -23,7 +23,7 @@ import java.util.List;
/**
* Abstract implementation of the set/get property methods of ExtensionInstruction.
*/
public abstract class AbstractExtensionInstruction implements ExtensionInstruction {
public abstract class AbstractExtensionTreatment implements ExtensionTreatment {
private static final String INVALID_KEY = "Invalid property key: ";
private static final String INVALID_TYPE = "Given type does not match field type: ";
......
......@@ -21,14 +21,14 @@ import java.util.List;
/**
* An extensible instruction type.
*/
public interface ExtensionInstruction {
public interface ExtensionTreatment {
/**
* Gets the type of the extension instruction.
*
* @return type
*/
ExtensionType type();
ExtensionTreatmentType type();
/**
* Sets a property on the extension instruction.
......
......@@ -25,25 +25,26 @@ import java.util.Objects;
* Type of extension instructions.
*/
@Beta
public final class ExtensionType {
public final class ExtensionTreatmentType {
/**
* A list of well-known named extension instruction type codes.
* These numbers have no impact on the actual OF type id.
*/
public enum ExtensionTypes {
public enum ExtensionTreatmentTypes {
// TODO fix type numbers to include experimenter id
NICIRA_SET_TUNNEL_DST(31),
NICIRA_RESUBMIT(32);
NICIRA_SET_TUNNEL_DST(0),
NICIRA_RESUBMIT(1);
private ExtensionType type;
private ExtensionTreatmentType type;
/**
* Creates a new named extension instruction type.
*
* @param type type code
*/
ExtensionTypes(int type) {
this.type = new ExtensionType(type);
ExtensionTreatmentTypes(int type) {
this.type = new ExtensionTreatmentType(type);
}
/**
......@@ -51,7 +52,7 @@ public final class ExtensionType {
*
* @return extension type object
*/
public ExtensionType type() {
public ExtensionTreatmentType type() {
return type;
}
}
......@@ -63,7 +64,7 @@ public final class ExtensionType {
*
* @param type type code
*/
public ExtensionType(int type) {
public ExtensionTreatmentType(int type) {
this.type = type;
}
......@@ -77,8 +78,8 @@ public final class ExtensionType {
if (this == obj) {
return true;
}
if (obj instanceof ExtensionType) {
final ExtensionType that = (ExtensionType) obj;
if (obj instanceof ExtensionTreatmentType) {
final ExtensionTreatmentType that = (ExtensionTreatmentType) obj;
return this.type == that.type;
}
return false;
......@@ -86,7 +87,7 @@ public final class ExtensionType {
@Override
public String toString() {
return MoreObjects.toStringHelper(ExtensionType.class)
return MoreObjects.toStringHelper(ExtensionTreatmentType.class)
.add("type", type)
.toString();
}
......
......@@ -489,7 +489,7 @@ public final class Instructions {
* @param deviceId device ID
* @return extension instruction
*/
public static ExtensionInstructionWrapper extension(ExtensionInstruction extension,
public static ExtensionInstructionWrapper extension(ExtensionTreatment extension,
DeviceId deviceId) {
checkNotNull(extension, "Extension instruction cannot be null");
checkNotNull(deviceId, "Device ID cannot be null");
......@@ -858,16 +858,16 @@ public final class Instructions {
* Extension instruction.
*/
public static class ExtensionInstructionWrapper implements Instruction {
private final ExtensionInstruction extensionInstruction;
private final ExtensionTreatment extensionTreatment;
private final DeviceId deviceId;
ExtensionInstructionWrapper(ExtensionInstruction extension, DeviceId deviceId) {
extensionInstruction = extension;
ExtensionInstructionWrapper(ExtensionTreatment extension, DeviceId deviceId) {
extensionTreatment = extension;
this.deviceId = deviceId;
}
public ExtensionInstruction extensionInstruction() {
return extensionInstruction;
public ExtensionTreatment extensionInstruction() {
return extensionTreatment;
}
public DeviceId deviceId() {
......@@ -882,14 +882,14 @@ public final class Instructions {
@Override
public String toString() {
return toStringHelper(type().toString())
.add("extension", extensionInstruction)
.add("extension", extensionTreatment)
.add("deviceId", deviceId)
.toString();
}
@Override
public int hashCode() {
return Objects.hash(type().ordinal(), extensionInstruction, deviceId);
return Objects.hash(type().ordinal(), extensionTreatment, deviceId);
}
@Override
......@@ -899,7 +899,7 @@ public final class Instructions {
}
if (obj instanceof ExtensionInstructionWrapper) {
ExtensionInstructionWrapper that = (ExtensionInstructionWrapper) obj;
return Objects.equals(extensionInstruction, that.extensionInstruction)
return Objects.equals(extensionTreatment, that.extensionTreatment)
&& Objects.equals(deviceId, that.deviceId);
}
......
......@@ -22,13 +22,13 @@ import com.esotericsoftware.kryo.io.Input;
import com.esotericsoftware.kryo.io.Output;
import org.onlab.osgi.DefaultServiceDirectory;
import org.onosproject.net.DeviceId;
import org.onosproject.net.behaviour.ExtensionResolver;
import org.onosproject.net.behaviour.ExtensionTreatmentResolver;
import org.onosproject.net.driver.DefaultDriverData;
import org.onosproject.net.driver.DefaultDriverHandler;
import org.onosproject.net.driver.DriverHandler;
import org.onosproject.net.driver.DriverService;
import org.onosproject.net.flow.instructions.ExtensionInstruction;
import org.onosproject.net.flow.instructions.ExtensionType;
import org.onosproject.net.flow.instructions.ExtensionTreatment;
import org.onosproject.net.flow.instructions.ExtensionTreatmentType;
import org.onosproject.net.flow.instructions.Instructions;
/**
......@@ -53,16 +53,16 @@ public class ExtensionInstructionSerializer extends
@Override
public Instructions.ExtensionInstructionWrapper read(Kryo kryo, Input input,
Class<Instructions.ExtensionInstructionWrapper> type) {
ExtensionType exType = (ExtensionType) kryo.readClassAndObject(input);
ExtensionTreatmentType exType = (ExtensionTreatmentType) kryo.readClassAndObject(input);
DeviceId deviceId = (DeviceId) kryo.readClassAndObject(input);
DriverService driverService = DefaultServiceDirectory.getService(DriverService.class);
DriverHandler handler = new DefaultDriverHandler(
new DefaultDriverData(driverService.getDriver(deviceId), deviceId));
ExtensionResolver resolver = handler.behaviour(ExtensionResolver.class);
ExtensionTreatmentResolver resolver = handler.behaviour(ExtensionTreatmentResolver.class);
ExtensionInstruction instruction = resolver.getExtensionInstruction(exType);
ExtensionTreatment instruction = resolver.getExtensionInstruction(exType);
byte[] bytes = (byte[]) kryo.readClassAndObject(input);
......
......@@ -129,7 +129,7 @@ import org.onosproject.net.flow.criteria.TunnelIdCriterion;
import org.onosproject.net.flow.criteria.UdpPortCriterion;
import org.onosproject.net.flow.criteria.VlanIdCriterion;
import org.onosproject.net.flow.criteria.VlanPcpCriterion;
import org.onosproject.net.flow.instructions.ExtensionType;
import org.onosproject.net.flow.instructions.ExtensionTreatmentType;
import org.onosproject.net.flow.instructions.Instructions;
import org.onosproject.net.flow.instructions.L0ModificationInstruction;
import org.onosproject.net.flow.instructions.L1ModificationInstruction;
......@@ -455,7 +455,7 @@ public final class KryoNamespaces {
.register(new DefaultOutboundPacketSerializer(), DefaultOutboundPacket.class)
.register(new AnnotationsSerializer(), DefaultAnnotations.class)
.register(new ExtensionInstructionSerializer(), Instructions.ExtensionInstructionWrapper.class)
.register(ExtensionType.class)
.register(ExtensionTreatmentType.class)
.register(Versioned.class)
.register(MapEvent.class)
.register(MapEvent.Type.class)
......
......@@ -17,11 +17,11 @@
package org.onosproject.driver.extensions;
import org.onlab.packet.Ip4Address;
import org.onosproject.net.behaviour.ExtensionResolver;
import org.onosproject.net.behaviour.ExtensionTreatmentResolver;
import org.onosproject.net.driver.AbstractHandlerBehaviour;
import org.onosproject.net.flow.instructions.ExtensionInstruction;
import org.onosproject.net.flow.instructions.ExtensionType;
import org.onosproject.openflow.controller.ExtensionInterpreter;
import org.onosproject.net.flow.instructions.ExtensionTreatment;
import org.onosproject.net.flow.instructions.ExtensionTreatmentType;
import org.onosproject.openflow.controller.ExtensionTreatmentInterpreter;
import org.projectfloodlight.openflow.protocol.OFActionType;
import org.projectfloodlight.openflow.protocol.OFFactory;
import org.projectfloodlight.openflow.protocol.action.OFAction;
......@@ -33,36 +33,38 @@ import org.projectfloodlight.openflow.types.IPv4Address;
/**
* Interpreter for Nicira OpenFlow extensions.
*/
public class NiciraExtensionInterpreter extends AbstractHandlerBehaviour
implements ExtensionInterpreter, ExtensionResolver {
public class NiciraExtensionTreatmentInterpreter extends AbstractHandlerBehaviour
implements ExtensionTreatmentInterpreter, ExtensionTreatmentResolver {
@Override
public boolean supported(ExtensionType extensionType) {
if (extensionType.equals(ExtensionType.ExtensionTypes.NICIRA_SET_TUNNEL_DST.type())) {
public boolean supported(ExtensionTreatmentType extensionTreatmentType) {
if (extensionTreatmentType.equals(
ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_TUNNEL_DST.type())) {
return true;
}
if (extensionType.equals(ExtensionType.ExtensionTypes.NICIRA_RESUBMIT.type())) {
if (extensionTreatmentType.equals(
ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_RESUBMIT.type())) {
return true;
}
return false;
}
@Override
public OFAction mapInstruction(OFFactory factory, ExtensionInstruction extensionInstruction) {
ExtensionType type = extensionInstruction.type();
if (type.equals(ExtensionType.ExtensionTypes.NICIRA_SET_TUNNEL_DST.type())) {
NiciraSetTunnelDst tunnelDst = (NiciraSetTunnelDst) extensionInstruction;
public OFAction mapInstruction(OFFactory factory, ExtensionTreatment extensionTreatment) {
ExtensionTreatmentType type = extensionTreatment.type();
if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_TUNNEL_DST.type())) {
NiciraSetTunnelDst tunnelDst = (NiciraSetTunnelDst) extensionTreatment;
return factory.actions().setField(factory.oxms().tunnelIpv4Dst(
IPv4Address.of(tunnelDst.tunnelDst().toInt())));
}
if (type.equals(ExtensionType.ExtensionTypes.NICIRA_RESUBMIT.type())) {
if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_RESUBMIT.type())) {
// TODO this will be implemented later
}
return null;
}
@Override
public ExtensionInstruction mapAction(OFAction action) {
public ExtensionTreatment mapAction(OFAction action) {
if (action.getType().equals(OFActionType.SET_FIELD)) {
OFActionSetField setFieldAction = (OFActionSetField) action;
OFOxm<?> oxm = setFieldAction.getField();
......@@ -79,11 +81,11 @@ public class NiciraExtensionInterpreter extends AbstractHandlerBehaviour
}
@Override
public ExtensionInstruction getExtensionInstruction(ExtensionType type) {
if (type.equals(ExtensionType.ExtensionTypes.NICIRA_SET_TUNNEL_DST.type())) {
public ExtensionTreatment getExtensionInstruction(ExtensionTreatmentType type) {
if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_TUNNEL_DST.type())) {
return new NiciraSetTunnelDst();
}
if (type.equals(ExtensionType.ExtensionTypes.NICIRA_RESUBMIT.type())) {
if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_RESUBMIT.type())) {
return new NiciraResubmit();
}
throw new UnsupportedOperationException(
......
......@@ -19,8 +19,8 @@ package org.onosproject.driver.extensions;
import com.google.common.base.MoreObjects;
import org.onlab.util.KryoNamespace;
import org.onosproject.net.PortNumber;
import org.onosproject.net.flow.instructions.AbstractExtensionInstruction;
import org.onosproject.net.flow.instructions.ExtensionType;
import org.onosproject.net.flow.instructions.AbstractExtensionTreatment;
import org.onosproject.net.flow.instructions.ExtensionTreatmentType;
import org.onosproject.store.serializers.PortNumberSerializer;
import java.util.Objects;
......@@ -30,7 +30,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
/**
* Nicira resubmit extension instruction.
*/
public class NiciraResubmit extends AbstractExtensionInstruction {
public class NiciraResubmit extends AbstractExtensionTreatment {
private PortNumber inPort;
......@@ -66,8 +66,8 @@ public class NiciraResubmit extends AbstractExtensionInstruction {
}
@Override
public ExtensionType type() {
return ExtensionType.ExtensionTypes.NICIRA_RESUBMIT.type();
public ExtensionTreatmentType type() {
return ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_RESUBMIT.type();
}
@Override
......
......@@ -19,8 +19,8 @@ package org.onosproject.driver.extensions;
import com.google.common.base.MoreObjects;
import org.onlab.packet.Ip4Address;
import org.onlab.util.KryoNamespace;
import org.onosproject.net.flow.instructions.AbstractExtensionInstruction;
import org.onosproject.net.flow.instructions.ExtensionType;
import org.onosproject.net.flow.instructions.AbstractExtensionTreatment;
import org.onosproject.net.flow.instructions.ExtensionTreatmentType;
import org.onosproject.store.serializers.Ip4AddressSerializer;
import java.util.Objects;
......@@ -30,7 +30,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
/**
* Nicira set tunnel destination extension instruction.
*/
public class NiciraSetTunnelDst extends AbstractExtensionInstruction {
public class NiciraSetTunnelDst extends AbstractExtensionTreatment {
private Ip4Address tunnelDst;
......@@ -67,8 +67,8 @@ public class NiciraSetTunnelDst extends AbstractExtensionInstruction {
}
@Override
public ExtensionType type() {
return ExtensionType.ExtensionTypes.NICIRA_SET_TUNNEL_DST.type();
public ExtensionTreatmentType type() {
return ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_TUNNEL_DST.type();
}
@Override
......
......@@ -32,10 +32,10 @@
impl="org.onosproject.driver.handshaker.NiciraSwitchHandshaker"/>
<behaviour api="org.onosproject.net.behaviour.ControllerConfig"
impl="org.onosproject.driver.ovsdb.OvsdbControllerConfig"/>
<behaviour api="org.onosproject.openflow.controller.ExtensionInterpreter"
impl="org.onosproject.driver.extensions.NiciraExtensionInterpreter" />
<behaviour api="org.onosproject.net.behaviour.ExtensionResolver"
impl="org.onosproject.driver.extensions.NiciraExtensionInterpreter" />
<behaviour api="org.onosproject.openflow.controller.ExtensionTreatmentInterpreter"
impl="org.onosproject.driver.extensions.NiciraExtensionTreatmentInterpreter" />
<behaviour api="org.onosproject.net.behaviour.ExtensionTreatmentResolver"
impl="org.onosproject.driver.extensions.NiciraExtensionTreatmentInterpreter" />
</driver>
<!--This driver is for simulated NETCONF devices through of-config tool on top og OVSDB-->
<driver name="ovs-netconf" extends="default"
......
......@@ -18,8 +18,8 @@ package org.onosproject.openflow.controller;
import com.google.common.annotations.Beta;
import org.onosproject.net.driver.HandlerBehaviour;
import org.onosproject.net.flow.instructions.ExtensionInstruction;
import org.onosproject.net.flow.instructions.ExtensionType;
import org.onosproject.net.flow.instructions.ExtensionTreatment;
import org.onosproject.net.flow.instructions.ExtensionTreatmentType;
import org.projectfloodlight.openflow.protocol.OFFactory;
import org.projectfloodlight.openflow.protocol.action.OFAction;
......@@ -27,25 +27,25 @@ import org.projectfloodlight.openflow.protocol.action.OFAction;
* Interprets extension instructions and converts them to/from OpenFlow objects.
*/
@Beta
public interface ExtensionInterpreter extends HandlerBehaviour {
public interface ExtensionTreatmentInterpreter extends HandlerBehaviour {
/**
* Returns true if the given extension instruction is supported by this
* driver.
*
* @param extensionType extension instruction type
* @param extensionTreatmentType extension instruction type
* @return true if the instruction is supported, otherwise false
*/
boolean supported(ExtensionType extensionType);
boolean supported(ExtensionTreatmentType extensionTreatmentType);
/**
* Maps an extension instruction to an OpenFlow action.
*
* @param factory OpenFlow factory
* @param extensionInstruction extension instruction
* @param extensionTreatment extension instruction
* @return OpenFlow action
*/
OFAction mapInstruction(OFFactory factory, ExtensionInstruction extensionInstruction);
OFAction mapInstruction(OFFactory factory, ExtensionTreatment extensionTreatment);
/**
* Maps an OpenFlow action to an extension instruction.
......@@ -53,6 +53,6 @@ public interface ExtensionInterpreter extends HandlerBehaviour {
* @param action OpenFlow action
* @return extension instruction
*/
ExtensionInstruction mapAction(OFAction action);
ExtensionTreatment mapAction(OFAction action);
}
......
......@@ -44,7 +44,7 @@ import org.onosproject.net.flow.TrafficSelector;
import org.onosproject.net.flow.TrafficTreatment;
import org.onosproject.net.flow.instructions.Instructions;
import org.onosproject.openflow.controller.Dpid;
import org.onosproject.openflow.controller.ExtensionInterpreter;
import org.onosproject.openflow.controller.ExtensionTreatmentInterpreter;
import org.projectfloodlight.openflow.protocol.OFFlowMod;
import org.projectfloodlight.openflow.protocol.OFFlowRemoved;
import org.projectfloodlight.openflow.protocol.OFFlowStatsEntry;
......@@ -449,7 +449,7 @@ public class FlowEntryBuilder {
break;
case TUNNEL_IPV4_DST:
DriverHandler driver = getDriver(dpid);
ExtensionInterpreter interpreter = driver.behaviour(ExtensionInterpreter.class);
ExtensionTreatmentInterpreter interpreter = driver.behaviour(ExtensionTreatmentInterpreter.class);
if (interpreter != null) {
builder.extension(interpreter.mapAction(action), DeviceId.deviceId(Dpid.uri(dpid)));
}
......
......@@ -27,7 +27,7 @@ import org.onosproject.net.driver.Driver;
import org.onosproject.net.driver.DriverService;
import org.onosproject.net.flow.FlowRule;
import org.onosproject.net.flow.TrafficTreatment;
import org.onosproject.net.flow.instructions.ExtensionInstruction;
import org.onosproject.net.flow.instructions.ExtensionTreatment;
import org.onosproject.net.flow.instructions.Instruction;
import org.onosproject.net.flow.instructions.Instructions;
import org.onosproject.net.flow.instructions.Instructions.GroupInstruction;
......@@ -49,7 +49,7 @@ import org.onosproject.net.flow.instructions.L3ModificationInstruction.ModIPInst
import org.onosproject.net.flow.instructions.L3ModificationInstruction.ModIPv6FlowLabelInstruction;
import org.onosproject.net.flow.instructions.L4ModificationInstruction;
import org.onosproject.net.flow.instructions.L4ModificationInstruction.ModTransportPortInstruction;
import org.onosproject.openflow.controller.ExtensionInterpreter;
import org.onosproject.openflow.controller.ExtensionTreatmentInterpreter;
import org.projectfloodlight.openflow.protocol.OFFactory;
import org.projectfloodlight.openflow.protocol.OFFlowAdd;
import org.projectfloodlight.openflow.protocol.OFFlowDelete;
......@@ -482,16 +482,16 @@ public class FlowModBuilderVer13 extends FlowModBuilder {
return null;
}
private OFAction buildExtensionAction(ExtensionInstruction i) {
private OFAction buildExtensionAction(ExtensionTreatment i) {
if (!driverService.isPresent()) {
log.error("No driver service present");
return null;
}
Driver driver = driverService.get().getDriver(deviceId);
if (driver.hasBehaviour(ExtensionInterpreter.class)) {
if (driver.hasBehaviour(ExtensionTreatmentInterpreter.class)) {
DefaultDriverHandler handler =
new DefaultDriverHandler(new DefaultDriverData(driver, deviceId));
ExtensionInterpreter interpreter = handler.behaviour(ExtensionInterpreter.class);
ExtensionTreatmentInterpreter interpreter = handler.behaviour(ExtensionTreatmentInterpreter.class);
return interpreter.mapInstruction(factory(), i);
}
......
......@@ -33,7 +33,7 @@ import org.onosproject.net.driver.DefaultDriverHandler;
import org.onosproject.net.driver.Driver;
import org.onosproject.net.driver.DriverService;
import org.onosproject.net.flow.TrafficTreatment;
import org.onosproject.net.flow.instructions.ExtensionInstruction;
import org.onosproject.net.flow.instructions.ExtensionTreatment;
import org.onosproject.net.flow.instructions.Instruction;
import org.onosproject.net.flow.instructions.Instructions;
import org.onosproject.net.flow.instructions.L0ModificationInstruction;
......@@ -42,7 +42,7 @@ import org.onosproject.net.flow.instructions.L3ModificationInstruction;
import org.onosproject.net.group.GroupBucket;
import org.onosproject.net.group.GroupBuckets;
import org.onosproject.net.group.GroupDescription;
import org.onosproject.openflow.controller.ExtensionInterpreter;
import org.onosproject.openflow.controller.ExtensionTreatmentInterpreter;
import org.projectfloodlight.openflow.protocol.OFBucket;
import org.projectfloodlight.openflow.protocol.OFFactory;
import org.projectfloodlight.openflow.protocol.OFGroupAdd;
......@@ -424,16 +424,16 @@ public final class GroupModBuilder {
return null;
}
private OFAction buildExtensionAction(ExtensionInstruction i, DeviceId deviceId) {
private OFAction buildExtensionAction(ExtensionTreatment i, DeviceId deviceId) {
if (!driverService.isPresent()) {
log.error("No driver service present");
return null;
}
Driver driver = driverService.get().getDriver(deviceId);
if (driver.hasBehaviour(ExtensionInterpreter.class)) {
if (driver.hasBehaviour(ExtensionTreatmentInterpreter.class)) {
DefaultDriverHandler handler =
new DefaultDriverHandler(new DefaultDriverData(driver, deviceId));
ExtensionInterpreter interpreter = handler.behaviour(ExtensionInterpreter.class);
ExtensionTreatmentInterpreter interpreter = handler.behaviour(ExtensionTreatmentInterpreter.class);
return interpreter.mapInstruction(factory, i);
}
......