import io.netty.buffer.ByteBuf;
import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.OutputActionCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
/**
* @author michal.polkorab
@Override
public void serialize(Action action, ByteBuf outBuffer) {
super.serialize(action, outBuffer);
- PortAction port = action.getAugmentation(PortAction.class);
- outBuffer.writeShort(port.getPort().getValue().intValue());
- MaxLengthAction maxlength = action.getAugmentation(MaxLengthAction.class);
- outBuffer.writeShort(maxlength.getMaxLength());
+ outBuffer.writeShort(((OutputActionCase) action.getActionChoice())
+ .getOutputAction().getPort().getValue().intValue());
+ outBuffer.writeShort(((OutputActionCase) action.getActionChoice())
+ .getOutputAction().getMaxLength());
}
@Override