import org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl;\r
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthertypeAction;\r
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthertypeActionBuilder;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterAction;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterActionBuilder;\r
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.GroupIdAction;\r
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.GroupIdActionBuilder;\r
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction;\r
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.CopyTtlOut;\r
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.DecMplsTtl;\r
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.DecNwTtl;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Experimenter;\r
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Group;\r
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Output;\r
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.PopMpls;\r
actionBuilder = new ActionBuilder();\r
actionBuilder.setType(PopPbb.class);\r
actions.add(actionBuilder.build());\r
- actionBuilder = new ActionBuilder();\r
- actionBuilder.setType(Experimenter.class);\r
- ExperimenterActionBuilder expBuilder = new ExperimenterActionBuilder();\r
- expBuilder.setExperimenter(82L);\r
- byte[] expData = new byte[]{0, 0, 0, 0, 0, 0, 0, 1};\r
- expBuilder.setData(expData);\r
- actionBuilder.addAugmentation(ExperimenterAction.class, expBuilder.build());\r
- actions.add(actionBuilder.build());\r
- actionBuilder = new ActionBuilder();\r
- actionBuilder.setType(Experimenter.class);\r
- expBuilder = new ExperimenterActionBuilder();\r
- expBuilder.setExperimenter(102L);\r
- actionBuilder.addAugmentation(ExperimenterAction.class, expBuilder.build());\r
- actions.add(actionBuilder.build());\r
\r
ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();\r
- ListSerializer.serializeList(actions, EnhancedTypeKeyMakerFactory\r
+ ListSerializer.serializeList(actions, TypeKeyMakerFactory\r
.createActionKeyMaker(EncodeConstants.OF13_VERSION_ID), registry, out);\r
\r
Assert.assertEquals("Wrong action type", 0, out.readUnsignedShort());\r
Assert.assertEquals("Wrong action type", 27, out.readUnsignedShort());\r
Assert.assertEquals("Wrong action length", 8, out.readUnsignedShort());\r
out.skipBytes(4);\r
- Assert.assertEquals("Wrong action type", 65535, out.readUnsignedShort());\r
- Assert.assertEquals("Wrong action length", 16, out.readUnsignedShort());\r
- Assert.assertEquals("Wrong experimenter", 82, out.readUnsignedInt());\r
- byte[] tmp = new byte[8];\r
- out.readBytes(tmp);\r
- Assert.assertArrayEquals("Wrong data", expData, tmp);\r
- Assert.assertEquals("Wrong action type", 65535, out.readUnsignedShort());\r
- Assert.assertEquals("Wrong action length", 8, out.readUnsignedShort());\r
- Assert.assertEquals("Wrong experimenter", 102, out.readUnsignedInt());\r
Assert.assertTrue("Unread data", out.readableBytes() == 0);\r
}\r
\r