Bug 2756 - Action model update
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / serialization / action / OF13CopyTtlInActionSerializer.java
index 59020cd1493a4b9c4592ed7bfb78d6810193b3e1..5ea47c52d79c914fe68ab4852861b533a1e30062 100644 (file)
@@ -8,13 +8,27 @@
 
 package org.opendaylight.openflowjava.protocol.impl.serialization.action;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OF13CopyTtlInActionSerializer extends AbstractHeaderActionSerializer {
+public class OF13CopyTtlInActionSerializer extends AbstractActionSerializer {
+
+    @Override
+    public void serialize(Action action, ByteBuf outBuffer) {
+        super.serialize(action, outBuffer);
+        outBuffer.writeZero(ActionConstants.PADDING_IN_ACTION_HEADER);
+    }
+
+    @Override
+    protected int getLength() {
+        return ActionConstants.GENERAL_ACTION_LENGTH;
+    }
 
     @Override
     protected int getType() {