Bug 2756 - Match model update 18/15718/7
authorMichal Polkorab <michal.polkorab@pantheon.sk>
Wed, 25 Feb 2015 11:59:40 +0000 (12:59 +0100)
committerMichal Polkorab <michal.polkorab@pantheon.sk>
Tue, 24 Mar 2015 16:00:50 +0000 (16:00 +0000)
 - updated openflow-extensible-match and openflow-augments revisions

Change-Id: I87188326bd2365133fc55f1ebddf78e0e453bb44
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
237 files changed:
openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/extensibility/SerializerExtensionProvider.java
openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/keys/MatchEntryDeserializerKey.java
openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/keys/MatchEntrySerializerKey.java
openflow-protocol-api/src/main/yang/openflow-augments.yang
openflow-protocol-api/src/main/yang/openflow-extensible-match.yang
openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/KeysTest.java
openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/MatchEntryDeserializerKeyTest.java
openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/MatchEntrySerializerKeyTest.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/SwitchConnectionProviderImpl.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/DeserializerRegistryImpl.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/AbstractEthertypeActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10AbstractIpAddressActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10AbstractMacAddressActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10AbstractPortActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10EnqueueActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10OutputActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10SetNwTosActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10SetVlanPcpActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10SetVlanVidActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13GroupActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13OutputActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13SetFieldActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13SetMplsTtlActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13SetNwTtlActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13SetQueueActionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/FlowRemovedMessageFactory.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartReplyMessageFactory.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10FlowRemovedMessageFactory.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10QueueGetConfigReplyMessageFactory.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10StatsReplyMessageFactory.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/PacketInMessageFactory.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/QueueGetConfigReplyMessageFactory.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/instruction/AbstractActionInstructionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/instruction/ClearActionsInstructionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/instruction/GoToTableInstructionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/instruction/MeterInstructionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/instruction/WriteMetadataInstructionDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmIpv4AddressDeserializer.java [deleted file]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmIpv6AddressDeserializer.java [deleted file]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmMacAddressDeserializer.java [deleted file]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmMatchEntryDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmMetadataDeserializer.java [deleted file]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmPortDeserializer.java [deleted file]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmPortNumberDeserializer.java [deleted file]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmArpOpDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmArpShaDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmArpSpaDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmArpThaDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmArpTpaDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmDeserializerHelper.java [new file with mode: 0644]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmEthDstDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmEthSrcDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmEthTypeDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIcmpv4CodeDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIcmpv4TypeDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIcmpv6CodeDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIcmpv6TypeDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmInPhyPortDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmInPortDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIpDscpDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIpEcnDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIpProtoDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIpv4DstDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIpv4SrcDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIpv6DstDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIpv6ExtHdrDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIpv6FlabelDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIpv6NdSllDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIpv6NdTargetDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIpv6NdTllDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIpv6SrcDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmMaskDeserializer.java [deleted file]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmMetadataDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmMplsBosDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmMplsLabelDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmMplsTcDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmPbbIsidDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmSctpDstDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmSctpSrcDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmTcpDstDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmTcpSrcDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmTunnelIdDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmUdpDstDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmUdpSrcDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmVlanPcpDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmVlanVidDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/MatchEntriesInitializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/SerializerRegistryImpl.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/AbstractEthertypeActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF10AbstractIpAddressActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF10AbstractMacAddressActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF10AbstractPortActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF10EnqueueActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF10OutputActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF10SetNwTosActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF10SetVlanPcpActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF10SetVlanVidActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF13GroupActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF13OutputActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF13SetFieldActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF13SetMplsTtlActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF13SetNwTtlActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF13SetQueueActionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/FlowModInputMessageFactory.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MeterModInputMessageFactory.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MultipartRequestInputFactory.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10FlowModInputMessageFactory.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10StatsRequestInputFactory.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/instruction/AbstractActionInstructionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/instruction/GoToTableInstructionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/instruction/MeterInstructionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/instruction/WriteMetadataInstructionSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/AbstractOxmIpv4AddressSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/AbstractOxmIpv6AddressSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/AbstractOxmMacAddressSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/AbstractOxmMatchEntrySerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/AbstractOxmMetadataSerializer.java [deleted file]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/AbstractOxmPortNumberSerializer.java [deleted file]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/AbstractOxmPortSerializer.java [deleted file]
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmArpOpSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmArpShaSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmArpSpaSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmArpThaSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmArpTpaSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmEthDstSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmEthSrcSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmEthTypeSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIcmpv4CodeSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIcmpv4TypeSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIcmpv6CodeSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIcmpv6TypeSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmInPhyPortSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmInPortSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpDscpSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpEcnSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpProtoSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpv4DstSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpv4SrcSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpv6DstSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpv6ExtHdrSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpv6FlabelSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpv6NdSllSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpv6NdTargetSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpv6NdTllSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpv6SrcSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmMetadataSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmMplsBosSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmMplsLabelSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmMplsTcSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmPbbIsidSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmSctpDstSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmSctpSrcSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmTcpDstSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmTcpSrcSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmTunnelIdSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmUdpDstSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmUdpSrcSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmVlanPcpSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmVlanVidSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/MatchDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/MatchEntrySerializerRegistryHelper.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/OF10MatchDeserializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/OF10MatchSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/OF13MatchSerializer.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/TypeKeyMakerFactory.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/connection/SwitchConnectionProviderImpl02Test.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/DeserializerRegistryImplTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartReplyMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10QueueGetConfigReplyMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10StatsReplyMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/QueueGetConfigReplyMessageFactoryMultiTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/QueueGetConfigReplyMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/multipart/MultipartReplyFlowTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/multipart/MultipartReplyTableFeaturesTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIpv6ExtHdrDeserializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmIpv6FlabelDeserializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmMetadataDeserializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmMplsBosDeserializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmPbbIsidDeserializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmVlanVidDeserializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/SerializerRegistryImplTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF13SetFieldActionSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/FlowModInputMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10FlowModInputMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10PacketOutInputMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10StatsRequestInputFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/PacketOutInputMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/multipart/MultipartRequestExperimenterTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/multipart/MultipartRequestTableFeaturesTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/multipart/OF10StatsRequestAggregateTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/multipart/OF10StatsRequestExperimenterTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmArpOpSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmArpShaSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmArpSpaSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmArpThaSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmArpTpaSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmEthDstSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmEthSrcSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmEthTypeSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIcmpv4CodeSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIcmpv4TypeSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIcmpv6CodeSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIcmpv6TypeSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpDscpSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpProtoSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpv4DstSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpv4SrcSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpv6ExtHdrSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpv6NdSllSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmIpv6NdTllSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmMetadataSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmMplsBosSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmMplsLabelSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmMplsTcSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmPbbIsidSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmSctpDstSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmSctpSrcSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmTcpDstSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmTcpSrcSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmTunnelIdSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmUdpDstSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmUdpSrcSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmVlanPcpSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmVlanVidSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/ActionsDeserializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/InstructionsDeserializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/MatchDeserializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/OF10ActionsDeserializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/OF10ActionsSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/OF10MatchDeserializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/OF10MatchSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/OF13ActionsSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/OF13InstructionsSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/OF13MatchSerializer02Test.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/OF13MatchSerializerTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/TypeKeyMakerFactoryTest.java
openflow-protocol-it/src/test/java/org/opendaylight/openflowjava/protocol/it/integration/MockPlugin.java

index fc4b089f60bd4ce14ebd65a87f4ebd21fbfffd28..8729f874a66f5be85d9cd474bb5935d23d2e2aa9 100644 (file)
@@ -13,8 +13,8 @@ import org.opendaylight.openflowjava.protocol.api.keys.ExperimenterIdSerializerK
 import org.opendaylight.openflowjava.protocol.api.keys.ExperimenterInstructionSerializerKey;
 import org.opendaylight.openflowjava.protocol.api.keys.ExperimenterSerializerKey;
 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandExperimenterCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCase;
index d69384022f83e34d8b4becce967d8b32cd7ef162..4f995959af2df5b33de0cf6a87c2fa8fbaf04115 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.opendaylight.openflowjava.protocol.api.keys;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
 
 /**
  * @author michal.polkorab
@@ -27,7 +27,7 @@ public final class MatchEntryDeserializerKey extends MessageCodeKey
      */
     public MatchEntryDeserializerKey(short version,
             int oxmClass, int oxmField) {
-        super(version, oxmClass, MatchEntries.class);
+        super(version, oxmClass, MatchEntry.class);
         this.oxmField = oxmField;
     }
 
index d3cf7c1e4225b3d766e92835b45795a575933772..a0867ceb1d3c055d40afc7b31c80c0538043ae03 100644 (file)
@@ -8,9 +8,9 @@
 
 package org.opendaylight.openflowjava.protocol.api.keys;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
 
 /**
  * @author michal.polkorab
@@ -18,7 +18,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
  * @param <F> oxm_field (see specification)
  */
 public final class MatchEntrySerializerKey<C extends OxmClassBase, F extends MatchField>
-        extends MessageTypeKey<MatchEntries> implements ExperimenterSerializerKey {
+        extends MessageTypeKey<MatchEntry> implements ExperimenterSerializerKey {
 
     private Class<C> oxmClass;
     private Class<F> oxmField;
@@ -32,7 +32,7 @@ public final class MatchEntrySerializerKey<C extends OxmClassBase, F extends Mat
      */
     public MatchEntrySerializerKey(short msgVersion, Class<C> oxmClass,
             Class<F> oxmField) {
-        super(msgVersion, MatchEntries.class);
+        super(msgVersion, MatchEntry.class);
         this.oxmClass = oxmClass;
         this.oxmField = oxmField;
     }
index 229d5f5ab9444d05c416c86e48e9a50183e2c3a1..d90e4400cfc09e8becc1a9910bf366889c200038 100644 (file)
@@ -20,7 +20,7 @@
     import openflow-instruction {prefix ofinstruction;}
     import openflow-extensible-match {prefix oxm;}
 
-    revision "2013-10-02" {
+    revision "2015-02-25" {
         description "OpenFlow 1.3 - augments model.
                     Please visit
                     https://wiki.opendaylight.org/view/File:OpenFlow_Protocol_Library_-_Project_documentation.pdf
     }
 
 // OFP_MATCH AUGMENTS
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "port-number-match-entry";
-         leaf port-number {
-             type oft:port-number;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "metadata-match-entry";
-         leaf metadata {
-             type binary;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "mask-match-entry";
-         leaf mask {
-             type binary;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "mac-address-match-entry";
-         leaf mac-address {
-             type yang:mac-address;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "eth-type-match-entry";
-         leaf eth-type {
-             type oft:ether-type;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "vlan-vid-match-entry";
-         leaf vlan-vid {
-             type uint16;
-         }
-         leaf cfi-bit {
-             type boolean;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "vlan-pcp-match-entry";
-         leaf vlan-pcp {
-             type uint8;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "dscp-match-entry";
-         leaf dscp {
-             type inet:dscp;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "ecn-match-entry";
-         leaf ecn {
-             type uint8;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "protocol-number-match-entry";
-         leaf protocol-number {
-             type uint8;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "port-match-entry";
-         leaf port {
-             type inet:port-number;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "icmpv4-type-match-entry";
-         leaf icmpv4-type {
-             type uint8;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "icmpv4-code-match-entry";
-         leaf icmpv4-code {
-             type uint8;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "op-code-match-entry";
-         leaf op-code {
-             type uint16;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "ipv6-flabel-match-entry";
-         leaf ipv6-flabel {
-             type inet:ipv6-flow-label;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "icmpv6-type-match-entry";
-         leaf icmpv6-type {
-             type uint8;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "icmpv6-code-match-entry";
-         leaf icmpv6-code {
-             type uint8;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "ipv6-address-match-entry";
-         leaf ipv6-address {
-             type inet:ipv6-address;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "ipv4-address-match-entry";
-         leaf ipv4-address {
-             type inet:ipv4-address;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "mpls-label-match-entry";
-         leaf mpls-label {
-             type uint32;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "tc-match-entry";
-         leaf tc {
-             type uint8;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "bos-match-entry";
-         leaf bos {
-             type boolean;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "isid-match-entry";
-         leaf isid {
-             type uint32;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "pseudo-field-match-entry";
-         leaf pseudo-field {
-             type oft:ipv6-exthdr-flags;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
+     augment "/oxm:oxm-container/oxm:match-entry-value" {
          ext:augment-identifier "experimenter-id-match-entry";
-         leaf experimenter {
-             type oft:experimenter-id;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "tcp-flag-match-entry";
-         leaf tcp-flag {
-             type uint16;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "tunnel-ipv4-dst-match-entry";
-         leaf tunnel-ipv4-dst {
-             type inet:ipv4-address;
-         }
-     }
-     augment "/oxm:oxm-container/oxm:match-entries" {
-         ext:augment-identifier "tunnel-ipv4-src-match-entry";
-         leaf tunnel-ipv4-src {
-             type inet:ipv4-address;
+         case experimenter-id-case {
+             container experimenter {
+                 leaf experimenter {
+                     type oft:experimenter-id;
+                 }
+             }
          }
      }
 
      }
      augment "/ofaction:actions-container/ofaction:action" {
          ext:augment-identifier "oxm-fields-action";
-         uses oxm:oxm-fields-grouping;
+         uses oxm:match-entries-grouping;
      }
      augment "/ofaction:actions-container/ofaction:action" {
          ext:augment-identifier "experimenter-id-action";
      }
      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {
          ext:augment-identifier "oxm-related-table-feature-property";
-         uses oxm:oxm-fields-grouping;
+         uses oxm:match-entries-grouping;
      }
      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {
          ext:augment-identifier "experimenter-id-table-feature-property";
index e1f5514faf74c001962da2aa9856061a62fc3a53..f9d3f6c3278390d8820cd7325acac296da88ca54 100644 (file)
@@ -14,7 +14,7 @@
     import ietf-inet-types {prefix inet;}
     import openflow-types {prefix oft;}
 
-    revision "2013-07-31" {
+    revision "2015-02-25" {
         description "OpenFlow 1.3 - match model";
     }
 
     }
 
     // oxm classes
-        identity oxm-class-base {
-            description "Base identity for OXM classes";
-        }
+    identity oxm-class-base {
+        description "Base identity for OXM classes";
+    }
 
-        identity nxm-0-class {
-            description "Match class for backward compatibility with NXM";
-            base oxm-class-base;
-        }
-        identity nxm-1-class {
-            description "Match class for backward compatibility with NXM";
-            base oxm-class-base;
-        }
-        identity openflow-basic-class {
-            description "Basic class for OpenFlow";
-            base oxm-class-base;
-        }
-        identity experimenter-class {
-            description
-                "Marks Experimenter match type class.
-                All experimenter match classes MUST use this class as a base.";
-            base oxm-class-base;
-        }
+    identity nxm-0-class {
+        description "Match class for backward compatibility with NXM";
+        base oxm-class-base;
+    }
+    identity nxm-1-class {
+        description "Match class for backward compatibility with NXM";
+        base oxm-class-base;
+    }
+    identity openflow-basic-class {
+        description "Basic class for OpenFlow";
+        base oxm-class-base;
+    }
+    identity experimenter-class {
+        description
+            "Marks Experimenter match type class.
+            All experimenter match classes MUST use this class as a base.";
+        base oxm-class-base;
+    }
 
-    // field types
-        identity match-field {
-            description "Base identity for OXM Fields";
-        }
+    // match-field types
+    identity match-field {
+        description "Base identity for OXM Fields";
+    }
 
-        identity in_port {
-            base match-field;
-            description "OXM field for Switch input port.";
-        }
-        identity in_phy_port {
-            base match-field;
-            description "OXM field for Switch physical input port.";
-        }
-        identity metadata {
-            base match-field;
-            description "OXM field for Metadata passed between tables.";
-        }
-        identity eth_dst {
-            base match-field;
-            description "OXM field for Ethernet destination address.";
-        }
-        identity eth_src {
-            base match-field;
-            description "OXM field for Ethernet source address.";
-        }
-        identity eth_type {
-            base match-field;
-            description "OXM field for Ethernet frame type.";
-        }
-        identity vlan_vid {
-            base match-field;
-            description "OXM field for VLAN id.";
-        }
-        identity vlan_pcp {
-            base match-field;
-            description "OXM field for VLAN priority.";
-        }
-        identity ip_dscp {
-            base match-field;
-            description "OXM field for IP DSCP (6 bits in ToS field).";
-        }
-        identity ip_ecn {
-            base match-field;
-            description "OXM field for IP ECN (2 bits in ToS field).";
-        }
-        identity ip_proto {
-            base match-field;
-            description "OXM field for IP protocol.";
-        }
-        identity ipv4_src {
-            base match-field;
-            description "OXM field for IPv4 source address.";
-        }
-        identity ipv4_dst {
-            base match-field;
-            description "OXM field for IPv4 destination address.";
-        }
-        identity tcp_src {
-            base match-field;
-            description "OXM field for TCP source port.";
-        }
-        identity tcp_dst {
-            base match-field;
-            description "OXM field for TCP destination port.";
-        }
-        identity udp_src {
-            base match-field;
-            description "OXM field for UDP source port.";
-        }
-        identity udp_dst {
-            base match-field;
-            description "OXM field for UDP destination port.";
-        }
-        identity sctp_src {
-            base match-field;
-            description "OXM field for SCTP source port.";
-        }
-        identity sctp_dst {
-            base match-field;
-            description "OXM field for SCTP destination port.";
-        }
-        identity icmpv4_type {
-            base match-field;
-            description "OXM field for ICMP type.";
-        }
-        identity icmpv4_code {
-            base match-field;
-            description "OXM field for ICMP code.";
-        }
-        identity arp_op {
-            base match-field;
-            description "OXM field for ARP opcode.";
-        }
-        identity arp_spa {
-            base match-field;
-            description "OXM field for ARP source IPv4 address.";
-        }
-        identity arp_tpa {
-            base match-field;
-            description "OXM field for ARP target IPv4 address.";
-        }
-        identity arp_sha {
-            base match-field;
-            description "OXM field for ARP source hardware address.";
-        }
-        identity arp_tha {
-            base match-field;
-            description "OXM field for ARP target hardware address.";
-        }
-        identity ipv6_src {
-            base match-field;
-            description "OXM field for IPv6 source address.";
-        }
-        identity ipv6_dst {
-            base match-field;
-            description "OXM field for IPv6 destination address.";
-        }
-        identity ipv6_flabel {
-            base match-field;
-            description "OXM field for IPv6 Flow Label";
-        }
-        identity icmpv6_type {
-            base match-field;
-            description "OXM field for ICMPv6 type.";
-        }
-        identity icmpv6_code {
-            base match-field;
-            description "OXM field for ICMPv6 code.";
-        }
-        identity ipv6_nd_target {
-            base match-field;
-            description "OXM field for Target address for ND.";
-        }
-        identity ipv6_nd_sll {
-            base match-field;
-            description "OXM field for Source link-layer for ND.";
-        }
-        identity ipv6_nd_tll {
-            base match-field;
-            description "OXM field for Target link-layer for ND.";
-        }
-        identity mpls_label {
-            base match-field;
-            description "OXM field for MPLS label.";
-        }
-        identity mpls_tc {
-            base match-field;
-            description "OXM field for MPLS TC.";
-        }
-        identity mpls_bos {
-            base match-field;
-            description "OXM field for MPLS BoS bit.";
-        }
-        identity pbb_isid {
-            base match-field;
-            description "OXM field for PBB I-SID.";
-        }
-        identity tunnel_id {
-            base match-field;
-            description "OXM field for Logical Port Metadata";
-        }
-        identity ipv6_exthdr {
-            base match-field;
-            description "OXM field for IPv6 Extension Header pseudo-field";
+    identity in_port {
+        base match-field;
+        description "OXM field for Switch input port.";
+    }
+    identity in_phy_port {
+        base match-field;
+        description "OXM field for Switch physical input port.";
+    }
+    identity metadata {
+        base match-field;
+        description "OXM field for Metadata passed between tables.";
+    }
+    identity eth_dst {
+        base match-field;
+        description "OXM field for Ethernet destination address.";
+    }
+    identity eth_src {
+        base match-field;
+        description "OXM field for Ethernet source address.";
+    }
+    identity eth_type {
+        base match-field;
+        description "OXM field for Ethernet frame type.";
+    }
+    identity vlan_vid {
+        base match-field;
+        description "OXM field for VLAN id.";
+    }
+    identity vlan_pcp {
+        base match-field;
+        description "OXM field for VLAN priority.";
+    }
+    identity ip_dscp {
+        base match-field;
+        description "OXM field for IP DSCP (6 bits in ToS field).";
+    }
+    identity ip_ecn {
+        base match-field;
+        description "OXM field for IP ECN (2 bits in ToS field).";
+    }
+    identity ip_proto {
+        base match-field;
+        description "OXM field for IP protocol.";
+    }
+    identity ipv4_src {
+        base match-field;
+        description "OXM field for IPv4 source address.";
+    }
+    identity ipv4_dst {
+        base match-field;
+        description "OXM field for IPv4 destination address.";
+    }
+    identity tcp_src {
+        base match-field;
+        description "OXM field for TCP source port.";
+    }
+    identity tcp_dst {
+        base match-field;
+        description "OXM field for TCP destination port.";
+    }
+    identity udp_src {
+        base match-field;
+        description "OXM field for UDP source port.";
+    }
+    identity udp_dst {
+        base match-field;
+        description "OXM field for UDP destination port.";
+    }
+    identity sctp_src {
+        base match-field;
+        description "OXM field for SCTP source port.";
+    }
+    identity sctp_dst {
+        base match-field;
+        description "OXM field for SCTP destination port.";
+    }
+    identity icmpv4_type {
+        base match-field;
+        description "OXM field for ICMP type.";
+    }
+    identity icmpv4_code {
+        base match-field;
+        description "OXM field for ICMP code.";
+    }
+    identity arp_op {
+        base match-field;
+        description "OXM field for ARP opcode.";
+    }
+    identity arp_spa {
+        base match-field;
+        description "OXM field for ARP source IPv4 address.";
+    }
+    identity arp_tpa {
+        base match-field;
+        description "OXM field for ARP target IPv4 address.";
+    }
+    identity arp_sha {
+        base match-field;
+        description "OXM field for ARP source hardware address.";
+    }
+    identity arp_tha {
+        base match-field;
+        description "OXM field for ARP target hardware address.";
+    }
+    identity ipv6_src {
+        base match-field;
+        description "OXM field for IPv6 source address.";
+    }
+    identity ipv6_dst {
+        base match-field;
+        description "OXM field for IPv6 destination address.";
+    }
+    identity ipv6_flabel {
+        base match-field;
+        description "OXM field for IPv6 Flow Label";
+    }
+    identity icmpv6_type {
+        base match-field;
+        description "OXM field for ICMPv6 type.";
+    }
+    identity icmpv6_code {
+        base match-field;
+        description "OXM field for ICMPv6 code.";
+    }
+    identity ipv6_nd_target {
+        base match-field;
+        description "OXM field for Target address for ND.";
+    }
+    identity ipv6_nd_sll {
+        base match-field;
+        description "OXM field for Source link-layer for ND.";
+    }
+    identity ipv6_nd_tll {
+        base match-field;
+        description "OXM field for Target link-layer for ND.";
+    }
+    identity mpls_label {
+        base match-field;
+        description "OXM field for MPLS label.";
+    }
+    identity mpls_tc {
+        base match-field;
+        description "OXM field for MPLS TC.";
+    }
+    identity mpls_bos {
+        base match-field;
+        description "OXM field for MPLS BoS bit.";
+    }
+    identity pbb_isid {
+        base match-field;
+        description "OXM field for PBB I-SID.";
+    }
+    identity tunnel_id {
+        base match-field;
+        description "OXM field for Logical Port Metadata";
+    }
+    identity ipv6_exthdr {
+        base match-field;
+        description "OXM field for IPv6 Extension Header pseudo-field";
+    }
+
+    grouping match-grouping {
+        container match {
+            description "Match structure (OF v1.3)";
+            leaf type {
+                type identityref {
+                    base oft:match-type-base;
+                }
+            }
+            uses match-entries-grouping;
         }
-        identity tcp_flag {
-            base match-field;
-            description "NXM field for NXM_NX_TCP_FLAGS";
+    }
+
+    grouping match-entries-grouping {
+        list match-entry {
+            config false;
+            uses match-entry-fields-grouping;
+            uses match-entry-value-grouping;
         }
-        identity tunnel_ipv4_dst {
-            base match-field;
-            description "NXM field for NXM_NX_TUN_IPV4_DST";
+    }
+
+    grouping match-entry-fields-grouping {
+        leaf oxm-class {
+            type identityref {
+                base oxm-class-base;
+            }
         }
-        identity tunnel_ipv4_src {
-            base match-field;
-            description "NXM field for NXM_NX_TUN_IPV4_SRC";
+        leaf oxm-match-field {
+            type identityref {
+                base match-field;
+            }
         }
-        container oxm-container {
-            uses oxm-fields-grouping;
+        leaf has-mask {
+            type boolean;
         }
+    }
 
-        grouping oxm-fields-grouping {
-            list match-entries {
-                description "OXM TLV-structures (Type Length Value)";
-                config false;
-                leaf oxm-class {
-                    type identityref {
-                        base oxm-class-base;
+    container oxm-container {
+        uses match-entry-value-grouping;
+    }
+
+    grouping match-entry-value-grouping {
+        choice match-entry-value {
+            case in-port-case {
+                container in-port {
+                    leaf port-number {
+                        type oft:port-number;
                     }
                 }
-                leaf oxm-match-field {
-                    type identityref {
-                        base match-field;
+            }
+            case in-phy-port-case {
+                container in-phy-port {
+                    leaf port-number {
+                        type oft:port-number;
                     }
                 }
-                leaf has-mask {
-                    type boolean;
+            }
+            case metadata-case {
+                container metadata {
+                    leaf metadata {
+                        type binary;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
                 }
             }
-        }
-
-        grouping match-grouping {
-            container match {
-                description "Match structure (OF v1.3)";
-                leaf type {
-                    type identityref {
-                        base oft:match-type-base;
+            case eth-src-case {
+                container eth-src {
+                    leaf mac-address {
+                        type yang:mac-address;
+                    }
+                    leaf mask {
+                        type binary;
                     }
                 }
-                uses oxm-fields-grouping;
             }
-        }
-
-        // OF1.0 structures
-        grouping match-v10-grouping {
-            container match-v10 {
-                description "OF v1.0 match structure";
-                leaf wildcards {
-                    description "Wildcard fields (only flags).";
-                    type oft:flow-wildcards-v10;
+            case eth-dst-case {
+                container eth-dst {
+                    leaf mac-address {
+                        type yang:mac-address;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
                 }
-                leaf nw-src-mask {
-                    description "IP source address mask (definition differs from OF v1.0.0 spec to ease
-                     understanding, library does the transformation into OF v1.0 spec correct data)";
-                    type uint8;
+            }
+            case eth-type-case {
+                container eth-type {
+                    leaf eth-type {
+                        type oft:ether-type;
+                    }
                 }
-                leaf nw-dst-mask {
-                    description "IP destination address mask (definition differs from OF v1.0.0 spec to ease
-                     understanding, library does the transformation into OF v1.0 spec correct data)";
-                    type uint8;
+            }
+            case vlan-vid-case {
+                container vlan-vid {
+                    leaf vlan-vid {
+                        type uint16;
+                    }
+                    leaf cfi-bit {
+                        type boolean;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
+                }
+            }
+            case vlan-pcp-case {
+                container vlan-pcp {
+                    leaf vlan-pcp {
+                        type uint8;
+                    }
+                }
+            }
+            case ip-dscp-case {
+                container ip-dscp {
+                    leaf dscp {
+                        type inet:dscp;
+                    }
+                }
+            }
+            case ip-ecn-case {
+                container ip-ecn {
+                    leaf ecn {
+                        type uint8;
+                    }
+                }
+            }
+            case ip-proto-case {
+                container ip-proto {
+                    leaf protocol-number {
+                        type uint8;
+                    }
+                }
+            }
+            case ipv4-src-case {
+                container ipv4-src {
+                    leaf ipv4-address {
+                        type inet:ipv4-address;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
+                }
+            }
+            case ipv4-dst-case {
+                container ipv4-dst {
+                    leaf ipv4-address {
+                        type inet:ipv4-address;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
+                }
+            }
+            case tcp-src-case {
+                container tcp-src {
+                    leaf port {
+                        type inet:port-number;
+                    }
+                }
+            }
+            case tcp-dst-case {
+                container tcp-dst {
+                    leaf port {
+                        type inet:port-number;
+                    }
+                }
+            }
+            case udp-src-case {
+                container udp-src {
+                    leaf port {
+                        type inet:port-number;
+                    }
+                }
+            }
+            case udp-dst-case {
+                container udp-dst {
+                    leaf port {
+                        type inet:port-number;
+                    }
+                }
+            }
+            case sctp-src-case {
+                container sctp-src {
+                    leaf port {
+                        type inet:port-number;
+                    }
+                }
+            }
+            case sctp-dst-case {
+                container sctp-dst {
+                    leaf port {
+                        type inet:port-number;
+                    }
+                }
+            }
+            case icmpv4-type-case {
+                container icmpv4-type {
+                    leaf icmpv4-type {
+                        type uint8;
+                    }
+                }
+            }
+            case icmpv4-code-case {
+                container icmpv4-code {
+                    leaf icmpv4-code {
+                        type uint8;
+                    }
+                }
+            }
+            case arp-op-case {
+                container arp-op {
+                    leaf op-code {
+                        type uint16;
+                    }
+                }
+            }
+            case arp-spa-case {
+                container arp-spa {
+                    leaf ipv4-address {
+                        type inet:ipv4-address;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
+                }
+            }
+            case arp-tpa-case {
+                container arp-tpa {
+                    leaf ipv4-address {
+                        type inet:ipv4-address;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
+                }
+            }
+            case arp-sha-case {
+                container arp-sha {
+                    leaf mac-address {
+                        type yang:mac-address;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
                 }
-                leaf in-port {
-                description "Input switch port.";
-                    type uint16;
+            }
+            case arp-tha-case {
+                container arp-tha {
+                    leaf mac-address {
+                        type yang:mac-address;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
                 }
-                leaf dl-src {
-                    description "Ethernet source address.";
-                    type yang:mac-address;
+            }
+            case ipv6-src-case {
+                container ipv6-src {
+                    leaf ipv6-address {
+                        type inet:ipv6-address;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
                 }
-                leaf dl-dst {
-                    description "Ethernet destination address.";
-                    type yang:mac-address;
+            }
+            case ipv6-dst-case {
+                container ipv6-dst {
+                    leaf ipv6-address {
+                        type inet:ipv6-address;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
                 }
-                leaf dl-vlan {
-                    description "Input VLAN id.";
-                    type uint16;
+            }
+            case ipv6-flabel-case {
+                container ipv6-flabel {
+                    leaf ipv6-flabel {
+                        type inet:ipv6-flow-label;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
                 }
-                leaf dl-vlan-pcp {
-                    description "Input VLAN priority.";
-                    type uint8;
+            }
+            case icmpv6-type-case {
+                container icmpv6-type {
+                    leaf icmpv6-type {
+                        type uint8;
+                    }
                 }
-                leaf dl-type {
-                    description "Ethernet frame type.";
-                    type uint16;
+            }
+            case icmpv6-code-case {
+                container icmpv6-code {
+                    leaf icmpv6-code {
+                         type uint8;
+                     }
                 }
-                leaf nw-tos {
-                    description "IP ToS (actually DSCP field, 6 bits).";
-                    type uint8;
+            }
+            case ipv6-nd-target-case {
+                container ipv6-nd-target {
+                    leaf ipv6-address {
+                        type inet:ipv6-address;
+                    }
                 }
-                leaf nw-proto {
-                    description "IP protocol or lower 8 bits of ARP opcode.";
-                    type uint8;
+            }
+            case ipv6-nd-sll-case {
+                container ipv6-nd-sll {
+                    leaf mac-address {
+                        type yang:mac-address;
+                    }
                 }
-                leaf nw-src {
-                    description "IP source address.";
-                    type inet:ipv4-address;
+            }
+            case ipv6-nd-tll-case {
+                container ipv6-nd-tll {
+                    leaf mac-address {
+                        type yang:mac-address;
+                    }
                 }
-                leaf nw-dst {
-                    description "IP destination address.";
-                    type inet:ipv4-address;
+            }
+            case mpls-label-case {
+                container mpls-label {
+                    leaf mpls-label {
+                        type uint32;
+                    }
                 }
-                leaf tp-src {
-                    description "TCP/UDP source port.";
-                    type uint16;
+            }
+            case mpls-tc-case {
+                container mpls-tc {
+                    leaf tc {
+                        type uint8;
+                    }
                 }
-                leaf tp-dst {
-                    description "TCP/UDP destination port.";
-                    type uint16;
+            }
+            case mpls-bos-case {
+                container mpls-bos {
+                    leaf bos {
+                        type boolean;
+                    }
+                }
+            }
+            case pbb-isid-case {
+                container pbb-isid {
+                    leaf isid {
+                        type uint32;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
+                }
+            }
+            case tunnel-id-case {
+                container tunnel-id {
+                    leaf tunnel-id {
+                        type binary;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
+                }
+            }
+            case ipv6-exthdr-case {
+                container ipv6-exthdr {
+                    leaf pseudo-field {
+                        type oft:ipv6-exthdr-flags;
+                    }
+                    leaf mask {
+                        type binary;
+                    }
                 }
             }
         }
+    }
 
+    // OF1.0 structures
+    grouping match-v10-grouping {
+        container match-v10 {
+            description "OF v1.0 match structure";
+            leaf wildcards {
+                description "Wildcard fields (only flags).";
+                type oft:flow-wildcards-v10;
+            }
+            leaf nw-src-mask {
+                description "IP source address mask (definition differs from OF v1.0.0 spec to ease
+                 understanding, library does the transformation into OF v1.0 spec correct data)";
+                type uint8;
+            }
+            leaf nw-dst-mask {
+                description "IP destination address mask (definition differs from OF v1.0.0 spec to ease
+                 understanding, library does the transformation into OF v1.0 spec correct data)";
+                type uint8;
+            }
+            leaf in-port {
+            description "Input switch port.";
+                type uint16;
+            }
+            leaf dl-src {
+                description "Ethernet source address.";
+                type yang:mac-address;
+            }
+            leaf dl-dst {
+                description "Ethernet destination address.";
+                type yang:mac-address;
+            }
+            leaf dl-vlan {
+                description "Input VLAN id.";
+                type uint16;
+            }
+            leaf dl-vlan-pcp {
+                description "Input VLAN priority.";
+                type uint8;
+            }
+            leaf dl-type {
+                description "Ethernet frame type.";
+                type uint16;
+            }
+            leaf nw-tos {
+                description "IP ToS (actually DSCP field, 6 bits).";
+                type uint8;
+            }
+            leaf nw-proto {
+                description "IP protocol or lower 8 bits of ARP opcode.";
+                type uint8;
+            }
+            leaf nw-src {
+                description "IP source address.";
+                type inet:ipv4-address;
+            }
+            leaf nw-dst {
+                description "IP destination address.";
+                type inet:ipv4-address;
+            }
+            leaf tp-src {
+                description "TCP/UDP source port.";
+                type uint16;
+            }
+            leaf tp-dst {
+                description "TCP/UDP destination port.";
+                type uint16;
+            }
+        }
+    }
 }
\ No newline at end of file
index 769bfc921e9ff20673d5b5bcb5cac3d0b4b3150e..fdf0f38f2523c0532436541e04babc16ee3e73a6 100644 (file)
@@ -2,18 +2,12 @@ package org.opendaylight.openflowjava.protocol.api.keys;
 
 import org.junit.Assert;
 import org.junit.Test;
-import org.opendaylight.openflowjava.protocol.api.keys.ActionDeserializerKey;
-import org.opendaylight.openflowjava.protocol.api.keys.ActionSerializerKey;
-import org.opendaylight.openflowjava.protocol.api.keys.InstructionDeserializerKey;
-import org.opendaylight.openflowjava.protocol.api.keys.InstructionSerializerKey;
-import org.opendaylight.openflowjava.protocol.api.keys.MatchEntryDeserializerKey;
-import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Experimenter;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.ExperimenterActionSubType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
 
 /**
  * @author michal.polkorab
index c3d9cf90f9eafa53c45227e6c5f1e31018243ae2..c9c84688d13b19e6ed0dd83904957de6f082d3fe 100644 (file)
@@ -76,8 +76,8 @@ public class MatchEntryDeserializerKeyTest {
     public void testToString(){
         MatchEntryDeserializerKey key1 = new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, 0x8000, 42);
 
-        Assert.assertEquals("Wrong toString()", "msgVersion: 4 objectClass: org.opendaylight.yang.gen.v1.urn.opendaylight"
-                + ".openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries msgType: 32768 oxm_field: 42"
-                + " experimenterID: null", key1.toString());
+        Assert.assertEquals("Wrong toString()", "msgVersion: 4 objectClass: org.opendaylight.yang.gen.v1.urn"
+                + ".opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry"
+                + " msgType: 32768 oxm_field: 42 experimenterID: null", key1.toString());
     }
 }
\ No newline at end of file
index 8bf98fdaea6f41e91bde14be2619023ec2a7b228..fbd5e26adc37cbcae01d0fd65270e0b395204495 100644 (file)
@@ -11,10 +11,10 @@ package org.opendaylight.openflowjava.protocol.api.keys;
 import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPhyPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Nxm0Class;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPhyPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Nxm0Class;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
 
 /**
  * @author michal.polkorab
@@ -99,9 +99,10 @@ public class MatchEntrySerializerKeyTest {
         MatchEntrySerializerKey<?, ?> key1;
         key1 = new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, OpenflowBasicClass.class, InPort.class);
 
-        Assert.assertEquals("Wrong toString()", "msgVersion: 4 objectType: org.opendaylight.yang.gen.v1.urn.opendaylight"
-                + ".openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries oxm_class: org.opendaylight.yang.gen.v1.urn"
-                + ".opendaylight.openflow.oxm.rev130731.OpenflowBasicClass oxm_field: org.opendaylight.yang.gen.v1.urn"
-                + ".opendaylight.openflow.oxm.rev130731.InPort experimenterID: null", key1.toString());
+        Assert.assertEquals("Wrong toString()", "msgVersion: 4 objectType: org.opendaylight.yang.gen.v1.urn"
+                + ".opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry"
+                + " oxm_class: org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225"
+                + ".OpenflowBasicClass oxm_field: org.opendaylight.yang.gen.v1.urn.opendaylight.openflow"
+                + ".oxm.rev150225.InPort experimenterID: null", key1.toString());
     }
 }
\ No newline at end of file
index 92f058276abd6850ffe921a9b86762675c6cc991..852ce64f0551864d7562871bec02a514d26644a7 100644 (file)
@@ -37,8 +37,8 @@ import org.opendaylight.openflowjava.protocol.impl.serialization.SerializationFa
 import org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.TransportProtocol;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ErrorMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterMessage;
index 0cd70fd8f18ea382c9ee8411e83bbd59ba1073e9..0ee3fb281ea6dec2204b4c82d1bb8634cd2048a7 100644 (file)
@@ -18,8 +18,8 @@ import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.MatchDeserializer;
 import org.opendaylight.openflowjava.protocol.impl.util.OF10MatchDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index cddf6f2d19418cec7228da05e1c8994cf5a0370c..e97d2a7740585c8a8e87d58db5aebc69863a3efb 100644 (file)
@@ -10,10 +10,10 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
 
-import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthertypeAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthertypeActionBuilder;
+import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.EthertypeAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.EthertypeActionBuilder;
 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.rev130731.actions.grouping.ActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.EtherType;
index 97c10e5c353a2d935af7c68236438e33eaf817dc..94c5dcafd3f55af75d3e9493dc5e75bf8feec13a 100644 (file)
@@ -10,11 +10,11 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
 
-import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IpAddressAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IpAddressActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.IpAddressAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.IpAddressActionBuilder;
 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.rev130731.actions.grouping.ActionBuilder;
 import org.opendaylight.yangtools.yang.binding.Augmentation;
index cdbc69e23db29af46c830b1750f4cee1951cb985..46022f0c9c654b6fb6ed02ab516170b37c2e35dc 100644 (file)
@@ -10,12 +10,12 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
 
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DlAddressAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DlAddressActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.DlAddressAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.DlAddressActionBuilder;
 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.rev130731.actions.grouping.ActionBuilder;
 
index 9c7476d5263c6ba756f07a04a84396415ece08f9..9511a0c2f5791f7cd6c20bb527dec15687649ecb 100644 (file)
@@ -10,10 +10,10 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
 
-import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortActionBuilder;
+import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortActionBuilder;
 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.rev130731.actions.grouping.ActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
index 9316971e96c69742b5c2a97d3e64e252bfe30d81..cec5f70c274a4c3823b5f2af8fc0a1c6364b7380 100644 (file)
@@ -10,10 +10,10 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
 
-import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.QueueIdAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.QueueIdActionBuilder;
+import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.QueueIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.QueueIdActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Enqueue;
 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.rev130731.actions.grouping.ActionBuilder;
index 64707081d0b66ef45e6fc78883efb265da8e2bb5..0993bbac194c38ba8389986a0e2c096a26fe9154 100644 (file)
@@ -11,8 +11,8 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Output;
 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.rev130731.actions.grouping.ActionBuilder;
index 925ecfec368e402f90ef10122a25b8b123b02615..79da6a3e21e21619cafaac0cba0d9e0e0cb5ac77 100644 (file)
@@ -10,10 +10,10 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
 
-import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTosAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTosActionBuilder;
+import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTosAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTosActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.SetNwTos;
 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.rev130731.actions.grouping.ActionBuilder;
index ac5115527105c8aaef19748332a8da88cc44d1e4..afa3dca03a55de76def5d1712a19933854799044 100644 (file)
@@ -10,10 +10,10 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
 
-import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanPcpAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanPcpActionBuilder;
+import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.VlanPcpAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.VlanPcpActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.SetVlanPcp;
 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.rev130731.actions.grouping.ActionBuilder;
index 623341a9b4ec3a7831d21d15fe46d103166ac709..3368351934319f2ead73925f984d720064c61d80 100644 (file)
@@ -10,10 +10,10 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
 
-import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidActionBuilder;
+import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.VlanVidAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.VlanVidActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.SetVlanVid;
 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.rev130731.actions.grouping.ActionBuilder;
index dbf147d299fc61464fd9665b6a2feeb7d267faa7..43bbcf5a44d1ec829cf68a53c117d0236e6c672e 100644 (file)
@@ -11,8 +11,8 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.GroupIdAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.GroupIdActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.GroupIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.GroupIdActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Group;
 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.rev130731.actions.grouping.ActionBuilder;
index 9e9d54f30edc869d1cb1bef2e37c4fa76d454318..f2f2c0b0c3f7d6bab5e8e11ad5a4f5ea45022d51 100644 (file)
@@ -10,12 +10,12 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
 
-import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortActionBuilder;
+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.MaxLengthActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Output;
 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.rev130731.actions.grouping.ActionBuilder;
index 190c3b807b433ee082ee8094f3d0c3be99109429..5a1a533a7d4aa98cad19f90cbcc2a2f9f771900c 100644 (file)
@@ -18,13 +18,13 @@ import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegi
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntryDeserializerKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmFieldsAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmFieldsActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmFieldsAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmFieldsActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.SetField;
 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.rev130731.actions.grouping.ActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ActionBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
 
 /**
  * @author michal.polkorab
@@ -53,10 +53,10 @@ public class OF13SetFieldActionDeserializer extends AbstractActionDeserializer
                     + 2 * EncodeConstants.SIZE_OF_BYTE_IN_BYTES);
             key.setExperimenterId(expId);
         }
-        OFDeserializer<MatchEntries> matchDeserializer = registry.getDeserializer(key);
-        List<MatchEntries> entry = new ArrayList<>();
+        OFDeserializer<MatchEntry> matchDeserializer = registry.getDeserializer(key);
+        List<MatchEntry> entry = new ArrayList<>();
         entry.add(matchDeserializer.deserialize(input));
-        matchEntries.setMatchEntries(entry);
+        matchEntries.setMatchEntry(entry);
         builder.addAugmentation(OxmFieldsAction.class, matchEntries.build());
         int paddingRemainder = (input.readerIndex() - startIndex) % EncodeConstants.PADDING;
         if (paddingRemainder != 0) {
index 0a22ae7314c6239b6cc410c0efa394a384f9739f..4f1bb2eaeb2f42783502be6ccb834c50d9a67746 100644 (file)
@@ -10,10 +10,10 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
 
-import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsTtlAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsTtlActionBuilder;
+import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MplsTtlAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MplsTtlActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.SetMplsTtl;
 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.rev130731.actions.grouping.ActionBuilder;
index f247c3a7eb8351bec79e2902bab0ffe3a5649873..8d8915e29ded9f4252b3d5d00eb7e2420e001cc1 100644 (file)
@@ -10,10 +10,10 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
 
-import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTtlAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTtlActionBuilder;
+import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTtlAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTtlActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.SetNwTtl;
 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.rev130731.actions.grouping.ActionBuilder;
index 1df22b1b7de0dc1fd3c40ec1be54234992615300..d71b5d68320e1b7411d8a45cdd276731c2ff5ccb 100644 (file)
@@ -11,8 +11,8 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.QueueIdAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.QueueIdActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.QueueIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.QueueIdActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.SetQueue;
 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.rev130731.actions.grouping.ActionBuilder;
index 3e736fab754456c7f8b8b884974b44d3292cc66b..05ababb3dd6cd1dca0696eb3e0991c21c44f3306 100644 (file)
@@ -19,7 +19,7 @@ import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowRemovedReason;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemovedMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemovedMessageBuilder;
 
index cbebe33e854fdcbf1bbeeed2738fcd533ed6c6cc..1d0713963058bcd1298dad83f4906da728640021 100644 (file)
@@ -25,16 +25,16 @@ import org.opendaylight.openflowjava.protocol.impl.util.ListDeserializer;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.openflowjava.util.ExperimenterDeserializerKeyFactory;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.InstructionRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.InstructionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NextTableRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NextTableRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.table.features.properties.container.table.feature.properties.NextTableIds;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.table.features.properties.container.table.feature.properties.NextTableIdsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeaturePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeaturePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeaturePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeaturePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIds;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIdsBuilder;
 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.instruction.rev130731.instructions.grouping.Instruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ActionType;
@@ -55,8 +55,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortState;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableConfig;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableFeaturesPropType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessageBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.buckets.grouping.BucketsList;
@@ -423,9 +423,9 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
                 OxmRelatedTableFeaturePropertyBuilder oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
                 CodeKeyMaker keyMaker = CodeKeyMakerFactory
                         .createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
-                List<MatchEntries> entries = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
+                List<MatchEntry> entries = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
                         propertyLength - COMMON_PROPERTY_LENGTH, input, keyMaker, registry);
-                oxmBuilder.setMatchEntries(entries);
+                oxmBuilder.setMatchEntry(entries);
                 builder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
             } else if (type.equals(TableFeaturesPropType.OFPTFPTEXPERIMENTER)
                     || type.equals(TableFeaturesPropType.OFPTFPTEXPERIMENTERMISS)) {
index 72365a7e1d91fed7233225d617a6201b96c61aa3..b110e2d5a0f1f9229258590bc8c7447c939e29e3 100644 (file)
@@ -18,7 +18,7 @@ import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowRemovedReason;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemovedMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemovedMessageBuilder;
 
index e0110c40ea0fae26974f2e6f8fd01e2770442416..6ca9474e725a77f00f14c9e0c6c06911541a86b2 100644 (file)
@@ -15,8 +15,8 @@ import java.util.List;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.RateQueueProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.RateQueuePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueueProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueuePropertyBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueProperties;
index 5bb680bcece60b76fc34674f435108b9580a98d6..728a30988ca7823c3481c5dc485a6e896a6940ea 100644 (file)
@@ -28,7 +28,7 @@ import org.opendaylight.openflowjava.util.ExperimenterDeserializerKeyFactory;
 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.types.rev130731.MultipartRequestFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessageBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyAggregateCase;
index 7b1944a4a7266866f4db1bdc1348bf79a41e5dcf..44679569d44ec2eaef87abfd0626b37feb8901c4 100644 (file)
@@ -19,7 +19,7 @@ import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PacketInReason;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessageBuilder;
 
index d6090a3254b0fede2a591eb79f8775be70409d42..6d6f77477598154da47636aec5d3fb5ed2316a74 100644 (file)
@@ -18,8 +18,8 @@ import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegi
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.util.ExperimenterDeserializerKeyFactory;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.RateQueueProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.RateQueuePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueueProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueuePropertyBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueProperties;
index 78d868a05f8126a6edb5ebd0ca6b3ddf3a7e992d..24950a0d307f6dc626ee202a90a963b63cc18864 100644 (file)
@@ -14,13 +14,13 @@ import java.util.List;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistryInjector;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.CodeKeyMaker;
 import org.opendaylight.openflowjava.protocol.impl.util.CodeKeyMakerFactory;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.InstructionConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ListDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionsInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionsInstructionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionsInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionsInstructionBuilder;
 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.instruction.rev130731.instructions.grouping.Instruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.InstructionBuilder;
index 75bf6f501f730eb3683b851a9aeedef32dd15106..3e0ebc5fda6d92cb0df1c7fbf7ba494134d3ecc3 100644 (file)
@@ -15,8 +15,8 @@ import java.util.List;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.InstructionConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionsInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionsInstructionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionsInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionsInstructionBuilder;
 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.instruction.rev130731.instructions.grouping.Instruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.InstructionBuilder;
index 317e69c2a45d87f651591baec473c104abcae8f0..0940aae99f7ee4af2ee377e244968add8944f362 100644 (file)
@@ -12,8 +12,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.InstructionConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TableIdInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TableIdInstructionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.TableIdInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.TableIdInstructionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.GotoTable;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.InstructionBuilder;
index 1021987fb669172411ab5e39c9c7aa86789da211..fa6c6bb55fb343d5c3e9458dda96224a248113d4 100644 (file)
@@ -11,8 +11,8 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.instruction;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MeterIdInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MeterIdInstructionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MeterIdInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MeterIdInstructionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.Meter;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.InstructionBuilder;
index 9412413bd450f5b3b4b0e11be3c5cec453794651..51646b626aa6a7702a5601e19ac5808c7a1c41e7 100644 (file)
@@ -12,8 +12,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.InstructionConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataInstructionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MetadataInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MetadataInstructionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.WriteMetadata;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.InstructionBuilder;
diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmIpv4AddressDeserializer.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmIpv4AddressDeserializer.java
deleted file mode 100644 (file)
index 510b5da..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
-
-import io.netty.buffer.ByteBuf;
-
-import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
-
-/**
- * @author michal.polkorab
- *
- */
-public abstract class AbstractOxmIpv4AddressDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
-
-    @Override
-    public MatchEntries deserialize(final ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addIpv4AddressAugmentation(builder, input);
-        if (builder.isHasMask()) {
-            OxmMaskDeserializer.addMaskAugmentation(builder, input, EncodeConstants.SIZE_OF_INT_IN_BYTES);
-        }
-        return builder.build();
-    }
-
-    private static void addIpv4AddressAugmentation(final MatchEntriesBuilder builder, final ByteBuf input) {
-        Ipv4AddressMatchEntryBuilder ipv4AddressBuilder = new Ipv4AddressMatchEntryBuilder();
-        ipv4AddressBuilder.setIpv4Address(new Ipv4Address(ByteBufUtils.readIpv4Address(input)));
-        builder.addAugmentation(Ipv4AddressMatchEntry.class, ipv4AddressBuilder.build());
-    }
-}
diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmIpv6AddressDeserializer.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmIpv6AddressDeserializer.java
deleted file mode 100644 (file)
index ca5ac7e..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
-
-import io.netty.buffer.ByteBuf;
-
-import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Address;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6AddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6AddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
-
-/**
- * @author michal.polkorab
- *
- */
-public abstract class AbstractOxmIpv6AddressDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
-
-    @Override
-    public MatchEntries deserialize(final ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addIpv6AddressAugmentation(builder, input);
-        if (builder.isHasMask()) {
-            OxmMaskDeserializer.addMaskAugmentation(builder, input,
-                    EncodeConstants.SIZE_OF_IPV6_ADDRESS_IN_BYTES);
-        }
-        return builder.build();
-    }
-
-    private static void addIpv6AddressAugmentation(final MatchEntriesBuilder builder, final ByteBuf input) {
-        Ipv6AddressMatchEntryBuilder ipv6AddressBuilder = new Ipv6AddressMatchEntryBuilder();
-        ipv6AddressBuilder.setIpv6Address(new Ipv6Address(ByteBufUtils.readIpv6Address(input)));
-        builder.addAugmentation(Ipv6AddressMatchEntry.class, ipv6AddressBuilder.build());
-    }
-}
diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmMacAddressDeserializer.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmMacAddressDeserializer.java
deleted file mode 100644 (file)
index aa4b588..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
-
-import io.netty.buffer.ByteBuf;
-
-import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
-
-/**
- * @author michal.polkorab
- *
- */
-public abstract class AbstractOxmMacAddressDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
-
-    @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addMacAddressAugmentation(builder, input);
-        if (builder.isHasMask()) {
-            OxmMaskDeserializer.addMaskAugmentation(builder, input, EncodeConstants.MAC_ADDRESS_LENGTH);
-        }
-        return builder.build();
-    }
-
-    private static void addMacAddressAugmentation(MatchEntriesBuilder builder, ByteBuf input) {
-        MacAddressMatchEntryBuilder macAddress = new MacAddressMatchEntryBuilder();
-        byte[] address = new byte[EncodeConstants.MAC_ADDRESS_LENGTH];
-        input.readBytes(address);
-        macAddress.setMacAddress(new MacAddress(ByteBufUtils.macAddressToString(address)));
-        builder.addAugmentation(MacAddressMatchEntry.class, macAddress.build());
-    }
-}
index 5b9c6ba51cb057c544cce053db94dfc132413477..7eb478086b40d9b7aa73481840dcb838ccaca207 100644 (file)
@@ -11,20 +11,20 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.HeaderDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public abstract class AbstractOxmMatchEntryDeserializer implements HeaderDeserializer<MatchEntries> {
+public abstract class AbstractOxmMatchEntryDeserializer implements HeaderDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserializeHeader(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+    public MatchEntry deserializeHeader(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
         return builder.build();
     }
 
@@ -47,9 +47,9 @@ public abstract class AbstractOxmMatchEntryDeserializer implements HeaderDeseria
      * @param input input bytebuf
      * @return MatchEntriesBuilder which can be filled with MatchEntry augmentation
      */
-    protected MatchEntriesBuilder processHeader(Class<? extends OxmClassBase> oxmClass,
+    protected MatchEntryBuilder processHeader(Class<? extends OxmClassBase> oxmClass,
             Class<? extends MatchField> oxmField, ByteBuf input) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(oxmClass);
         // skip oxm_class (provided)
         input.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmMetadataDeserializer.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmMetadataDeserializer.java
deleted file mode 100644 (file)
index 4de031f..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
-
-import io.netty.buffer.ByteBuf;
-
-import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
-
-/**
- * @author michal.polkorab
- *
- */
-public abstract class AbstractOxmMetadataDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
-
-    @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addMetadataAugmentation(builder, input);
-        if (builder.isHasMask()) {
-            OxmMaskDeserializer.addMaskAugmentation(builder, input, EncodeConstants.SIZE_OF_LONG_IN_BYTES);
-        }
-        return builder.build();
-    }
-
-    private static void addMetadataAugmentation(MatchEntriesBuilder builder, ByteBuf input) {
-        MetadataMatchEntryBuilder metadata = new MetadataMatchEntryBuilder();
-        byte[] metadataBytes = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
-        input.readBytes(metadataBytes);
-        metadata.setMetadata(metadataBytes);
-        builder.addAugmentation(MetadataMatchEntry.class, metadata.build());
-    }
-}
diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmPortDeserializer.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmPortDeserializer.java
deleted file mode 100644 (file)
index 0b3530d..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
-
-import io.netty.buffer.ByteBuf;
-
-import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
-
-/**
- * @author michal.polkorab
- *
- */
-public abstract class AbstractOxmPortDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
-
-    @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addPortAugmentation(builder, input);
-        return builder.build();
-    }
-
-    private static void addPortAugmentation(MatchEntriesBuilder builder, ByteBuf input) {
-        PortMatchEntryBuilder portBuilder = new PortMatchEntryBuilder();
-        portBuilder.setPort(new PortNumber(input.readUnsignedShort()));
-        builder.addAugmentation(PortMatchEntry.class, portBuilder.build());
-    }
-}
diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmPortNumberDeserializer.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/AbstractOxmPortNumberDeserializer.java
deleted file mode 100644 (file)
index 35895a9..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
-
-import io.netty.buffer.ByteBuf;
-
-import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortNumberMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortNumberMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
-
-/**
- * @author michal.polkorab
- *
- */
-public abstract class AbstractOxmPortNumberDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
-
-    @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        PortNumberMatchEntryBuilder port = new PortNumberMatchEntryBuilder();
-        port.setPortNumber(new PortNumber(input.readUnsignedInt()));
-        builder.addAugmentation(PortNumberMatchEntry.class, port.build());
-        return builder.build();
-    }
-}
index 2d4383982f9144ee45e0ed1fb3eb935d18160d18..ebfa516061eef1285f4030730a1468d445f2084d 100644 (file)
@@ -10,33 +10,35 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OpCodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OpCodeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpOp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpOp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpOpCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.op._case.ArpOpBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmArpOpDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addArpOpAugmentation(input, builder);
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addArpOpValue(input, builder);
         return builder.build();
     }
 
-    private static void addArpOpAugmentation(ByteBuf input, MatchEntriesBuilder builder) {
-        OpCodeMatchEntryBuilder opcodeBuilder = new OpCodeMatchEntryBuilder();
-        opcodeBuilder.setOpCode(input.readUnsignedShort());
-        builder.addAugmentation(OpCodeMatchEntry.class, opcodeBuilder.build());
+    private static void addArpOpValue(ByteBuf input, MatchEntryBuilder builder) {
+        ArpOpCaseBuilder caseBuilder = new ArpOpCaseBuilder();
+        ArpOpBuilder opBuilder = new ArpOpBuilder();
+        opBuilder.setOpCode(input.readUnsignedShort());
+        caseBuilder.setArpOp(opBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index b26b9e3a041ce9a8b93891fbce7371fb233aba1c..91b4514e6a55a23c556b4d5ab98a0ce2f609afd7 100644 (file)
@@ -7,16 +7,43 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpSha;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpSha;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpShaCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.sha._case.ArpShaBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmArpShaDeserializer extends AbstractOxmMacAddressDeserializer {
+public class OxmArpShaDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addArpShaValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addArpShaValue(ByteBuf input, MatchEntryBuilder builder) {
+        ArpShaCaseBuilder caseBuilder = new ArpShaCaseBuilder();
+        ArpShaBuilder shaBuilder = new ArpShaBuilder();
+        shaBuilder.setMacAddress(OxmDeserializerHelper.convertMacAddress(input));
+        if (builder.isHasMask()) {
+            shaBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.MAC_ADDRESS_LENGTH));
+        }
+        caseBuilder.setArpSha(shaBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index cb83cb2489918eb98750ec5c469886b622af3511..149ebb0e21bd41f5586dfa6e8ba715a73b047c5a 100644 (file)
@@ -7,16 +7,45 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpSpa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpSpa;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpSpaCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.spa._case.ArpSpaBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmArpSpaDeserializer extends AbstractOxmIpv4AddressDeserializer {
+public class OxmArpSpaDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addArpSpaValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addArpSpaValue(ByteBuf input, MatchEntryBuilder builder) {
+        ArpSpaCaseBuilder caseBuilder = new ArpSpaCaseBuilder();
+        ArpSpaBuilder arpBuilder = new ArpSpaBuilder();
+        arpBuilder.setIpv4Address(new Ipv4Address(ByteBufUtils.readIpv4Address(input)));
+        if (builder.isHasMask()) {
+            arpBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.GROUPS_IN_IPV4_ADDRESS));
+        }
+        caseBuilder.setArpSpa(arpBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index 69ce30a8f9b3414c380afe5d6d0103c1ea57bd42..0e034c1f5fe42e3eaf10e0983cd7bee9985d72f6 100644 (file)
@@ -7,16 +7,43 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpTha;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpTha;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpThaCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.tha._case.ArpThaBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmArpThaDeserializer extends AbstractOxmMacAddressDeserializer {
+public class OxmArpThaDeserializer  extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addArpThaValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addArpThaValue(ByteBuf input, MatchEntryBuilder builder) {
+        ArpThaCaseBuilder caseBuilder = new ArpThaCaseBuilder();
+        ArpThaBuilder thaBuilder = new ArpThaBuilder();
+        thaBuilder.setMacAddress(OxmDeserializerHelper.convertMacAddress(input));
+        if (builder.isHasMask()) {
+            thaBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.MAC_ADDRESS_LENGTH));
+        }
+        caseBuilder.setArpTha(thaBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index dd7b27c9c23aef603f5ff4f92acabf37c5c59589..fdeaddc5858fd6b82cc4f853452b648a466ff65e 100644 (file)
@@ -7,16 +7,45 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpTpa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpTpa;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpTpaCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.tpa._case.ArpTpaBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmArpTpaDeserializer extends AbstractOxmIpv4AddressDeserializer {
+public class OxmArpTpaDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addArpTpaValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addArpTpaValue(ByteBuf input, MatchEntryBuilder builder) {
+        ArpTpaCaseBuilder caseBuilder = new ArpTpaCaseBuilder();
+        ArpTpaBuilder arpBuilder = new ArpTpaBuilder();
+        arpBuilder.setIpv4Address(new Ipv4Address(ByteBufUtils.readIpv4Address(input)));
+        if (builder.isHasMask()) {
+            arpBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.GROUPS_IN_IPV4_ADDRESS));
+        }
+        caseBuilder.setArpTpa(arpBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmDeserializerHelper.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmDeserializerHelper.java
new file mode 100644 (file)
index 0000000..1127fae
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
+
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
+
+/**
+ * @author michal.polkorab
+ *
+ */
+public final class OxmDeserializerHelper {
+
+    private OxmDeserializerHelper() {
+        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+    }
+
+    /**
+     * Converts binary data into binary mask (for match entries)
+     * @param input input ByteBuf
+     * @param matchEntryLength mask length
+     * @return binary mask
+     */
+    public static byte[] convertMask(ByteBuf input, int matchEntryLength) {
+        byte[] mask = new byte[matchEntryLength];
+        input.readBytes(mask);
+        return mask;
+    }
+
+    /**
+     * Converts binary data into mac address
+     * @param input input ByteBuf
+     * @return mac address
+     */
+    public static MacAddress convertMacAddress(ByteBuf input) {
+        byte[] address = new byte[EncodeConstants.MAC_ADDRESS_LENGTH];
+        input.readBytes(address);
+        return new MacAddress(ByteBufUtils.macAddressToString(address));
+    }
+}
index 9e1e6e20a1a1a9f364d6c2417939e8b9f1a3958c..1229ff137c1506e91da0f5b4850e7882621e46d9 100644 (file)
@@ -7,16 +7,43 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthDstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.eth.dst._case.EthDstBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmEthDstDeserializer extends AbstractOxmMacAddressDeserializer {
+public class OxmEthDstDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addEthDstValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addEthDstValue(ByteBuf input, MatchEntryBuilder builder) {
+        EthDstCaseBuilder caseBuilder = new EthDstCaseBuilder();
+        EthDstBuilder ethBuilder = new EthDstBuilder();
+        ethBuilder.setMacAddress(OxmDeserializerHelper.convertMacAddress(input));
+        if (builder.isHasMask()) {
+            ethBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.MAC_ADDRESS_LENGTH));
+        }
+        caseBuilder.setEthDst(ethBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index 3302a650020e171658e34ff868ac5dbe6a0cddb8..dc7bb80383f9804e1dc809ad10d1427b3a79564e 100644 (file)
@@ -7,16 +7,43 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthSrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.eth.src._case.EthSrcBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmEthSrcDeserializer extends AbstractOxmMacAddressDeserializer {
+public class OxmEthSrcDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addEthSrcValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addEthSrcValue(ByteBuf input, MatchEntryBuilder builder) {
+        EthSrcCaseBuilder caseBuilder = new EthSrcCaseBuilder();
+        EthSrcBuilder ethBuilder = new EthSrcBuilder();
+        ethBuilder.setMacAddress(OxmDeserializerHelper.convertMacAddress(input));
+        if (builder.isHasMask()) {
+            ethBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.MAC_ADDRESS_LENGTH));
+        }
+        caseBuilder.setEthSrc(ethBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index 94d08706f989771a409cd49c8dfc8b79d9493057..5da869e0b45b97bac64798845c2b8f61c74c67a7 100644 (file)
@@ -10,34 +10,36 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthTypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthTypeMatchEntryBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.EtherType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthTypeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.eth.type._case.EthTypeBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmEthTypeDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addEthTypeAugmentation(input, builder);
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addEthTypeValue(input, builder);
         return builder.build();
     }
 
-    private static void addEthTypeAugmentation(ByteBuf input, MatchEntriesBuilder builder) {
-        EthTypeMatchEntryBuilder ethertypeBuilder = new EthTypeMatchEntryBuilder();
-        ethertypeBuilder.setEthType(new EtherType(input.readUnsignedShort()));
-        builder.addAugmentation(EthTypeMatchEntry.class, ethertypeBuilder.build());
+    private static void addEthTypeValue(ByteBuf input, MatchEntryBuilder builder) {
+        EthTypeCaseBuilder caseBuilder = new EthTypeCaseBuilder();
+        EthTypeBuilder ethBuilder = new EthTypeBuilder();
+        ethBuilder.setEthType(new EtherType(input.readUnsignedShort()));
+        caseBuilder.setEthType(ethBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index 8ac68433dd039b96aef4153e752b982830a060ce..87a35d4e6c87770024aeb2594a02a8cb1029db68 100644 (file)
@@ -10,34 +10,35 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4CodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4CodeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv4Code;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv4Code;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv4CodeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv4.code._case.Icmpv4CodeBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmIcmpv4CodeDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addIcmpv4CodeAugmentation(input, builder);
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIcmpv4CodeValue(input, builder);
         return builder.build();
     }
 
-    private static void addIcmpv4CodeAugmentation(ByteBuf input,
-            MatchEntriesBuilder builder) {
-        Icmpv4CodeMatchEntryBuilder icmpv4CodeBuilder = new Icmpv4CodeMatchEntryBuilder();
-        icmpv4CodeBuilder.setIcmpv4Code(input.readUnsignedByte());
-        builder.addAugmentation(Icmpv4CodeMatchEntry.class, icmpv4CodeBuilder.build());
+    private static void addIcmpv4CodeValue(ByteBuf input, MatchEntryBuilder builder) {
+        Icmpv4CodeCaseBuilder caseBuilder = new Icmpv4CodeCaseBuilder();
+        Icmpv4CodeBuilder icmpBuilder = new Icmpv4CodeBuilder();
+        icmpBuilder.setIcmpv4Code(input.readUnsignedByte());
+        caseBuilder.setIcmpv4Code(icmpBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index 4134bb1c12e2676351b6be9ca8e27ec770c049b6..60aedde2cfd8fde64925db87b3996a15b9977d72 100644 (file)
@@ -10,34 +10,35 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4TypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4TypeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv4Type;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv4Type;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv4TypeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv4.type._case.Icmpv4TypeBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmIcmpv4TypeDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addIcmpv4TypeAugmentation(input, builder);
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIcmpv4TypeValue(input, builder);
         return builder.build();
     }
 
-    private static void addIcmpv4TypeAugmentation(ByteBuf input,
-            MatchEntriesBuilder builder) {
-        Icmpv4TypeMatchEntryBuilder icmpv4TypeBuilder = new Icmpv4TypeMatchEntryBuilder();
-        icmpv4TypeBuilder.setIcmpv4Type(input.readUnsignedByte());
-        builder.addAugmentation(Icmpv4TypeMatchEntry.class, icmpv4TypeBuilder.build());
+    private static void addIcmpv4TypeValue(ByteBuf input, MatchEntryBuilder builder) {
+        Icmpv4TypeCaseBuilder caseBuilder = new Icmpv4TypeCaseBuilder();
+        Icmpv4TypeBuilder icmpBuilder = new Icmpv4TypeBuilder();
+        icmpBuilder.setIcmpv4Type(input.readUnsignedByte());
+        caseBuilder.setIcmpv4Type(icmpBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index 7cc38f19319c262c3956c137b11efd38f6b8a4b1..52221c78436406732b9444a80aa2772f518a9067 100644 (file)
@@ -10,34 +10,35 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6CodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6CodeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv6Code;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv6Code;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv6CodeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv6.code._case.Icmpv6CodeBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmIcmpv6CodeDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addIcmpv6CodeAugmentation(input, builder);
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIcmpv6CodeValue(input, builder);
         return builder.build();
     }
 
-    private static void addIcmpv6CodeAugmentation(ByteBuf input,
-            MatchEntriesBuilder builder) {
-        Icmpv6CodeMatchEntryBuilder icmpv6CodeBuilder = new Icmpv6CodeMatchEntryBuilder();
-        icmpv6CodeBuilder.setIcmpv6Code(input.readUnsignedByte());
-        builder.addAugmentation(Icmpv6CodeMatchEntry.class, icmpv6CodeBuilder.build());
+    private static void addIcmpv6CodeValue(ByteBuf input, MatchEntryBuilder builder) {
+        Icmpv6CodeCaseBuilder caseBuilder = new Icmpv6CodeCaseBuilder();
+        Icmpv6CodeBuilder icmpBuilder = new Icmpv6CodeBuilder();
+        icmpBuilder.setIcmpv6Code(input.readUnsignedByte());
+        caseBuilder.setIcmpv6Code(icmpBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index de155fcbc57445a17c05a2a042f5a7ec3c545382..5d112185d496be049be84a2822db29eb3f8acf37 100644 (file)
@@ -10,31 +10,37 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6TypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6TypeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv6Type;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv6Type;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv6TypeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv6.type._case.Icmpv6TypeBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmIcmpv6TypeDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        Icmpv6TypeMatchEntryBuilder icmpv6TypeBuilder = new Icmpv6TypeMatchEntryBuilder();
-        icmpv6TypeBuilder.setIcmpv6Type(input.readUnsignedByte());
-        builder.addAugmentation(Icmpv6TypeMatchEntry.class, icmpv6TypeBuilder.build());
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIcmpv6TypeValue(input, builder);
         return builder.build();
     }
 
+    private static void addIcmpv6TypeValue(ByteBuf input, MatchEntryBuilder builder) {
+        Icmpv6TypeCaseBuilder caseBuilder = new Icmpv6TypeCaseBuilder();
+        Icmpv6TypeBuilder icmpBuilder = new Icmpv6TypeBuilder();
+        icmpBuilder.setIcmpv6Type(input.readUnsignedByte());
+        caseBuilder.setIcmpv6Type(icmpBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
+
     @Override
     protected Class<? extends MatchField> getOxmField() {
         return Icmpv6Type.class;
index 54b826f887653a69f345ad8a897532f7e6f9d6f2..8f44c8f00da62aa0018ed76301c839a88d6544ff 100644 (file)
@@ -7,16 +7,40 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPhyPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPhyPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPhyPortCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.in.phy.port._case.InPhyPortBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmInPhyPortDeserializer extends AbstractOxmPortNumberDeserializer {
+public class OxmInPhyPortDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addInPhyPortValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addInPhyPortValue(ByteBuf input, MatchEntryBuilder builder) {
+        InPhyPortCaseBuilder caseBuilder = new InPhyPortCaseBuilder();
+        InPhyPortBuilder inPhyPortBuilder = new InPhyPortBuilder();
+        inPhyPortBuilder.setPortNumber(new PortNumber(input.readUnsignedInt()));
+        caseBuilder.setInPhyPort(inPhyPortBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index 342d2a33ca08e8a463dd3a265aa01709b1542fa0..3f08f5e93462e164fb1f54ce6c3cdceffc013b7c 100644 (file)
@@ -7,16 +7,40 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPortCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.in.port._case.InPortBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmInPortDeserializer extends AbstractOxmPortNumberDeserializer {
+public class OxmInPortDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addInPortValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addInPortValue(ByteBuf input, MatchEntryBuilder builder) {
+        InPortCaseBuilder caseBuilder = new InPortCaseBuilder();
+        InPortBuilder inPortBuilder = new InPortBuilder();
+        inPortBuilder.setPortNumber(new PortNumber(input.readUnsignedInt()));
+        caseBuilder.setInPort(inPortBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index e4880ba9d59cfc4e4c2a91bbb99edd7bf32002a6..b18a9de392f0268ef1e54e7f32c54f461f534f10 100644 (file)
@@ -11,33 +11,35 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Dscp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DscpMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DscpMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpDscp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpDscp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpDscpCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ip.dscp._case.IpDscpBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmIpDscpDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addIpDscpAugmentation(input, builder);
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIpDscpValue(input, builder);
         return builder.build();
     }
 
-    private static void addIpDscpAugmentation(ByteBuf input, MatchEntriesBuilder builder) {
-        DscpMatchEntryBuilder dscpBuilder = new DscpMatchEntryBuilder();
+    private static void addIpDscpValue(ByteBuf input, MatchEntryBuilder builder) {
+        IpDscpCaseBuilder caseBuilder = new IpDscpCaseBuilder();
+        IpDscpBuilder dscpBuilder = new IpDscpBuilder();
         dscpBuilder.setDscp(new Dscp(input.readUnsignedByte()));
-        builder.addAugmentation(DscpMatchEntry.class, dscpBuilder.build());
+        caseBuilder.setIpDscp(dscpBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index 150c6dc6b17436c4124ec542b102954db69a06b7..9dd928d84f82ffc628ad6b1b1d70524f53cbb873 100644 (file)
@@ -10,33 +10,35 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EcnMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EcnMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpEcn;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpEcn;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpEcnCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ip.ecn._case.IpEcnBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmIpEcnDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addIpEcnAugmentation(input, builder);
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIpEcnValue(input, builder);
         return builder.build();
     }
 
-    private static void addIpEcnAugmentation(ByteBuf input, MatchEntriesBuilder builder) {
-        EcnMatchEntryBuilder ecnBuilder = new EcnMatchEntryBuilder();
+    private static void addIpEcnValue(ByteBuf input, MatchEntryBuilder builder) {
+        IpEcnCaseBuilder caseBuilder = new IpEcnCaseBuilder();
+        IpEcnBuilder ecnBuilder = new IpEcnBuilder();
         ecnBuilder.setEcn(input.readUnsignedByte());
-        builder.addAugmentation(EcnMatchEntry.class, ecnBuilder.build());
+        caseBuilder.setIpEcn(ecnBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index 9e67af39cd4c871787dfe41cd0d95d1c9ac83efc..4861841de298358b4bc93359d38fc06bf283ba7d 100644 (file)
@@ -10,33 +10,35 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ProtocolNumberMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ProtocolNumberMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpProto;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpProto;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpProtoCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ip.proto._case.IpProtoBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmIpProtoDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addIpProtoAugmentation(input, builder);
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIpProtoValue(input, builder);
         return builder.build();
     }
 
-    private static void addIpProtoAugmentation(ByteBuf input, MatchEntriesBuilder builder) {
-        ProtocolNumberMatchEntryBuilder protoNumberBuilder = new ProtocolNumberMatchEntryBuilder();
-        protoNumberBuilder.setProtocolNumber(input.readUnsignedByte());
-        builder.addAugmentation(ProtocolNumberMatchEntry.class, protoNumberBuilder.build());
+    private static void addIpProtoValue(ByteBuf input, MatchEntryBuilder builder) {
+        IpProtoCaseBuilder caseBuilder = new IpProtoCaseBuilder();
+        IpProtoBuilder protoBuilder = new IpProtoBuilder();
+        protoBuilder.setProtocolNumber(input.readUnsignedByte());
+        caseBuilder.setIpProto(protoBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index 9939fed95ed7cfb24b6d75fe903f29f612b0f544..d0e5fc1adee4ffb8ff0eebb5531012118717c58e 100644 (file)
@@ -7,16 +7,45 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv4Dst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv4Dst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv4DstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv4.dst._case.Ipv4DstBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmIpv4DstDeserializer extends AbstractOxmIpv4AddressDeserializer {
+public class OxmIpv4DstDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIpv4DstValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addIpv4DstValue(ByteBuf input, MatchEntryBuilder builder) {
+        Ipv4DstCaseBuilder caseBuilder = new Ipv4DstCaseBuilder();
+        Ipv4DstBuilder ipv4Builder = new Ipv4DstBuilder();
+        ipv4Builder.setIpv4Address(new Ipv4Address(ByteBufUtils.readIpv4Address(input)));
+        if (builder.isHasMask()) {
+            ipv4Builder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.GROUPS_IN_IPV4_ADDRESS));
+        }
+        caseBuilder.setIpv4Dst(ipv4Builder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index a84b2fa3c3365359430e7b7d4c9b44df23626d3e..fdd020c69256589cf2f040e561aa3a6cf06726fd 100644 (file)
@@ -7,16 +7,45 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv4Src;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv4Src;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv4SrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv4.src._case.Ipv4SrcBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmIpv4SrcDeserializer extends AbstractOxmIpv4AddressDeserializer {
+public class OxmIpv4SrcDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIpv4SrcValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addIpv4SrcValue(ByteBuf input, MatchEntryBuilder builder) {
+        Ipv4SrcCaseBuilder caseBuilder = new Ipv4SrcCaseBuilder();
+        Ipv4SrcBuilder ipv4Builder = new Ipv4SrcBuilder();
+        ipv4Builder.setIpv4Address(new Ipv4Address(ByteBufUtils.readIpv4Address(input)));
+        if (builder.isHasMask()) {
+            ipv4Builder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.GROUPS_IN_IPV4_ADDRESS));
+        }
+        caseBuilder.setIpv4Src(ipv4Builder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index 11b5cc3ac7e47ebe1b4ba9b59927ea69fd14bddc..364cbaef6b644838a3ea942e89c4e67b263fa667 100644 (file)
@@ -7,16 +7,45 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Dst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Address;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Dst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6DstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.dst._case.Ipv6DstBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmIpv6DstDeserializer extends AbstractOxmIpv6AddressDeserializer {
+public class OxmIpv6DstDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIpv6DstValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addIpv6DstValue(ByteBuf input, MatchEntryBuilder builder) {
+        Ipv6DstCaseBuilder caseBuilder = new Ipv6DstCaseBuilder();
+        Ipv6DstBuilder ipv6Builder = new Ipv6DstBuilder();
+        ipv6Builder.setIpv6Address(new Ipv6Address(ByteBufUtils.readIpv6Address(input)));
+        if (builder.isHasMask()) {
+            ipv6Builder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.SIZE_OF_IPV6_ADDRESS_IN_BYTES));
+        }
+        caseBuilder.setIpv6Dst(ipv6Builder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index 7267333cac94c8990407ba42ed15f9247b433c16..9b17035bd8d10b2b580e9469715e72b819b94dc6 100644 (file)
@@ -11,36 +11,43 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PseudoFieldMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PseudoFieldMatchEntryBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.Ipv6ExthdrFlags;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Exthdr;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Exthdr;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6ExthdrCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.exthdr._case.Ipv6ExthdrBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmIpv6ExtHdrDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addIpv6ExtHdrAugmentation(input, builder);
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIpv6ExtHdrValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addIpv6ExtHdrValue(ByteBuf input, MatchEntryBuilder builder) {
+        Ipv6ExthdrCaseBuilder caseBuilder = new Ipv6ExthdrCaseBuilder();
+        Ipv6ExthdrBuilder extHdrBuilder = new Ipv6ExthdrBuilder();
+        extHdrBuilder.setPseudoField(convertPseudofields(input));
         if (builder.isHasMask()) {
-            OxmMaskDeserializer.addMaskAugmentation(builder, input, EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
+            extHdrBuilder.setMask(OxmDeserializerHelper
+                    .convertMask(input, EncodeConstants.SIZE_OF_SHORT_IN_BYTES));
         }
-        return builder.build();
+        caseBuilder.setIpv6Exthdr(extHdrBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
-    private static void addIpv6ExtHdrAugmentation(ByteBuf input,
-            MatchEntriesBuilder builder) {
-        PseudoFieldMatchEntryBuilder pseudoBuilder = new PseudoFieldMatchEntryBuilder();
+    private static Ipv6ExthdrFlags convertPseudofields(ByteBuf input) {
         int bitmap = input.readUnsignedShort();
         final Boolean nonext = ((bitmap) & (1<<0)) != 0;
         final Boolean esp = ((bitmap) & (1<<1)) != 0;
@@ -51,8 +58,7 @@ public class OxmIpv6ExtHdrDeserializer extends AbstractOxmMatchEntryDeserializer
         final Boolean hop = ((bitmap) & (1<<6)) != 0;
         final Boolean unrep = ((bitmap) & (1<<7)) != 0;
         final Boolean unseq = ((bitmap) & (1<<8)) != 0;
-        pseudoBuilder.setPseudoField(new Ipv6ExthdrFlags(auth, dest, esp, frag, hop, nonext, router, unrep, unseq));
-        builder.addAugmentation(PseudoFieldMatchEntry.class, pseudoBuilder.build());
+        return new Ipv6ExthdrFlags(auth, dest, esp, frag, hop, nonext, router, unrep, unseq);
     }
 
     @Override
index 15c8aa07bdb40a8adbd0e4260d11732719da8bda..9016af5d64105f3791d635de830446b83d0c24dd 100644 (file)
@@ -12,37 +12,39 @@ import io.netty.buffer.ByteBuf;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6FlowLabel;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6FlabelMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6FlabelMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Flabel;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Flabel;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6FlabelCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.flabel._case.Ipv6FlabelBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmIpv6FlabelDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addIpv6FlabelAugmentation(input, builder);
-        if (builder.isHasMask()) {
-            OxmMaskDeserializer.addMaskAugmentation(builder, input, EncodeConstants.SIZE_OF_INT_IN_BYTES);
-        }
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIpv6FlabelValue(input, builder);
         return builder.build();
     }
 
-    private static void addIpv6FlabelAugmentation(ByteBuf input,
-            MatchEntriesBuilder builder) {
-        Ipv6FlabelMatchEntryBuilder ipv6FlabelBuilder = new Ipv6FlabelMatchEntryBuilder();
-        ipv6FlabelBuilder.setIpv6Flabel(new Ipv6FlowLabel(input.readUnsignedInt()));
-        builder.addAugmentation(Ipv6FlabelMatchEntry.class, ipv6FlabelBuilder.build());
+    private static void addIpv6FlabelValue(ByteBuf input, MatchEntryBuilder builder) {
+        Ipv6FlabelCaseBuilder caseBuilder = new Ipv6FlabelCaseBuilder();
+        Ipv6FlabelBuilder labelBuilder = new Ipv6FlabelBuilder();
+        labelBuilder.setIpv6Flabel(new Ipv6FlowLabel(input.readUnsignedInt()));
+        if (builder.isHasMask()) {
+            labelBuilder.setMask(OxmDeserializerHelper.convertMask(input,
+                    EncodeConstants.SIZE_OF_INT_IN_BYTES));
+        }
+        caseBuilder.setIpv6Flabel(labelBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index 3ca7b686626eb68c0c77572ffcc4ed82537b57a0..ad37cd0ea45a7c23a00622a4b7e058674d82a687 100644 (file)
@@ -7,16 +7,39 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdSll;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdSll;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdSllCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.nd.sll._case.Ipv6NdSllBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmIpv6NdSllDeserializer extends AbstractOxmMacAddressDeserializer {
+public class OxmIpv6NdSllDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIpv6NdSllValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addIpv6NdSllValue(ByteBuf input, MatchEntryBuilder builder) {
+        Ipv6NdSllCaseBuilder caseBuilder = new Ipv6NdSllCaseBuilder();
+        Ipv6NdSllBuilder ndBuilder = new Ipv6NdSllBuilder();
+        ndBuilder.setMacAddress(OxmDeserializerHelper.convertMacAddress(input));
+        caseBuilder.setIpv6NdSll(ndBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index 5b2543c1f2407d1075a99453172aa69c7477cac0..2afd9a50af5dfe7537cd4a4a98dc345c7b6e2d96 100644 (file)
@@ -7,16 +7,41 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdTarget;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Address;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdTarget;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdTargetCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.nd.target._case.Ipv6NdTargetBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmIpv6NdTargetDeserializer extends AbstractOxmIpv6AddressDeserializer {
+public class OxmIpv6NdTargetDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIpv6NdTargetValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addIpv6NdTargetValue(ByteBuf input, MatchEntryBuilder builder) {
+        Ipv6NdTargetCaseBuilder caseBuilder = new Ipv6NdTargetCaseBuilder();
+        Ipv6NdTargetBuilder ipv6Builder = new Ipv6NdTargetBuilder();
+        ipv6Builder.setIpv6Address(new Ipv6Address(ByteBufUtils.readIpv6Address(input)));
+        caseBuilder.setIpv6NdTarget(ipv6Builder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index fabc8d45b4976e8e64370f63ce0d5ea3547210f1..449c01ca847c92ab9fb304831f2d308dbd4e7b07 100644 (file)
@@ -7,16 +7,39 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdTll;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdTll;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdTllCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.nd.tll._case.Ipv6NdTllBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmIpv6NdTllDeserializer extends AbstractOxmMacAddressDeserializer {
+public class OxmIpv6NdTllDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIpv6NdTllValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addIpv6NdTllValue(ByteBuf input, MatchEntryBuilder builder) {
+        Ipv6NdTllCaseBuilder caseBuilder = new Ipv6NdTllCaseBuilder();
+        Ipv6NdTllBuilder ndBuilder = new Ipv6NdTllBuilder();
+        ndBuilder.setMacAddress(OxmDeserializerHelper.convertMacAddress(input));
+        caseBuilder.setIpv6NdTll(ndBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index 59152b45eef0e1c9974318ec94dcd657ed47c089..4b486f0bc550c23ca394df96e7b9a70594bb536a 100644 (file)
@@ -7,16 +7,45 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Src;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Address;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Src;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6SrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.src._case.Ipv6SrcBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmIpv6SrcDeserializer extends AbstractOxmIpv6AddressDeserializer {
+public class OxmIpv6SrcDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addIpv6SrcValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addIpv6SrcValue(ByteBuf input, MatchEntryBuilder builder) {
+        Ipv6SrcCaseBuilder caseBuilder = new Ipv6SrcCaseBuilder();
+        Ipv6SrcBuilder ipv6Builder = new Ipv6SrcBuilder();
+        ipv6Builder.setIpv6Address(new Ipv6Address(ByteBufUtils.readIpv6Address(input)));
+        if (builder.isHasMask()) {
+            ipv6Builder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.SIZE_OF_IPV6_ADDRESS_IN_BYTES));
+        }
+        caseBuilder.setIpv6Src(ipv6Builder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmMaskDeserializer.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmMaskDeserializer.java
deleted file mode 100644 (file)
index ff8b7ff..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
-
-import io.netty.buffer.ByteBuf;
-
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
-
-/**
- * @author michal.polkorab
- *
- */
-public final class OxmMaskDeserializer {
-
-    private OxmMaskDeserializer() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
-    }
-
-    /**
-     * Appends mask to match entry (match entry builder)
-     * @param builder builder which the mask will append to
-     * @param input input ByteBuf
-     * @param matchEntryLength mask length
-     */
-    public static void addMaskAugmentation(MatchEntriesBuilder builder, ByteBuf input,
-            int matchEntryLength) {
-        MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-        byte[] mask = new byte[matchEntryLength];
-        input.readBytes(mask);
-        maskBuilder.setMask(mask);
-        builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
-    }
-}
index ae34635bdefc2bcade1e0b88821e71a39398a7a4..0f16de8a1d94f1d60920bcf87aea6cd7e812a6b7 100644 (file)
@@ -7,16 +7,46 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Metadata;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Metadata;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MetadataCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.metadata._case.MetadataBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmMetadataDeserializer extends AbstractOxmMetadataDeserializer {
+public class OxmMetadataDeserializer  extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addMetadataValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addMetadataValue(ByteBuf input, MatchEntryBuilder builder) {
+        MetadataCaseBuilder caseBuilder = new MetadataCaseBuilder();
+        MetadataBuilder metadataBuilder = new MetadataBuilder();
+        byte[] metadataBytes = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
+        input.readBytes(metadataBytes);
+        metadataBuilder.setMetadata(metadataBytes);
+        if (builder.isHasMask()) {
+            metadataBuilder.setMask(OxmDeserializerHelper
+                    .convertMask(input, EncodeConstants.SIZE_OF_LONG_IN_BYTES));
+        }
+        caseBuilder.setMetadata(metadataBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index 65ebac39671c5afff621537fc9d640d2d428dccc..ec68bef8fd1c50683fe00a98f7e1ed6a606a2432 100644 (file)
@@ -10,39 +10,39 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.BosMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.BosMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsBos;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsBos;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsBosCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.mpls.bos._case.MplsBosBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmMplsBosDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addMplsBosDeserializer(input, builder);
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addMplsBosValue(input, builder);
         return builder.build();
     }
 
-
-    private static void addMplsBosDeserializer(ByteBuf input,
-            MatchEntriesBuilder builder) {
-        BosMatchEntryBuilder bosBuilder = new BosMatchEntryBuilder();
+    private static void addMplsBosValue(ByteBuf input, MatchEntryBuilder builder) {
+        MplsBosCaseBuilder caseBuilder = new MplsBosCaseBuilder();
+        MplsBosBuilder bosBuilder = new MplsBosBuilder();
         if (input.readUnsignedByte() != 0) {
             bosBuilder.setBos(true);
         } else {
             bosBuilder.setBos(false);
         }
-        builder.addAugmentation(BosMatchEntry.class, bosBuilder.build());
+        caseBuilder.setMplsBos(bosBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index d7c4fe4fa611b36d4aa5b5e5c5f55edf61acad10..afc41d27043794ff8a9178bc5023600b44d14cc3 100644 (file)
@@ -10,34 +10,35 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsLabelMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsLabelMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsLabel;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsLabel;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsLabelCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.mpls.label._case.MplsLabelBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmMplsLabelDeserializer extends AbstractOxmMatchEntryDeserializer
-implements OFDeserializer<MatchEntries> {
+    implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addMplsLabelAugmentation(input, builder);
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addMplsLabelValue(input, builder);
         return builder.build();
     }
 
-    private static void addMplsLabelAugmentation(ByteBuf input,
-            MatchEntriesBuilder builder) {
-        MplsLabelMatchEntryBuilder mplsLabelBuilder = new MplsLabelMatchEntryBuilder();
-        mplsLabelBuilder.setMplsLabel(input.readUnsignedInt());
-        builder.addAugmentation(MplsLabelMatchEntry.class, mplsLabelBuilder.build());
+    private static void addMplsLabelValue(ByteBuf input, MatchEntryBuilder builder) {
+        MplsLabelCaseBuilder caseBuilder = new MplsLabelCaseBuilder();
+        MplsLabelBuilder labelBuilder = new MplsLabelBuilder();
+        labelBuilder.setMplsLabel(input.readUnsignedInt());
+        caseBuilder.setMplsLabel(labelBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index 10cb8d28df19b5f0820922434292b28250b1d818..ed77c9025f616e0f6876916d5e59ee5559e35796 100644 (file)
@@ -10,34 +10,35 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TcMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TcMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsTc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsTc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsTcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.mpls.tc._case.MplsTcBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmMplsTcDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addMplsTcAugmentation(input, builder);
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addMplsTcValue(input, builder);
         return builder.build();
     }
 
-    private static void addMplsTcAugmentation(ByteBuf input,
-            MatchEntriesBuilder builder) {
-        TcMatchEntryBuilder tcBuilder = new TcMatchEntryBuilder();
+    private static void addMplsTcValue(ByteBuf input, MatchEntryBuilder builder) {
+        MplsTcCaseBuilder caseBuilder = new MplsTcCaseBuilder();
+        MplsTcBuilder tcBuilder = new MplsTcBuilder();
         tcBuilder.setTc(input.readUnsignedByte());
-        builder.addAugmentation(TcMatchEntry.class, tcBuilder.build());
+        caseBuilder.setMplsTc(tcBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index e400ba36246827f7ea7a6ea3ae6485316e6ee14b..5c5b159237f059b35479443f701865681371c5b1 100644 (file)
@@ -11,38 +11,40 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IsidMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IsidMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.PbbIsid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.PbbIsid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.PbbIsidCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.pbb.isid._case.PbbIsidBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmPbbIsidDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addPbbIsidAugmentation(input, builder);
-        if (builder.isHasMask()) {
-            OxmMaskDeserializer.addMaskAugmentation(builder, input, EncodeConstants.SIZE_OF_3_BYTES);
-        }
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addPbbIsidValue(input, builder);
         return builder.build();
     }
 
-    private static void addPbbIsidAugmentation(ByteBuf input,
-            MatchEntriesBuilder builder) {
-        IsidMatchEntryBuilder isidBuilder = new IsidMatchEntryBuilder();
+    private static void addPbbIsidValue(ByteBuf input, MatchEntryBuilder builder) {
+        PbbIsidCaseBuilder caseBuilder = new PbbIsidCaseBuilder();
+        PbbIsidBuilder isidBuilder = new PbbIsidBuilder();
         Integer isid = input.readUnsignedMedium();
         isidBuilder.setIsid(isid.longValue());
-        builder.addAugmentation(IsidMatchEntry.class, isidBuilder.build());
+        if (builder.isHasMask()) {
+            isidBuilder.setMask(OxmDeserializerHelper
+                    .convertMask(input, EncodeConstants.SIZE_OF_3_BYTES));
+        }
+        caseBuilder.setPbbIsid(isidBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index 0985b75236439106a6d8c8daea8fd536ac1d7533..bbc137d59009810f3efc47c8fd285233b263cb18 100644 (file)
@@ -7,16 +7,40 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.SctpDst;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.SctpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.SctpDstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.sctp.dst._case.SctpDstBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmSctpDstDeserializer extends AbstractOxmPortDeserializer {
+public class OxmSctpDstDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addSctpDstValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addSctpDstValue(ByteBuf input, MatchEntryBuilder builder) {
+        SctpDstCaseBuilder caseBuilder = new SctpDstCaseBuilder();
+        SctpDstBuilder sctpBuilder = new SctpDstBuilder();
+        sctpBuilder.setPort(new PortNumber(input.readUnsignedShort()));
+        caseBuilder.setSctpDst(sctpBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index 087e86b0dc8ff0a726fb1f93428bb0efd2166977..4a46edfd9d6ad7eb07da468e3f268b2db27dffca 100644 (file)
@@ -7,16 +7,40 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.SctpSrc;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.SctpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.SctpSrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.sctp.src._case.SctpSrcBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmSctpSrcDeserializer extends AbstractOxmPortDeserializer {
+public class OxmSctpSrcDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addSctpSrcValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addSctpSrcValue(ByteBuf input, MatchEntryBuilder builder) {
+        SctpSrcCaseBuilder caseBuilder = new SctpSrcCaseBuilder();
+        SctpSrcBuilder sctpBuilder = new SctpSrcBuilder();
+        sctpBuilder.setPort(new PortNumber(input.readUnsignedShort()));
+        caseBuilder.setSctpSrc(sctpBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index 1ab75029909cf4883087add68a0facda28bd3578..55769578debd905a17f3a63cda3b9dd3e4d9bd65 100644 (file)
@@ -7,16 +7,40 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TcpDst;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TcpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TcpDstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.tcp.dst._case.TcpDstBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmTcpDstDeserializer extends AbstractOxmPortDeserializer {
+public class OxmTcpDstDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addTcpDstValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addTcpDstValue(ByteBuf input, MatchEntryBuilder builder) {
+        TcpDstCaseBuilder caseBuilder = new TcpDstCaseBuilder();
+        TcpDstBuilder tcpBuilder = new TcpDstBuilder();
+        tcpBuilder.setPort(new PortNumber(input.readUnsignedShort()));
+        caseBuilder.setTcpDst(tcpBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
@@ -27,4 +51,5 @@ public class OxmTcpDstDeserializer extends AbstractOxmPortDeserializer {
     protected Class<? extends OxmClassBase> getOxmClass() {
         return OpenflowBasicClass.class;
     }
+
 }
index e1509dc70fc5cd8db44427de3c430cdc99a77198..57f44d164a00e31ae04d002c4b0687b0b46b736e 100644 (file)
@@ -7,16 +7,40 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TcpSrc;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TcpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TcpSrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.tcp.src._case.TcpSrcBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmTcpSrcDeserializer extends AbstractOxmPortDeserializer {
+public class OxmTcpSrcDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addTcpSrcValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addTcpSrcValue(ByteBuf input, MatchEntryBuilder builder) {
+        TcpSrcCaseBuilder caseBuilder = new TcpSrcCaseBuilder();
+        TcpSrcBuilder tcpBuilder = new TcpSrcBuilder();
+        tcpBuilder.setPort(new PortNumber(input.readUnsignedShort()));
+        caseBuilder.setTcpSrc(tcpBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index 84a407af6c3440e9209494e11c14ce70cc9ee0d0..86e1865b9338c3e106f2ba5c5ab0cee95dcf191b 100644 (file)
@@ -7,16 +7,46 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TunnelId;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TunnelId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TunnelIdCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.tunnel.id._case.TunnelIdBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmTunnelIdDeserializer extends AbstractOxmMetadataDeserializer {
+public class OxmTunnelIdDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addTunnelIdValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addTunnelIdValue(ByteBuf input, MatchEntryBuilder builder) {
+        TunnelIdCaseBuilder caseBuilder = new TunnelIdCaseBuilder();
+        TunnelIdBuilder tunnelIdBuilder = new TunnelIdBuilder();
+        byte[] metadataBytes = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
+        input.readBytes(metadataBytes);
+        tunnelIdBuilder.setTunnelId(metadataBytes);
+        if (builder.isHasMask()) {
+            tunnelIdBuilder.setMask(OxmDeserializerHelper
+                    .convertMask(input, EncodeConstants.SIZE_OF_LONG_IN_BYTES));
+        }
+        caseBuilder.setTunnelId(tunnelIdBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index 01d37bebeba326a748d071cd7659335f2d7adec0..b631c8152366f3cda1eaa03e023024c67405509c 100644 (file)
@@ -7,16 +7,40 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.UdpDst;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.UdpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.UdpDstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.udp.dst._case.UdpDstBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmUdpDstDeserializer extends AbstractOxmPortDeserializer {
+public class OxmUdpDstDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addUdpDstValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addUdpDstValue(ByteBuf input, MatchEntryBuilder builder) {
+        UdpDstCaseBuilder caseBuilder = new UdpDstCaseBuilder();
+        UdpDstBuilder udpBuilder = new UdpDstBuilder();
+        udpBuilder.setPort(new PortNumber(input.readUnsignedShort()));
+        caseBuilder.setUdpDst(udpBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index d4da07527ab98070f26d264aaee6d322cb15c2ab..29c722d866ee599b8f54841ed4bd99e92e868815 100644 (file)
@@ -7,16 +7,40 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.UdpSrc;
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.UdpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.UdpSrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.udp.src._case.UdpSrcBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmUdpSrcDeserializer extends AbstractOxmPortDeserializer {
+public class OxmUdpSrcDeserializer extends AbstractOxmMatchEntryDeserializer
+        implements OFDeserializer<MatchEntry> {
+
+    @Override
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addUdpSrcValue(input, builder);
+        return builder.build();
+    }
+
+    private static void addUdpSrcValue(ByteBuf input, MatchEntryBuilder builder) {
+        UdpSrcCaseBuilder caseBuilder = new UdpSrcCaseBuilder();
+        UdpSrcBuilder udpBuilder = new UdpSrcBuilder();
+        udpBuilder.setPort(new PortNumber(input.readUnsignedShort()));
+        caseBuilder.setUdpSrc(udpBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+    }
 
     @Override
     protected Class<? extends MatchField> getOxmField() {
index 332fa751976f1932ad52fa6e97393a9b6d057d16..28c60783ffcc586bb32f92f7cc4f76a2ebc84872 100644 (file)
@@ -10,33 +10,35 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanPcpMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanPcpMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.VlanPcp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.VlanPcp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanPcpCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.vlan.pcp._case.VlanPcpBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmVlanPcpDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addVlanPcpAugmentation(input, builder);
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addVlanPcpValue(input, builder);
         return builder.build();
     }
 
-    private static void addVlanPcpAugmentation(ByteBuf input, MatchEntriesBuilder builder) {
-        VlanPcpMatchEntryBuilder vlanPcpBuilder = new VlanPcpMatchEntryBuilder();
-        vlanPcpBuilder.setVlanPcp(input.readUnsignedByte());
-        builder.addAugmentation(VlanPcpMatchEntry.class, vlanPcpBuilder.build());
+    private static void addVlanPcpValue(ByteBuf input, MatchEntryBuilder builder) {
+        VlanPcpCaseBuilder caseBuilder = new VlanPcpCaseBuilder();
+        VlanPcpBuilder vlanBuilder = new VlanPcpBuilder();
+        vlanBuilder.setVlanPcp(input.readUnsignedByte());
+        caseBuilder.setVlanPcp(vlanBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index 0508dbaba5ff7e96c6c1e84cbafd37a6b8bae8cb..7292e61f61365c69fdcab2ae0a0862a272c55c25 100644 (file)
@@ -11,38 +11,41 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.VlanVid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.VlanVid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanVidCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.vlan.vid._case.VlanVidBuilder;
 
 /**
  * @author michal.polkorab
  *
  */
 public class OxmVlanVidDeserializer extends AbstractOxmMatchEntryDeserializer
-        implements OFDeserializer<MatchEntries> {
+        implements OFDeserializer<MatchEntry> {
 
     @Override
-    public MatchEntries deserialize(ByteBuf input) {
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
-        addVlanVidAugmentation(input, builder);
-        if (builder.isHasMask()) {
-            OxmMaskDeserializer.addMaskAugmentation(builder, input, EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
-        }
+    public MatchEntry deserialize(ByteBuf input) {
+        MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        addVlanVidValue(input, builder);
         return builder.build();
     }
 
-    private static void addVlanVidAugmentation(ByteBuf input, MatchEntriesBuilder builder) {
-        VlanVidMatchEntryBuilder vlanVidBuilder = new VlanVidMatchEntryBuilder();
+    private static void addVlanVidValue(ByteBuf input, MatchEntryBuilder builder) {
+        VlanVidCaseBuilder caseBuilder = new VlanVidCaseBuilder();
+        VlanVidBuilder vlanBuilder = new VlanVidBuilder();
         int vidEntryValue = input.readUnsignedShort();
-        vlanVidBuilder.setCfiBit((vidEntryValue & (1 << 12)) != 0); // cfi is 13-th bit
-        vlanVidBuilder.setVlanVid(vidEntryValue & ((1 << 12) - 1)); // value without 13-th bit
-        builder.addAugmentation(VlanVidMatchEntry.class, vlanVidBuilder.build());
+        vlanBuilder.setCfiBit((vidEntryValue & (1 << 12)) != 0); // cfi is 13-th bit
+        vlanBuilder.setVlanVid(vidEntryValue & ((1 << 12) - 1)); // value without 13-th bit
+        if (builder.isHasMask()) {
+            vlanBuilder.setMask(OxmDeserializerHelper
+                    .convertMask(input, EncodeConstants.SIZE_OF_SHORT_IN_BYTES));
+        }
+        caseBuilder.setVlanVid(vlanBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
     }
 
     @Override
index 027b800619ef7c1ee1f0b995bef906fd88e87e0c..55d92239bef453f7b98112ee70c9f86de5dd85e6 100644 (file)
@@ -50,51 +50,47 @@ import org.opendaylight.openflowjava.protocol.impl.serialization.match.OxmUdpSrc
 import org.opendaylight.openflowjava.protocol.impl.serialization.match.OxmVlanPcpSerializer;
 import org.opendaylight.openflowjava.protocol.impl.serialization.match.OxmVlanVidSerializer;
 import org.opendaylight.openflowjava.protocol.impl.util.MatchEntrySerializerRegistryHelper;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpOp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpSha;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpSpa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpTha;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpTpa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv4Code;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv4Type;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv6Code;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv6Type;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPhyPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpDscp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpEcn;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpProto;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv4Dst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv4Src;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Dst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Exthdr;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Flabel;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdSll;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdTarget;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdTll;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Src;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Metadata;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsBos;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsLabel;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsTc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Nxm1Class;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.PbbIsid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.SctpDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.SctpSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TcpDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TcpFlag;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TcpSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TunnelId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TunnelIpv4Dst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TunnelIpv4Src;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.UdpDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.UdpSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.VlanPcp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.VlanVid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpOp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpSha;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpSpa;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpTha;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpTpa;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv4Code;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv4Type;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv6Code;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv6Type;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPhyPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpDscp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpEcn;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpProto;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv4Dst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv4Src;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Dst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Exthdr;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Flabel;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdSll;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdTarget;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdTll;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Src;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Metadata;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsBos;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsLabel;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsTc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.PbbIsid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.SctpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.SctpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TcpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TcpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TunnelId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.UdpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.UdpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.VlanPcp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.VlanVid;
 
 /**
  * Initializes serializer registry with match entry serializers
index e1f2d4476d15301788e646d15810a99473237c3b..26cdda1a0b3e80f4894230326c9b7d3e4d014110 100644 (file)
@@ -18,8 +18,8 @@ import org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.OF10MatchSerializer;
 import org.opendaylight.openflowjava.protocol.impl.util.OF13MatchSerializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index 33858e336e46f04ac4acbca5acdd020390e8ed69..57f3ae4379ccbe6372e18b752a134b509d8be264 100644 (file)
@@ -11,7 +11,7 @@ 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.augments.rev131002.EthertypeAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.EthertypeAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
 
 /**
index fd7c4b5f158cc4526dccf4544ba75e94a83e4981..cbc379089f65c5a1a497794ce33d46e33774cd80 100644 (file)
@@ -11,7 +11,7 @@ package org.opendaylight.openflowjava.protocol.impl.serialization.action;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IpAddressAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.IpAddressAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
 
 /**
index 770d1892b463d83b29418b564739e0e6b6dcdf29..cfc6088edaf61f28b08b0ab25e9ce034ce36585c 100644 (file)
@@ -12,7 +12,7 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DlAddressAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.DlAddressAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
 
 /**
index 194669a8d8c3a4a340fc724e92af46b6a5806055..3e179228568e4ffe885d2a226466aee114e52313 100644 (file)
@@ -11,7 +11,7 @@ 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.augments.rev131002.PortAction;
+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;
 
 /**
index 59ec7d61a41b3e1e375dd36568240f22d6c8c092..4b0876817624ac235ae6bf78c88c6b6efc907fa9 100644 (file)
@@ -11,8 +11,8 @@ 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.augments.rev131002.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.QueueIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.QueueIdAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
 
 /**
index 38e45587822ce439b0a49013f53ed09fbf426777..83396c9e15ff7529a5eaa3277239701a2efdfa4a 100644 (file)
@@ -11,8 +11,8 @@ 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.augments.rev131002.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
+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;
 
 /**
index c75335c2f967f719325bd2f73479027fc380dde0..20365dbbf8466579ad39266cf453f22cc7951bfd 100644 (file)
@@ -11,7 +11,7 @@ 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.augments.rev131002.NwTosAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTosAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
 
 /**
index 973d026c725b9f81338aee23ed102b9d46f25cf9..1a7683b4128afa6f0b3455e5e918bc588d5f254e 100644 (file)
@@ -11,7 +11,7 @@ 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.augments.rev131002.VlanPcpAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.VlanPcpAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
 
 /**
index afe000c9f3a245bb085b68ea7a3c6de48a57cca1..e9aac905dbaf2a68b885f6a7a8a442a173738ebd 100644 (file)
@@ -11,7 +11,7 @@ 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.augments.rev131002.VlanVidAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.VlanVidAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
 
 /**
index 6e87760a0b50ba096f9a07147590090f8edbd08c..8662789971cf6453d3bfd9865ff5d0da7726ce6b 100644 (file)
@@ -11,7 +11,7 @@ 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.augments.rev131002.GroupIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.GroupIdAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
 
 /**
index 0b6c56586612ec54df7949ae46d9ef8315c7110c..001cf46e2f63e0e49149a25288ee23a17a5085dd 100644 (file)
@@ -11,8 +11,8 @@ 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.augments.rev131002.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
+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;
 
 /**
index 65eefec9de5d1ae19bd5ad014877b10423d7f63c..3e1e77f004b74f1b68188508efda1d498f49944a 100644 (file)
@@ -16,12 +16,12 @@ import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegist
 import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistryInjector;
 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMatchEntry;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmFieldsAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmFieldsAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.oxm.container.match.entry.value.ExperimenterIdCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ExperimenterClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ExperimenterClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
 
 /**
  * @author michal.polkorab
@@ -39,16 +39,16 @@ public class OF13SetFieldActionSerializer implements OFSerializer<Action>,
         int lengthIndex = outBuffer.writerIndex();
         outBuffer.writeShort(EncodeConstants.EMPTY_LENGTH);
         OxmFieldsAction oxmField = action.getAugmentation(OxmFieldsAction.class);
-        MatchEntries entry = oxmField.getMatchEntries().get(0);
+        MatchEntry entry = oxmField.getMatchEntry().get(0);
         MatchEntrySerializerKey<?, ?> key = new MatchEntrySerializerKey<>(
                 EncodeConstants.OF13_VERSION_ID, entry.getOxmClass(), entry.getOxmMatchField());
         if (entry.getOxmClass().equals(ExperimenterClass.class)) {
-            key.setExperimenterId(entry.getAugmentation(ExperimenterIdMatchEntry.class)
-                    .getExperimenter().getValue());
+            ExperimenterIdCase experimenterIdCase = (ExperimenterIdCase) entry.getMatchEntryValue();
+            key.setExperimenterId(experimenterIdCase.getExperimenter().getExperimenter().getValue());
         } else {
             key.setExperimenterId(null);
         }
-        OFSerializer<MatchEntries> serializer = registry.getSerializer(key);
+        OFSerializer<MatchEntry> serializer = registry.getSerializer(key);
         serializer.serialize(entry, outBuffer);
         int paddingRemainder = (outBuffer.writerIndex() - startIndex) % EncodeConstants.PADDING;
         if (paddingRemainder != 0) {
index db740a4a5ee76c8bd38c41f470510c0bc2b50f67..a47a6a1a41339c878eb55a60e35e40f46e7e038f 100644 (file)
@@ -11,7 +11,7 @@ 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.augments.rev131002.MplsTtlAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MplsTtlAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
 
 /**
index 70796dc50406a3522ce480c78f4db38448a6b8c5..8b36e7c0452fbb12d414ffcf9edf7ae008a9d999 100644 (file)
@@ -11,7 +11,7 @@ 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.augments.rev131002.NwTtlAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTtlAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
 
 /**
index 4586b926f8c2584bb5012ea03cd6acf5be2a94cd..aa8e9f51017c566e2d04fbfc398a7e2a9ab5465a 100644 (file)
@@ -11,7 +11,7 @@ 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.augments.rev131002.QueueIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.QueueIdAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
 
 /**
index 7c5cd03a7940d222f8458a2263b3e1b9b94c4787..79f831bad952e0fe8f9b4bed6c124a94e8c8c6ce 100644 (file)
@@ -15,13 +15,13 @@ import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegist
 import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistryInjector;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.protocol.impl.util.ListSerializer;
 import org.opendaylight.openflowjava.protocol.impl.util.TypeKeyMaker;
 import org.opendaylight.openflowjava.protocol.impl.util.TypeKeyMakerFactory;
-import org.opendaylight.openflowjava.protocol.impl.util.ListSerializer;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowModFlags;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInput;
 
 /**
index 1da3fb3cb71c4204da8855d3c762b0b9be3d45c3..770c0cfd18fb7e226e9d248fdc12e4dfaf7bae43 100644 (file)
@@ -18,7 +18,7 @@ import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegist
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.openflowjava.util.ExperimenterSerializerKeyFactory;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMeterBand;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdMeterBand;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MeterBandCommons;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MeterModInput;
index 29e5fd2cfcfbf6743355a6347ecb40225c5c2fe4..b374bef5cf257e231c1819878aaff6d253bebf06 100644 (file)
@@ -22,20 +22,20 @@ import org.opendaylight.openflowjava.protocol.impl.util.TypeKeyMaker;
 import org.opendaylight.openflowjava.protocol.impl.util.TypeKeyMakerFactory;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.openflowjava.util.ExperimenterSerializerKeyFactory;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMultipartRequest;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.InstructionRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NextTableRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.table.features.properties.container.table.feature.properties.NextTableIds;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdMultipartRequest;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIds;
 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.instruction.rev130731.instructions.grouping.Instruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartRequestFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableConfig;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableFeaturesPropType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCase;
@@ -401,10 +401,10 @@ public class MultipartRequestInputFactory implements OFSerializer<MultipartReque
         output.writeShort(code);
         int lengthIndex = output.writerIndex();
         output.writeShort(EncodeConstants.EMPTY_LENGTH);
-        List<MatchEntries> entries = property.
-                getAugmentation(OxmRelatedTableFeatureProperty.class).getMatchEntries();
+        List<MatchEntry> entries = property.
+                getAugmentation(OxmRelatedTableFeatureProperty.class).getMatchEntry();
         if (entries != null) {
-            TypeKeyMaker<MatchEntries> keyMaker = TypeKeyMakerFactory
+            TypeKeyMaker<MatchEntry> keyMaker = TypeKeyMakerFactory
                     .createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
             ListSerializer.serializeHeaderList(entries, keyMaker, registry, output);
         }
index 6ed067fe4329b56644cc8b0a720dcf9666883ab6..f7f8448c7f4685486708241f5affd4f14f74513a 100644 (file)
@@ -14,14 +14,14 @@ import org.opendaylight.openflowjava.protocol.api.extensibility.OFSerializer;
 import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistryInjector;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey;
-import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.protocol.impl.util.ListSerializer;
 import org.opendaylight.openflowjava.protocol.impl.util.TypeKeyMaker;
 import org.opendaylight.openflowjava.protocol.impl.util.TypeKeyMakerFactory;
-import org.opendaylight.openflowjava.protocol.impl.util.ListSerializer;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
 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.types.rev130731.FlowModFlagsV10;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInput;
 
 /**
index 2684f04264d46ecb3bf2d2b8ce9bbb36642b6b98..ca81ef13986ba7637897cb4aacc88ad871aab5f4 100644 (file)
@@ -17,9 +17,9 @@ import org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.openflowjava.util.ExperimenterSerializerKeyFactory;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMultipartRequest;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdMultipartRequest;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartRequestFlags;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCase;
index 217fb120c33188e642ac23c3ba22a0f89179f7d9..965f6eef7147f74ed4bc1eef7cd4fe515fe266e7 100644 (file)
@@ -15,11 +15,11 @@ import java.util.List;
 import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistryInjector;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.openflowjava.protocol.impl.util.TypeKeyMaker;
-import org.opendaylight.openflowjava.protocol.impl.util.TypeKeyMakerFactory;
 import org.opendaylight.openflowjava.protocol.impl.util.InstructionConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ListSerializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionsInstruction;
+import org.opendaylight.openflowjava.protocol.impl.util.TypeKeyMaker;
+import org.opendaylight.openflowjava.protocol.impl.util.TypeKeyMakerFactory;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionsInstruction;
 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.instruction.rev130731.instructions.grouping.Instruction;
 
index 9e18a12f29d1a3148449eecd22f700e7ebd375a3..47c7c43cf51d2c02ae4a139043a0d0267e6257fd 100644 (file)
@@ -11,7 +11,7 @@ package org.opendaylight.openflowjava.protocol.impl.serialization.instruction;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.impl.util.InstructionConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TableIdInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.TableIdInstruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction;
 
 /**
index 5a8f5ab8115363adce0772375c9185d631557673..1387d1e2cd9c745546d76f8e6ded8f817efcc15d 100644 (file)
@@ -11,7 +11,7 @@ package org.opendaylight.openflowjava.protocol.impl.serialization.instruction;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.impl.util.InstructionConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MeterIdInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MeterIdInstruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction;
 
 /**
index 43d3e27ab9d9cc040941bc7dc86784cc31c71407..3b407fdc455ab358aacc3b1c9c793490b89c4739 100644 (file)
@@ -11,7 +11,7 @@ package org.opendaylight.openflowjava.protocol.impl.serialization.instruction;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.impl.util.InstructionConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MetadataInstruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction;
 
 /**
index 4ce543e66b28028e99b7cb41d6ba0ba1d347f29f..ea9d0a5c3bad82fbfa27410d87782c0fee0f94f7 100644 (file)
@@ -10,8 +10,6 @@ package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
 
 /**
  * Parent for Ipv4 address based match entry serializers
@@ -19,16 +17,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
  */
 public abstract class AbstractOxmIpv4AddressSerializer extends AbstractOxmMatchEntrySerializer {
 
-    @Override
-    public void serialize(final MatchEntries entry, final ByteBuf outBuffer) {
-        super.serialize(entry, outBuffer);
-        writeIpv4Address(entry, outBuffer);
-        writeMask(entry, outBuffer, getValueLength());
-    }
-
-    private static void writeIpv4Address(final MatchEntries entry, final ByteBuf out) {
-        Iterable<String> addressGroups = ByteBufUtils.DOT_SPLITTER
-                .split(entry.getAugmentation(Ipv4AddressMatchEntry.class).getIpv4Address().getValue());
+    protected static void writeIpv4Address(String address, final ByteBuf out) {
+        Iterable<String> addressGroups = ByteBufUtils.DOT_SPLITTER.split(address);
         for (String group : addressGroups) {
             out.writeByte(Short.parseShort(group));
         }
index 496505b89cb3e999f04bf25e100997c33a40933e..9fa730bdc95670f889d77f4f3181c4c0e38c2bec 100644 (file)
@@ -13,10 +13,8 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6AddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
 
 import com.google.common.collect.Lists;
 
@@ -26,10 +24,7 @@ import com.google.common.collect.Lists;
  */
 public abstract class AbstractOxmIpv6AddressSerializer extends AbstractOxmMatchEntrySerializer {
 
-    @Override
-    public void serialize(final MatchEntries entry, final ByteBuf outBuffer) {
-        super.serialize(entry, outBuffer);
-        String textAddress = entry.getAugmentation(Ipv6AddressMatchEntry.class).getIpv6Address().getValue();
+    protected void writeIpv6Address(String textAddress, final ByteBuf outBuffer) {
         List<String> address;
         if (textAddress.equals("::")) {
             String[] tmp = new String[EncodeConstants.GROUPS_IN_IPV6_ADDRESS];
@@ -41,7 +36,6 @@ public abstract class AbstractOxmIpv6AddressSerializer extends AbstractOxmMatchE
         for (String group : address) {
             outBuffer.writeShort(Integer.parseInt(group, 16));
         }
-        writeMask(entry, outBuffer, getValueLength());
     }
 
     private static List<String> parseIpv6Address(final List<String> addressGroups) {
index 51b62df958af2c9bc86d08993b7f5ec9204aefe3..a665eb79d9dba07c4864fd653833797591ab0c21 100644 (file)
@@ -10,8 +10,7 @@ package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
 
 /**
  * Parent for MAC address based match entry serializers
@@ -19,11 +18,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
  */
 public abstract class AbstractOxmMacAddressSerializer extends AbstractOxmMatchEntrySerializer {
 
-    @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
-        super.serialize(entry, outBuffer);
-        String macAddress = entry.getAugmentation(MacAddressMatchEntry.class).getMacAddress().getValue();
-        outBuffer.writeBytes(ByteBufUtils.macAddressToBytes(macAddress)); // 48 b + mask [OF 1.3.2 spec]
-        writeMask(entry, outBuffer, getValueLength());
+    protected void writeMacAddress(MacAddress address, ByteBuf outBuffer) {
+        outBuffer.writeBytes(ByteBufUtils.macAddressToBytes(address.getValue())); // 48 b + mask [OF 1.3.2 spec]
     }
 }
index 5c6696475089db3577705bffcffad4624cb5f823..d2b96e20737e62932f51311dee314711695946a5 100644 (file)
@@ -11,37 +11,33 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.HeaderSerializer;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFSerializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
 
 /**
  * Parent for all match entry serializers
  * @author michal.polkorab
  */
 public abstract class AbstractOxmMatchEntrySerializer
-    implements OFSerializer<MatchEntries>, HeaderSerializer<MatchEntries>{
+    implements OFSerializer<MatchEntry>, HeaderSerializer<MatchEntry>{
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         serializeHeader(entry, outBuffer);
     }
 
     @Override
-    public void serializeHeader(MatchEntries entry, ByteBuf outBuffer) {
+    public void serializeHeader(MatchEntry entry, ByteBuf outBuffer) {
         outBuffer.writeShort(getOxmClassCode());
         writeOxmFieldAndLength(outBuffer, getOxmFieldCode(), entry.isHasMask(),
                 getValueLength());
     }
 
-    protected static void writeMask(MatchEntries entry, ByteBuf out, int length) {
-        if (entry.isHasMask()) {
-            byte[] mask = entry.getAugmentation(MaskMatchEntry.class).getMask();
-            if (mask != null && mask.length != length) {
-                throw new IllegalArgumentException("incorrect length of mask: "+
-                        mask.length + ", expected: " + length);
-            }
-            out.writeBytes(mask);
+    protected static void writeMask(byte[] mask, ByteBuf out, int length) {
+        if (mask != null && mask.length != length) {
+            throw new IllegalArgumentException("incorrect length of mask: "+
+                    mask.length + ", expected: " + length);
         }
+        out.writeBytes(mask);
     }
 
     protected static void writeOxmFieldAndLength(ByteBuf out, int fieldValue, boolean hasMask, int lengthArg) {
diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/AbstractOxmMetadataSerializer.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/AbstractOxmMetadataSerializer.java
deleted file mode 100644 (file)
index b3fedcc..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.openflowjava.protocol.impl.serialization.match;
-
-import io.netty.buffer.ByteBuf;
-
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-
-/**
- * Parent for metadata based match entry serializers
- * @author michal.polkorab
- */
-public abstract class AbstractOxmMetadataSerializer extends AbstractOxmMatchEntrySerializer {
-
-    @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
-        super.serialize(entry, outBuffer);
-        outBuffer.writeBytes(entry.getAugmentation(MetadataMatchEntry.class).getMetadata());
-        writeMask(entry, outBuffer, getValueLength());
-    }
-}
diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/AbstractOxmPortNumberSerializer.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/AbstractOxmPortNumberSerializer.java
deleted file mode 100644 (file)
index 394d8c4..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.openflowjava.protocol.impl.serialization.match;
-
-import io.netty.buffer.ByteBuf;
-
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortNumberMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-
-/**
- * Parent for port(32-bit) based match entry serializers
- * @author michal.polkorab
- */
-public abstract class AbstractOxmPortNumberSerializer extends AbstractOxmMatchEntrySerializer {
-
-    @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
-        super.serialize(entry, outBuffer);
-        outBuffer.writeInt(entry.getAugmentation(PortNumberMatchEntry.class).getPortNumber().getValue().intValue());
-    }
-}
diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/AbstractOxmPortSerializer.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/AbstractOxmPortSerializer.java
deleted file mode 100644 (file)
index 9dd6a55..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.openflowjava.protocol.impl.serialization.match;
-
-import io.netty.buffer.ByteBuf;
-
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-
-/**
- * Parent for port(16-bit) based match entry serializers
- * @author michal.polkorab
- */
-public abstract class AbstractOxmPortSerializer extends AbstractOxmMatchEntrySerializer {
-
-    @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
-        super.serialize(entry, outBuffer);
-        outBuffer.writeShort(entry.getAugmentation(PortMatchEntry.class).getPort().getValue().intValue());
-    }
-}
index 1a37f2844f74da384273fdc5573ce331648761c0..c9ca79678af2a31529300cc17449404667cf0269 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OpCodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpOpCase;
 
 /**
  * @author michal.polkorab
@@ -21,9 +21,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmArpOpSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeShort(entry.getAugmentation(OpCodeMatchEntry.class).getOpCode());
+        ArpOpCase entryValue = (ArpOpCase) entry.getMatchEntryValue();
+        outBuffer.writeShort(entryValue.getArpOp().getOpCode());
     }
 
     @Override
index d4e8c3c04df83e7720bff6b0493ac52a9c817fb4..13903be36f96191cb0f3a35e2cef107b63dc84a1 100644 (file)
@@ -7,8 +7,12 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpShaCase;
 
 /**
  * @author michal.polkorab
@@ -16,6 +20,16 @@ import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
  */
 public class OxmArpShaSerializer extends AbstractOxmMacAddressSerializer {
 
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        ArpShaCase entryValue = (ArpShaCase) entry.getMatchEntryValue();
+        writeMacAddress(entryValue.getArpSha().getMacAddress(), outBuffer);
+        if (entry.isHasMask()) {
+            writeMask(entryValue.getArpSha().getMask(), outBuffer, EncodeConstants.MAC_ADDRESS_LENGTH);
+        }
+    }
+
     @Override
     protected int getOxmClassCode() {
         return OxmMatchConstants.OPENFLOW_BASIC_CLASS;
index 505cf05211597247a3b8967e33bb119f11baaac6..6bdff69aee38de10ab11b135db26dd60dc5bfe44 100644 (file)
@@ -7,8 +7,12 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpSpaCase;
 
 /**
  * @author michal.polkorab
@@ -16,6 +20,17 @@ import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
  */
 public class OxmArpSpaSerializer extends AbstractOxmIpv4AddressSerializer {
 
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        ArpSpaCase entryValue = (ArpSpaCase) entry.getMatchEntryValue();
+        writeIpv4Address(entryValue.getArpSpa().getIpv4Address().getValue(), outBuffer);
+        if (entry.isHasMask()) {
+            writeMask(entryValue.getArpSpa().getMask(), outBuffer,
+                    EncodeConstants.GROUPS_IN_IPV4_ADDRESS);
+        }
+    }
+
     @Override
     protected int getOxmClassCode() {
         return OxmMatchConstants.OPENFLOW_BASIC_CLASS;
index 531b21c64894f73df43312471449121a3ecee64d..8ed15f759ba1408e080de2948dd72f20c4980d16 100644 (file)
@@ -7,8 +7,12 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpThaCase;
 
 /**
  * @author michal.polkorab
@@ -16,6 +20,16 @@ import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
  */
 public class OxmArpThaSerializer extends AbstractOxmMacAddressSerializer {
 
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        ArpThaCase entryValue = (ArpThaCase) entry.getMatchEntryValue();
+        writeMacAddress(entryValue.getArpTha().getMacAddress(), outBuffer);
+        if (entry.isHasMask()) {
+            writeMask(entryValue.getArpTha().getMask(), outBuffer, EncodeConstants.MAC_ADDRESS_LENGTH);
+        }
+    }
+
     @Override
     protected int getOxmClassCode() {
         return OxmMatchConstants.OPENFLOW_BASIC_CLASS;
index ec6ee771efcd80365befa0216ccd2b8daf9d5f7c..32ce8ffc8c7141934eb0a0b2379f758ce03096cf 100644 (file)
@@ -7,8 +7,12 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpTpaCase;
 
 /**
  * @author michal.polkorab
@@ -16,6 +20,17 @@ import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
  */
 public class OxmArpTpaSerializer extends AbstractOxmIpv4AddressSerializer {
 
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        ArpTpaCase entryValue = (ArpTpaCase) entry.getMatchEntryValue();
+        writeIpv4Address(entryValue.getArpTpa().getIpv4Address().getValue(), outBuffer);
+        if (entry.isHasMask()) {
+            writeMask(entryValue.getArpTpa().getMask(), outBuffer,
+                    EncodeConstants.GROUPS_IN_IPV4_ADDRESS);
+        }
+    }
+
     @Override
     protected int getOxmClassCode() {
         return OxmMatchConstants.OPENFLOW_BASIC_CLASS;
index c6c07bade3660eb1ed4bc3a4cae2242ff9e8eec4..c34299f5a88935538cc7ee0bd211389fca9636e1 100644 (file)
@@ -7,8 +7,12 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthDstCase;
 
 /**
  * @author michal.polkorab
@@ -16,6 +20,16 @@ import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
  */
 public class OxmEthDstSerializer extends AbstractOxmMacAddressSerializer {
 
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        EthDstCase entryValue = (EthDstCase) entry.getMatchEntryValue();
+        writeMacAddress(entryValue.getEthDst().getMacAddress(), outBuffer);
+        if (entry.isHasMask()) {
+            writeMask(entryValue.getEthDst().getMask(), outBuffer, EncodeConstants.MAC_ADDRESS_LENGTH);
+        }
+    }
+
     @Override
     protected int getOxmClassCode() {
         return OxmMatchConstants.OPENFLOW_BASIC_CLASS;
index 5a2df0a85b9c46cb3252f00121eaac5d752bf30b..5efe5b29be910be4a46f743973f320d8d6d908ca 100644 (file)
@@ -7,8 +7,12 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthSrcCase;
 
 /**
  * @author michal.polkorab
@@ -16,6 +20,16 @@ import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
  */
 public class OxmEthSrcSerializer extends AbstractOxmMacAddressSerializer {
 
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        EthSrcCase entryValue = (EthSrcCase) entry.getMatchEntryValue();
+        writeMacAddress(entryValue.getEthSrc().getMacAddress(), outBuffer);
+        if (entry.isHasMask()) {
+            writeMask(entryValue.getEthSrc().getMask(), outBuffer, EncodeConstants.MAC_ADDRESS_LENGTH);
+        }
+    }
+
     @Override
     protected int getOxmClassCode() {
         return OxmMatchConstants.OPENFLOW_BASIC_CLASS;
index 6bd7b5752cba06b62298c811a31111725a19aad5..58ee45030fa0e8036860b8e5e1550df6f785dcd0 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthTypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthTypeCase;
 
 /**
  * @author michal.polkorab
@@ -21,9 +21,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmEthTypeSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeShort(entry.getAugmentation(EthTypeMatchEntry.class).getEthType().getValue().shortValue());
+        EthTypeCase entryValue = (EthTypeCase) entry.getMatchEntryValue();
+        outBuffer.writeShort(entryValue.getEthType().getEthType().getValue().shortValue());
     }
 
     @Override
index 664b68b0df679fd3e1688ec3956471d2e9dd6a61..ad80424c41f7cd27d7dc84d7d90831f4279c8fbb 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4CodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv4CodeCase;
 
 /**
  * @author michal.polkorab
@@ -21,9 +21,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmIcmpv4CodeSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeByte(entry.getAugmentation(Icmpv4CodeMatchEntry.class).getIcmpv4Code());
+        Icmpv4CodeCase entryValue = (Icmpv4CodeCase) entry.getMatchEntryValue();
+        outBuffer.writeByte(entryValue.getIcmpv4Code().getIcmpv4Code());
     }
 
     @Override
index 6ae6dfaa57ac4e2b5def45fc0e738ed6d0f3e25d..4619070933be557d7a5be4055fb5d02d83f01013 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4TypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv4TypeCase;
 
 /**
  * @author michal.polkorab
@@ -21,9 +21,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmIcmpv4TypeSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeByte(entry.getAugmentation(Icmpv4TypeMatchEntry.class).getIcmpv4Type());
+        Icmpv4TypeCase entryValue = (Icmpv4TypeCase) entry.getMatchEntryValue();
+        outBuffer.writeByte(entryValue.getIcmpv4Type().getIcmpv4Type());
     }
 
     @Override
index 7e38d36f1e67992f54181baa011c623a5a560d38..6b5daf81e91b901eb3f1b40fce8347900f6b92e7 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6CodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv6CodeCase;
 
 /**
  * @author michal.polkorab
@@ -21,9 +21,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmIcmpv6CodeSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeByte(entry.getAugmentation(Icmpv6CodeMatchEntry.class).getIcmpv6Code());
+        Icmpv6CodeCase entryValue = (Icmpv6CodeCase) entry.getMatchEntryValue();
+        outBuffer.writeByte(entryValue.getIcmpv6Code().getIcmpv6Code());
     }
 
     @Override
index adc06c22c33c38ce132211c0095e61c101529a6d..abf5227ad8f0b7fd1476433101686b755df001c7 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6TypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv6TypeCase;
 
 /**
  * @author michal.polkorab
@@ -21,9 +21,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmIcmpv6TypeSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeByte(entry.getAugmentation(Icmpv6TypeMatchEntry.class).getIcmpv6Type());
+        Icmpv6TypeCase entryValue = (Icmpv6TypeCase) entry.getMatchEntryValue();
+        outBuffer.writeByte(entryValue.getIcmpv6Type().getIcmpv6Type());
     }
 
     @Override
index 7e6d7a86b162857f2c5f81bea4bc68c31d8f52d6..cc22a34126f3a2d5c2d1f1caea7acc5729b155af 100644 (file)
@@ -7,14 +7,25 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPhyPortCase;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmInPhyPortSerializer extends AbstractOxmPortNumberSerializer {
+public class OxmInPhyPortSerializer extends AbstractOxmMatchEntrySerializer {
+
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        InPhyPortCase entryValue = (InPhyPortCase) entry.getMatchEntryValue();
+        outBuffer.writeInt(entryValue.getInPhyPort().getPortNumber().getValue().intValue());
+    }
 
     @Override
     protected int getOxmClassCode() {
index 7a3422e0848df30babeb2d028d74693645eec1ce..4fbae264d8a343ed003c89553f3d61d004ffc515 100644 (file)
@@ -7,14 +7,25 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPortCase;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmInPortSerializer extends AbstractOxmPortNumberSerializer {
+public class OxmInPortSerializer extends AbstractOxmMatchEntrySerializer {
+
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        InPortCase entryValue = (InPortCase) entry.getMatchEntryValue();
+        outBuffer.writeInt(entryValue.getInPort().getPortNumber().getValue().intValue());
+    }
 
     @Override
     protected int getOxmClassCode() {
index d2cb041687b06bd3dbb20ea801b0792d526c4ac3..f06cd6904620af5bed803963f5d4e873295ff6aa 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DscpMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpDscpCase;
 
 /**
  * @author michal.polkorab
@@ -21,9 +21,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmIpDscpSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeByte(entry.getAugmentation(DscpMatchEntry.class).getDscp().getValue());
+        IpDscpCase entryValue = (IpDscpCase) entry.getMatchEntryValue();
+        outBuffer.writeByte(entryValue.getIpDscp().getDscp().getValue());
     }
 
     @Override
index 3270eeeac8987d96a7a4ffba3baa0b74ae135022..2edd06ac2d88d04d75f0f08a1edc0d57d72abbee 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EcnMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpEcnCase;
 
 /**
  * @author michal.polkorab
@@ -21,9 +21,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmIpEcnSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeByte(entry.getAugmentation(EcnMatchEntry.class).getEcn());
+        IpEcnCase entryValue = (IpEcnCase) entry.getMatchEntryValue();
+        outBuffer.writeByte(entryValue.getIpEcn().getEcn());
     }
 
     @Override
index d24c0f8754761b0e95fcdd7f4adc00b2ae8cf025..a9b4871b14a7d647687e3cfe42e3ed138b79dabc 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ProtocolNumberMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpProtoCase;
 
 /**
  * @author michal.polkorab
@@ -21,9 +21,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmIpProtoSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeByte(entry.getAugmentation(ProtocolNumberMatchEntry.class).getProtocolNumber());
+        IpProtoCase entryValue = (IpProtoCase) entry.getMatchEntryValue();
+        outBuffer.writeByte(entryValue.getIpProto().getProtocolNumber());
     }
 
     @Override
index a7d23c940e55167ddc6e3bb4d0b9611cfa6f3beb..4a3ba4cbf1b9823cad8fde6a92ec5a672a135d0e 100644 (file)
@@ -7,8 +7,12 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv4DstCase;
 
 /**
  * @author michal.polkorab
@@ -16,6 +20,17 @@ import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
  */
 public class OxmIpv4DstSerializer extends AbstractOxmIpv4AddressSerializer {
 
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        Ipv4DstCase entryValue = (Ipv4DstCase) entry.getMatchEntryValue();
+        writeIpv4Address(entryValue.getIpv4Dst().getIpv4Address().getValue(), outBuffer);
+        if (entry.isHasMask()) {
+            writeMask(entryValue.getIpv4Dst().getMask(), outBuffer,
+                    EncodeConstants.GROUPS_IN_IPV4_ADDRESS);
+        }
+    }
+
     @Override
     protected int getOxmClassCode() {
         return OxmMatchConstants.OPENFLOW_BASIC_CLASS;
index 4b8ddbc773e94d3eacd7a6267d96387641c43af6..08bca86894691bb63a8d0e108e56d979f028da0a 100644 (file)
@@ -7,8 +7,12 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv4SrcCase;
 
 /**
  * @author michal.polkorab
@@ -16,6 +20,17 @@ import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
  */
 public class OxmIpv4SrcSerializer extends AbstractOxmIpv4AddressSerializer {
 
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        Ipv4SrcCase entryValue = (Ipv4SrcCase) entry.getMatchEntryValue();
+        writeIpv4Address(entryValue.getIpv4Src().getIpv4Address().getValue(), outBuffer);
+        if (entry.isHasMask()) {
+            writeMask(entryValue.getIpv4Src().getMask(), outBuffer,
+                    EncodeConstants.GROUPS_IN_IPV4_ADDRESS);
+        }
+    }
+
     @Override
     protected int getOxmClassCode() {
         return OxmMatchConstants.OPENFLOW_BASIC_CLASS;
index cc892b8d7b1f6547ede5d674a3f4e4d14ef9a3de..0e749610eb92ad7123f4ca91a2aac0ed2f209e07 100644 (file)
@@ -7,8 +7,12 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6DstCase;
 
 /**
  * @author michal.polkorab
@@ -16,6 +20,17 @@ import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
  */
 public class OxmIpv6DstSerializer extends AbstractOxmIpv6AddressSerializer {
 
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        Ipv6DstCase entryValue = (Ipv6DstCase) entry.getMatchEntryValue();
+        writeIpv6Address(entryValue.getIpv6Dst().getIpv6Address().getValue(), outBuffer);
+        if (entry.isHasMask()) {
+            writeMask(entryValue.getIpv6Dst().getMask(), outBuffer,
+                    EncodeConstants.SIZE_OF_IPV6_ADDRESS_IN_BYTES);
+        }
+    }
+
     @Override
     protected int getOxmClassCode() {
         return OxmMatchConstants.OPENFLOW_BASIC_CLASS;
index fa7ef802bd65312969eed5e0c79002bea07ce45b..d60c392d1568a61294abfffab303f80ecae53625 100644 (file)
@@ -9,12 +9,12 @@ package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
 import io.netty.buffer.ByteBuf;
 
-import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PseudoFieldMatchEntry;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.Ipv6ExthdrFlags;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6ExthdrCase;
 
 /**
  * @author michal.polkorab
@@ -23,9 +23,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmIpv6ExtHdrSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(final MatchEntries entry, final ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        Ipv6ExthdrFlags pseudoField = entry.getAugmentation(PseudoFieldMatchEntry.class).getPseudoField();
+        Ipv6ExthdrCase entryValue = (Ipv6ExthdrCase) entry.getMatchEntryValue();
+        Ipv6ExthdrFlags pseudoField = entryValue.getIpv6Exthdr().getPseudoField();
         int bitmap = ByteBufUtils.fillBitMask(0,
                 pseudoField.isNonext(),
                 pseudoField.isEsp(),
@@ -37,7 +38,9 @@ public class OxmIpv6ExtHdrSerializer extends AbstractOxmMatchEntrySerializer {
                 pseudoField.isUnrep(),
                 pseudoField.isUnseq());
         outBuffer.writeShort(bitmap);
-        writeMask(entry, outBuffer, getValueLength());
+        if (entry.isHasMask()) {
+            outBuffer.writeBytes(entryValue.getIpv6Exthdr().getMask());
+        }
     }
 
     @Override
index bb6c04509f9b23e088379717498f6847c41b415a..4f86b252604b617d19917c725c71a59dfc8a81a9 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6FlabelMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6FlabelCase;
 
 /**
  * @author michal.polkorab
@@ -21,10 +21,13 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmIpv6FlabelSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeInt(entry.getAugmentation(Ipv6FlabelMatchEntry.class).getIpv6Flabel().getValue().intValue());
-        writeMask(entry, outBuffer, getValueLength());
+        Ipv6FlabelCase entryValue = (Ipv6FlabelCase) entry.getMatchEntryValue();
+        outBuffer.writeInt(entryValue.getIpv6Flabel().getIpv6Flabel().getValue().intValue());
+        if (entry.isHasMask()) {
+            writeMask(entryValue.getIpv6Flabel().getMask(), outBuffer, EncodeConstants.SIZE_OF_INT_IN_BYTES);
+        }
     }
 
     @Override
index f5952b8b2352624d223dd1f28379b73c38aa3946..31441503756ef2fb5e7c37d50858d26ee7cbb5fc 100644 (file)
@@ -7,8 +7,12 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdSllCase;
 
 /**
  * @author michal.polkorab
@@ -16,6 +20,13 @@ import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
  */
 public class OxmIpv6NdSllSerializer extends AbstractOxmMacAddressSerializer {
 
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        Ipv6NdSllCase entryValue = (Ipv6NdSllCase) entry.getMatchEntryValue();
+        writeMacAddress(entryValue.getIpv6NdSll().getMacAddress(), outBuffer);
+    }
+
     @Override
     protected int getOxmClassCode() {
         return OxmMatchConstants.OPENFLOW_BASIC_CLASS;
index a8f32b117e0c8303bd3ea749942c6ddb6c285d10..cb5bd7cae046cc34604532d2f23f20a3b7b63e6c 100644 (file)
@@ -7,8 +7,12 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdTargetCase;
 
 /**
  * @author michal.polkorab
@@ -16,6 +20,13 @@ import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
  */
 public class OxmIpv6NdTargetSerializer extends AbstractOxmIpv6AddressSerializer {
 
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        Ipv6NdTargetCase entryValue = (Ipv6NdTargetCase) entry.getMatchEntryValue();
+        writeIpv6Address(entryValue.getIpv6NdTarget().getIpv6Address().getValue(), outBuffer);
+    }
+
     @Override
     protected int getOxmClassCode() {
         return OxmMatchConstants.OPENFLOW_BASIC_CLASS;
index e215a2f3f33142745e1025ccf3a62a97ad2a2980..3e5a17ad252c4ea21b663a716f5d579d752ecba9 100644 (file)
@@ -7,8 +7,12 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdTllCase;
 
 /**
  * @author michal.polkorab
@@ -16,6 +20,13 @@ import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
  */
 public class OxmIpv6NdTllSerializer extends AbstractOxmMacAddressSerializer {
 
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        Ipv6NdTllCase entryValue = (Ipv6NdTllCase) entry.getMatchEntryValue();
+        writeMacAddress(entryValue.getIpv6NdTll().getMacAddress(), outBuffer);
+    }
+
     @Override
     protected int getOxmClassCode() {
         return OxmMatchConstants.OPENFLOW_BASIC_CLASS;
index 9aeca979be82244c772dd0b8036b25ec7040d556..4072b767676be2bf5facc5d4b96cda98e974fe7b 100644 (file)
@@ -7,8 +7,12 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6SrcCase;
 
 /**
  * @author michal.polkorab
@@ -16,6 +20,17 @@ import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
  */
 public class OxmIpv6SrcSerializer extends AbstractOxmIpv6AddressSerializer {
 
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        Ipv6SrcCase entryValue = (Ipv6SrcCase) entry.getMatchEntryValue();
+        writeIpv6Address(entryValue.getIpv6Src().getIpv6Address().getValue(), outBuffer);
+        if (entry.isHasMask()) {
+            writeMask(entryValue.getIpv6Src().getMask(), outBuffer,
+                    EncodeConstants.SIZE_OF_IPV6_ADDRESS_IN_BYTES);
+        }
+    }
+
     @Override
     protected int getOxmClassCode() {
         return OxmMatchConstants.OPENFLOW_BASIC_CLASS;
index 09099c54d7307704550c3d07ccad65afae6b97b9..1927e4c84b7ed1fe09bc0491e689a49fbc25e337 100644 (file)
@@ -7,14 +7,29 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MetadataCase;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmMetadataSerializer extends AbstractOxmMetadataSerializer {
+public class OxmMetadataSerializer extends AbstractOxmMatchEntrySerializer {
+
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        MetadataCase entryValue = (MetadataCase) entry.getMatchEntryValue();
+        outBuffer.writeBytes(entryValue.getMetadata().getMetadata());
+        if (entry.isHasMask()) {
+            writeMask(entryValue.getMetadata().getMask(), outBuffer,
+                    EncodeConstants.SIZE_OF_LONG_IN_BYTES);
+        }
+    }
 
     @Override
     protected int getOxmClassCode() {
index 52e41c93ddd153404c6bc801e709d8f75d73ad1c..6e4e334802bb316273e26b6bba5b955cfea71634 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.BosMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsBosCase;
 
 /**
  * @author michal.polkorab
@@ -21,9 +21,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmMplsBosSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeBoolean(entry.getAugmentation(BosMatchEntry.class).isBos().booleanValue());
+        MplsBosCase entryValue = (MplsBosCase) entry.getMatchEntryValue();
+        outBuffer.writeBoolean(entryValue.getMplsBos().isBos().booleanValue());
     }
 
     @Override
index 85ec956b4e7d867acab43cc26e17b18e83488f8d..a22e20893de72d52ecfe13c2470dab11ceaa3a09 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsLabelMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsLabelCase;
 
 /**
  * @author michal.polkorab
@@ -21,9 +21,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmMplsLabelSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeInt(entry.getAugmentation(MplsLabelMatchEntry.class).getMplsLabel().intValue());
+        MplsLabelCase entryValue = (MplsLabelCase) entry.getMatchEntryValue();
+        outBuffer.writeInt(entryValue.getMplsLabel().getMplsLabel().intValue());
     }
 
     @Override
index ff2b6fe404b8f766dc0120b3641160916e51d735..5abc5b022b7810e3d13dd6394d7386536b084e8c 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TcMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsTcCase;
 
 /**
  * @author michal.polkorab
@@ -21,9 +21,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmMplsTcSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeByte(entry.getAugmentation(TcMatchEntry.class).getTc());
+        MplsTcCase entryValue = (MplsTcCase) entry.getMatchEntryValue();
+        outBuffer.writeByte(entryValue.getMplsTc().getTc());
     }
 
     @Override
index 96c24a681fae9f5df09c86faf23fd5de9847ec68..dba3e87e8cec8363f8e9eb7d9b5115422bda6779 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IsidMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.PbbIsidCase;
 
 /**
  * @author michal.polkorab
@@ -21,10 +21,13 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmPbbIsidSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeMedium(entry.getAugmentation(IsidMatchEntry.class).getIsid().intValue());
-        writeMask(entry, outBuffer, getValueLength());
+        PbbIsidCase entryValue = (PbbIsidCase) entry.getMatchEntryValue();
+        outBuffer.writeMedium(entryValue.getPbbIsid().getIsid().intValue());
+        if (entry.isHasMask()) {
+            writeMask(entryValue.getPbbIsid().getMask(), outBuffer, getValueLength());
+        }
     }
 
     @Override
index 4e3e273876dcfb8037e82ffb2f990af6b8ed7fbe..fe66a7d87287ffbff39e943020600784c6deea73 100644 (file)
@@ -7,14 +7,25 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.SctpDstCase;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmSctpDstSerializer extends AbstractOxmPortSerializer {
+public class OxmSctpDstSerializer extends AbstractOxmMatchEntrySerializer {
+
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        SctpDstCase entryValue = (SctpDstCase) entry.getMatchEntryValue();
+        outBuffer.writeShort(entryValue.getSctpDst().getPort().getValue().intValue());
+    }
 
     @Override
     protected int getOxmClassCode() {
index 96629ff14fd6dca56f69440cd6d0ad832cb4459a..eea241171da0d4815701f8b415f0ebc89d1c7fa7 100644 (file)
@@ -7,14 +7,25 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.SctpSrcCase;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmSctpSrcSerializer extends AbstractOxmPortSerializer {
+public class OxmSctpSrcSerializer extends AbstractOxmMatchEntrySerializer {
+
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        SctpSrcCase entryValue = (SctpSrcCase) entry.getMatchEntryValue();
+        outBuffer.writeShort(entryValue.getSctpSrc().getPort().getValue().intValue());
+    }
 
     @Override
     protected int getOxmClassCode() {
index c7b42281428b6bc911d47c7e2cc2421ca3dffb53..2e91d37890399419fe7595233aa2ed76cf3f85e9 100644 (file)
@@ -7,14 +7,25 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TcpDstCase;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmTcpDstSerializer extends AbstractOxmPortSerializer{
+public class OxmTcpDstSerializer extends AbstractOxmMatchEntrySerializer {
+
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        TcpDstCase entryValue = (TcpDstCase) entry.getMatchEntryValue();
+        outBuffer.writeShort(entryValue.getTcpDst().getPort().getValue().intValue());
+    }
 
     @Override
     protected int getOxmClassCode() {
index 0a8a01e743bebc29a814330ca32c848cfa1d3f4e..6d761a1c0e5a6d94030384315b2c12734a44202e 100644 (file)
@@ -7,14 +7,25 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TcpSrcCase;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmTcpSrcSerializer extends AbstractOxmPortSerializer {
+public class OxmTcpSrcSerializer extends AbstractOxmMatchEntrySerializer {
+
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        TcpSrcCase entryValue = (TcpSrcCase) entry.getMatchEntryValue();
+        outBuffer.writeShort(entryValue.getTcpSrc().getPort().getValue().intValue());
+    }
 
     @Override
     protected int getOxmClassCode() {
index 035bb7ffbfdbbb310bf3ae01f526c7f02d9f76e6..aea8545a6bf007a3c1fedf7adde415c4e27a24bb 100644 (file)
@@ -7,14 +7,29 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TunnelIdCase;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmTunnelIdSerializer extends AbstractOxmMetadataSerializer {
+public class OxmTunnelIdSerializer extends AbstractOxmMatchEntrySerializer {
+
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        TunnelIdCase entryValue = (TunnelIdCase) entry.getMatchEntryValue();
+        outBuffer.writeBytes(entryValue.getTunnelId().getTunnelId());
+        if (entry.isHasMask()) {
+            writeMask(entryValue.getTunnelId().getMask(), outBuffer,
+                    EncodeConstants.SIZE_OF_LONG_IN_BYTES);
+        }
+    }
 
     @Override
     protected int getOxmClassCode() {
index bd4e705f860a9ced53c400e508d20a41e4c124e6..110dede992c2ec93e7539e985d48a7c068064c7c 100644 (file)
@@ -7,14 +7,25 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.UdpDstCase;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmUdpDstSerializer extends AbstractOxmPortSerializer {
+public class OxmUdpDstSerializer extends AbstractOxmMatchEntrySerializer {
+
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        UdpDstCase entryValue = (UdpDstCase) entry.getMatchEntryValue();
+        outBuffer.writeShort(entryValue.getUdpDst().getPort().getValue().intValue());
+    }
 
     @Override
     protected int getOxmClassCode() {
index 5929909a113a23b3b2c9cb2f0f1476e478b90b9b..a1db321d6db09734d56dcf0bc5c4bcc87f4d0648 100644 (file)
@@ -7,14 +7,25 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.match;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.UdpSrcCase;
 
 /**
  * @author michal.polkorab
  *
  */
-public class OxmUdpSrcSerializer extends AbstractOxmPortSerializer {
+public class OxmUdpSrcSerializer extends AbstractOxmMatchEntrySerializer {
+
+    @Override
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+        super.serialize(entry, outBuffer);
+        UdpSrcCase entryValue = (UdpSrcCase) entry.getMatchEntryValue();
+        outBuffer.writeShort(entryValue.getUdpSrc().getPort().getValue().intValue());
+    }
 
     @Override
     protected int getOxmClassCode() {
index ad7e964398784507d6e80c2112ba787d21bf4419..a344e997382a3f9aa11ebeb1e57f5fba5c98ce64 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanPcpMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanPcpCase;
 
 /**
  * @author michal.polkorab
@@ -21,9 +21,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmVlanPcpSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        outBuffer.writeByte(entry.getAugmentation(VlanPcpMatchEntry.class).getVlanPcp().byteValue());
+        VlanPcpCase entryValue = (VlanPcpCase) entry.getMatchEntryValue();
+        outBuffer.writeByte(entryValue.getVlanPcp().getVlanPcp());
     }
 
     @Override
index 975cc3d048bfe7cba18a68a1a17b6c4ee779f185..0a76f895849813d8087de67902f24c6b6d60907b 100644 (file)
@@ -11,8 +11,9 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanVidCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.vlan.vid._case.VlanVid;
 
 /**
  * @author michal.polkorab
@@ -21,17 +22,18 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OxmVlanVidSerializer extends AbstractOxmMatchEntrySerializer {
 
     @Override
-    public void serialize(MatchEntries entry, ByteBuf outBuffer) {
+    public void serialize(MatchEntry entry, ByteBuf outBuffer) {
         super.serialize(entry, outBuffer);
-        VlanVidMatchEntry vlanVid = entry.getAugmentation(VlanVidMatchEntry.class);
+        VlanVid vlanVid = ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid();
         int vlanVidValue = vlanVid.getVlanVid();
         if (vlanVid.isCfiBit()) {
             short cfi = 1 << 12; // 13-th bit
             vlanVidValue = vlanVidValue | cfi;
         }
-
         outBuffer.writeShort(vlanVidValue);
-        writeMask(entry, outBuffer, getValueLength());
+        if (entry.isHasMask()) {
+            writeMask(vlanVid.getMask(), outBuffer, getValueLength());
+        }
     }
 
     @Override
index 09cc31192f6f8f6ff07356fde275eeb2534c965d..0a6852defe69f9a7977c7470f4c02d402821588e 100644 (file)
@@ -17,10 +17,10 @@ import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegi
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.StandardMatchType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmMatchType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.MatchBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmMatchType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.MatchBuilder;
 
 /**
  * Deserializes ofp_match (OpenFlow v1.3) and its oxm_fields structures
@@ -50,9 +50,9 @@ public class MatchDeserializer implements OFDeserializer<Match>,
             }
             CodeKeyMaker keyMaker = CodeKeyMakerFactory
                     .createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
-            List<MatchEntries> entries = ListDeserializer.deserializeList(EncodeConstants.OF13_VERSION_ID,
+            List<MatchEntry> entries = ListDeserializer.deserializeList(EncodeConstants.OF13_VERSION_ID,
                     length - 2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES, input, keyMaker, registry);
-            builder.setMatchEntries(entries);
+            builder.setMatchEntry(entries);
             int paddingRemainder = length % EncodeConstants.PADDING;
             if (paddingRemainder != 0) {
                 input.skipBytes(EncodeConstants.PADDING - paddingRemainder);
index 76f1f2ec6775c6aed51c82f8bf68e593cf421ab4..1c704bb2432235e102343b8c71bb8bd61df2115a 100644 (file)
@@ -10,8 +10,8 @@ package org.opendaylight.openflowjava.protocol.impl.util;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFGeneralSerializer;
 import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
 
 /**
  * @author michal.polkorab
index 645df95c3a5a51222b54bc6d67a6246fb5f2f486..b0a4f41c3d67533fb99c8d45acbbc793deb400ff 100644 (file)
@@ -16,8 +16,8 @@ import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowWildcardsV10;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10Builder;
 
 /**
  * Deserializes ofp_match (OpenFlow v1.0) structure
index bff38ae2e31372327df3d75716278852d239cc6d..830753eab486c3bd3961a868c06f07eedf01bbc5 100644 (file)
@@ -13,7 +13,7 @@ import io.netty.buffer.ByteBuf;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFSerializer;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowWildcardsV10;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10;
 
 /**
  * Serializes ofp_match (OpenFlow v1.0) structure
index c5b075831a8856fa890cf74855b565b4a806aae2..32ecb5de7f058c174b81d2129e7c693625e14625 100644 (file)
@@ -17,12 +17,12 @@ import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegist
 import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistryInjector;
 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.oxm.container.match.entry.value.ExperimenterIdCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.StandardMatchType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ExperimenterClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmMatchType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ExperimenterClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmMatchType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -47,7 +47,7 @@ public class OF13MatchSerializer implements OFSerializer<Match>, SerializerRegis
         serializeType(match, outBuffer);
         int matchLengthIndex = outBuffer.writerIndex();
         outBuffer.writeShort(EncodeConstants.EMPTY_LENGTH);
-        serializeMatchEntries(match.getMatchEntries(), outBuffer);
+        serializeMatchEntries(match.getMatchEntry(), outBuffer);
         // Length of ofp_match (excluding padding)
         int matchLength = outBuffer.writerIndex() - matchStartIndex;
         outBuffer.setShort(matchLengthIndex, matchLength);
@@ -70,22 +70,22 @@ public class OF13MatchSerializer implements OFSerializer<Match>, SerializerRegis
      * @param matchEntries list of match entries (oxm_fields)
      * @param out output ByteBuf
      */
-    public void serializeMatchEntries(List<MatchEntries> matchEntries, ByteBuf out) {
+    public void serializeMatchEntries(List<MatchEntry> matchEntries, ByteBuf out) {
         if (matchEntries == null) {
             LOGGER.debug("Match entries are null");
             return;
         }
-        for (MatchEntries entry : matchEntries) {
+        for (MatchEntry entry : matchEntries) {
 
             MatchEntrySerializerKey<?, ?> key = new MatchEntrySerializerKey<>(
                     EncodeConstants.OF13_VERSION_ID, entry.getOxmClass(), entry.getOxmMatchField());
             if (entry.getOxmClass().equals(ExperimenterClass.class)) {
-                key.setExperimenterId(entry.getAugmentation(ExperimenterIdMatchEntry.class)
-                        .getExperimenter().getValue());
+                ExperimenterIdCase entryValue = (ExperimenterIdCase) entry.getMatchEntryValue();
+                key.setExperimenterId(entryValue.getExperimenter().getExperimenter().getValue());
             } else {
                 key.setExperimenterId(null);
             }
-            OFSerializer<MatchEntries> entrySerializer = registry.getSerializer(key);
+            OFSerializer<MatchEntry> entrySerializer = registry.getSerializer(key);
             entrySerializer.serialize(entry, out);
         }
     }
index 37ba6dd9a6b4a85b41c5c5795d55477171edb3a8..63563de3f265cab0a3247f9c9d1490fdd3270914 100644 (file)
@@ -14,14 +14,14 @@ import org.opendaylight.openflowjava.protocol.api.keys.ExperimenterInstructionSe
 import org.opendaylight.openflowjava.protocol.api.keys.InstructionSerializerKey;
 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.oxm.container.match.entry.value.ExperimenterIdCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Experimenter;
 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.instruction.rev130731.instructions.grouping.Instruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ExperimenterClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ExperimenterClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
 
 /**
  * Creates KeyMakers
@@ -38,16 +38,16 @@ public abstract class TypeKeyMakerFactory {
      *  in lookup key
      * @return lookup key
      */
-    public static TypeKeyMaker<MatchEntries> createMatchEntriesKeyMaker(short version) {
-        return new AbstractTypeKeyMaker<MatchEntries>(version) {
+    public static TypeKeyMaker<MatchEntry> createMatchEntriesKeyMaker(short version) {
+        return new AbstractTypeKeyMaker<MatchEntry>(version) {
             @Override
-            public MatchEntrySerializerKey<?, ?> make(MatchEntries entry) {
+            public MatchEntrySerializerKey<?, ?> make(MatchEntry entry) {
                 MatchEntrySerializerKey<?, ?> key;
                 key = new MatchEntrySerializerKey<>(getVersion(), entry.getOxmClass(),
                         entry.getOxmMatchField());
                 if (entry.getOxmClass().equals(ExperimenterClass.class)) {
-                    key.setExperimenterId(entry.getAugmentation(ExperimenterIdMatchEntry.class)
-                            .getExperimenter().getValue());
+                    ExperimenterIdCase entryValue = (ExperimenterIdCase) entry.getMatchEntryValue();
+                    key.setExperimenterId(entryValue.getExperimenter().getExperimenter().getValue());
                     return key;
                 }
                 key.setExperimenterId(null);
index bc1a27189a5e2a2ca72374365d0b674c0863a502..9f4bbab5a2ed48d8cfa3b41297f8f8b3d09ca7dc 100644 (file)
@@ -37,8 +37,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.KeystoreType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.PathType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.TransportProtocol;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ErrorMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterMessage;
index de4dad5d00bafa8bba4dde606ae6d4fa2c145a72..a689db6b02bee6ef0e1ee9f40c54ef48d4fee4e3 100644 (file)
@@ -12,8 +12,8 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.MatchDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10;
 /**
  *
  * @author madamjak
index 351a87265c07a01cce1e8ca66b641bf3ea8c511c..bad774f41570e848bc085408c3340911570344e1 100644 (file)
@@ -21,15 +21,14 @@ import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthertypeAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.GroupIdAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsTtlAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTtlAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmFieldsAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortNumberMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.QueueIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.EthertypeAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.GroupIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MplsTtlAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTtlAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmFieldsAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.QueueIdAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.CopyTtlIn;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.CopyTtlOut;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.DecMplsTtl;
@@ -47,8 +46,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.SetNwTtl;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.SetQueue;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterFlags;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPortCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandDropCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandDscpRemarkCase;
@@ -1003,15 +1004,15 @@ public class MultipartReplyMessageFactoryTest {
 
         Assert.assertEquals("Wrong setFieldOXMClass", OpenflowBasicClass.class,
                 message.getGroupDesc().get(0).getBucketsList().get(0).getAction().get(1)
-                .getAugmentation(OxmFieldsAction.class).getMatchEntries().get(0).getOxmClass());
+                .getAugmentation(OxmFieldsAction.class).getMatchEntry().get(0).getOxmClass());
 
         Assert.assertEquals("Wrong setFieldOXMField", InPort.class,
                 message.getGroupDesc().get(0).getBucketsList().get(0).getAction().get(1)
-                .getAugmentation(OxmFieldsAction.class).getMatchEntries().get(0).getOxmMatchField());
+                .getAugmentation(OxmFieldsAction.class).getMatchEntry().get(0).getOxmMatchField());
 
-        Assert.assertEquals("Wrong setFieldOXMValue", 255,
-                message.getGroupDesc().get(0).getBucketsList().get(0).getAction().get(1)
-                .getAugmentation(OxmFieldsAction.class).getMatchEntries().get(0).
-                getAugmentation(PortNumberMatchEntry.class).getPortNumber().getValue().intValue());
+        MatchEntry entry = message.getGroupDesc().get(0).getBucketsList().get(0).getAction().get(1)
+                .getAugmentation(OxmFieldsAction.class).getMatchEntry().get(0);
+        Assert.assertEquals("Wrong setFieldOXMValue", 255, ((InPortCase) entry.getMatchEntryValue())
+                .getInPort().getPortNumber().getValue().intValue());
     }
 }
index 322e5d98ca6969094d8c4385e0696d22b6298e02..c4ccb4e34137f6f12a390bb279f22c07a876b45e 100644 (file)
@@ -16,10 +16,10 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.RateQueueProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueueProperty;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueProperties;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetQueueConfigOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.get.config.reply.Queues;
index 4a75d0ab98099f93392d194db8daa0176fa4a4e5..77ac5d912aa1a0df17ba2889d628954f96fbb70a 100644 (file)
@@ -20,9 +20,9 @@ import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidAction;
+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.augments.rev150225.VlanVidAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Output;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.SetVlanVid;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
index 9670461f33758fb9806585df342bee11a215666c..f8102e5fc205638acff4c132336b45025cd2f23a 100644 (file)
@@ -19,11 +19,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.RateQueueProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.RateQueuePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueueProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueuePropertyBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueProperties;
index 7cf4df2cdec3cb4b22a56272d118ec56a9bf4d3b..3be61213d81ff4b24a4e20a7c636ee397c558653 100644 (file)
@@ -19,11 +19,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.RateQueueProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.RateQueuePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueueProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueuePropertyBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueProperties;
index a86527561399841d3f5174d85baddbb65fe1e1f0..4183a352d28c8f98081e5488e9e78398b327d99a 100644 (file)
@@ -23,7 +23,7 @@ import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerR
 import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowModFlags;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmMatchType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmMatchType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyFlowCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.flow._case.MultipartReplyFlow;
index 2b223ca248e0d27a16cb9b0022c56b31bd80986b..96a7c1c0aae780ba0f8371e9a6c5a920e732e68a 100644 (file)
@@ -16,8 +16,8 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NextTableRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.table.features.properties.container.table.feature.properties.NextTableIds;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIds;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableFeaturesPropType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyTableFeaturesCase;
index 3b464f397f118e94313e14a67b5601c38491d5ae..6fbdbaa4709885bc55cd8f4914634a9db8438e28 100644 (file)
@@ -13,12 +13,11 @@ import io.netty.buffer.ByteBuf;
 import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PseudoFieldMatchEntry;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.Ipv6ExthdrFlags;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Exthdr;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Exthdr;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6ExthdrCase;
 
 /**
  * @author michal.polkorab
@@ -35,15 +34,16 @@ public class OxmIpv6ExtHdrDeserializerTest {
 
         buffer.skipBytes(4); // skip XID
         OxmIpv6ExtHdrDeserializer deserializer = new OxmIpv6ExtHdrDeserializer();
-        MatchEntries entry = deserializer.deserialize(buffer);
+        MatchEntry entry = deserializer.deserialize(buffer);
 
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
         Assert.assertEquals("Wrong entry field", Ipv6Exthdr.class, entry.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
         Assert.assertEquals("Wrong entry value",
                 new Ipv6ExthdrFlags(true, true, true, true, true, true, true, true, true),
-                entry.getAugmentation(PseudoFieldMatchEntry.class).getPseudoField());
-        Assert.assertEquals("Wrong entry mask", null, entry.getAugmentation(MaskMatchEntry.class));
+                ((Ipv6ExthdrCase) entry.getMatchEntryValue()).getIpv6Exthdr().getPseudoField());
+        Assert.assertEquals("Wrong entry mask", null, ((Ipv6ExthdrCase) entry.getMatchEntryValue())
+                .getIpv6Exthdr().getMask());
         Assert.assertTrue("Unread data", buffer.readableBytes() == 0);
     }
 }
\ No newline at end of file
index 17bc3abd708efa89c1a110edb1f21ffe591fc8b4..2a08e85ed1445f829f8e0717b8b2a44522ae31ae 100644 (file)
@@ -13,10 +13,10 @@ import io.netty.buffer.ByteBuf;
 import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6FlabelMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Flabel;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Flabel;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6FlabelCase;
 
 /**
  * @author michal.polkorab
@@ -33,12 +33,34 @@ public class OxmIpv6FlabelDeserializerTest {
 
         buffer.skipBytes(4); // skip XID
         OxmIpv6FlabelDeserializer deserializer = new OxmIpv6FlabelDeserializer();
-        MatchEntries entry = deserializer.deserialize(buffer);
+        MatchEntry entry = deserializer.deserialize(buffer);
 
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
         Assert.assertEquals("Wrong entry field", Ipv6Flabel.class, entry.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
         Assert.assertEquals("Wrong entry value", 2,
-                entry.getAugmentation(Ipv6FlabelMatchEntry.class).getIpv6Flabel().getValue().intValue());
+                ((Ipv6FlabelCase) entry.getMatchEntryValue()).getIpv6Flabel()
+                .getIpv6Flabel().getValue().intValue());
+    }
+
+    /**
+     * Tests {@link OxmIpv6FlabelDeserializer#deserialize(ByteBuf)}
+     */
+    @Test
+    public void testWithMask() {
+        ByteBuf buffer = BufferHelper.buildBuffer("80 00 39 08 00 00 00 02 00 00 00 05");
+
+        buffer.skipBytes(4); // skip XID
+        OxmIpv6FlabelDeserializer deserializer = new OxmIpv6FlabelDeserializer();
+        MatchEntry entry = deserializer.deserialize(buffer);
+
+        Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
+        Assert.assertEquals("Wrong entry field", Ipv6Flabel.class, entry.getOxmMatchField());
+        Assert.assertEquals("Wrong entry hasMask", true, entry.isHasMask());
+        Assert.assertEquals("Wrong entry value", 2,
+                ((Ipv6FlabelCase) entry.getMatchEntryValue()).getIpv6Flabel()
+                .getIpv6Flabel().getValue().intValue());
+        Assert.assertArrayEquals("Wrong entry mask", new byte[]{0, 0, 0, 5},
+                ((Ipv6FlabelCase) entry.getMatchEntryValue()).getIpv6Flabel().getMask());
     }
 }
\ No newline at end of file
index c2f6184036719c3af689d4737fd385d00ccadcd1..d8c60a655b9092cafdf10f327e5b8ab9db684d2d 100644 (file)
@@ -14,10 +14,10 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Metadata;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Metadata;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MetadataCase;
 
 /**
  * @author michal.polkorab
@@ -34,12 +34,12 @@ public class OxmMetadataDeserializerTest {
 
         buffer.skipBytes(4); // skip XID
         OxmMetadataDeserializer deserializer = new OxmMetadataDeserializer();
-        MatchEntries entry = deserializer.deserialize(buffer);
+        MatchEntry entry = deserializer.deserialize(buffer);
 
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
         Assert.assertEquals("Wrong entry field", Metadata.class, entry.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
         Assert.assertArrayEquals("Wrong entry value", ByteBufUtils.hexStringToBytes("00 00 00 00 00 00 00 03"),
-                entry.getAugmentation(MetadataMatchEntry.class).getMetadata());
+                ((MetadataCase) entry.getMatchEntryValue()).getMetadata().getMetadata());
     }
 }
\ No newline at end of file
index 728260e2504cd667bc1924be01e9c12abb07027e..2756f063ed4123ddaff0f17285ef77a1914b885e 100644 (file)
@@ -13,10 +13,10 @@ import io.netty.buffer.ByteBuf;
 import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.BosMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsBos;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsBos;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsBosCase;
 
 /**
  * @author michal.polkorab
@@ -33,11 +33,12 @@ public class OxmMplsBosDeserializerTest {
 
         buffer.skipBytes(4); // skip XID
         OxmMplsBosDeserializer deserializer = new OxmMplsBosDeserializer();
-        MatchEntries entry = deserializer.deserialize(buffer);
+        MatchEntry entry = deserializer.deserialize(buffer);
 
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
         Assert.assertEquals("Wrong entry field", MplsBos.class, entry.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
-        Assert.assertEquals("Wrong entry value", false, entry.getAugmentation(BosMatchEntry.class).isBos());
+        Assert.assertEquals("Wrong entry value", false,
+                ((MplsBosCase) entry.getMatchEntryValue()).getMplsBos().isBos());
     }
 }
\ No newline at end of file
index ab3e125e7069bfa8ddc65fba49c2db31ca6878c6..45e4a4fd469d6f0c5e795d65503170ba3f46edbf 100644 (file)
@@ -13,10 +13,10 @@ import io.netty.buffer.ByteBuf;
 import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IsidMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.PbbIsid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.PbbIsid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.PbbIsidCase;
 
 /**
  * @author michal.polkorab
@@ -33,11 +33,12 @@ public class OxmPbbIsidDeserializerTest {
 
         buffer.skipBytes(4); // skip XID
         OxmPbbIsidDeserializer deserializer = new OxmPbbIsidDeserializer();
-        MatchEntries entry = deserializer.deserialize(buffer);
+        MatchEntry entry = deserializer.deserialize(buffer);
 
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
         Assert.assertEquals("Wrong entry field", PbbIsid.class, entry.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
-        Assert.assertEquals("Wrong entry value", 2, entry.getAugmentation(IsidMatchEntry.class).getIsid().intValue());
+        Assert.assertEquals("Wrong entry value", 2, ((PbbIsidCase) entry.getMatchEntryValue())
+                .getPbbIsid().getIsid().intValue());
     }
 }
\ No newline at end of file
index 5962ac37e00355c65126c14531ed237a1277de21..8d2d1828227ac2edbbaafc12c872884623f09a70 100644 (file)
@@ -13,10 +13,10 @@ import io.netty.buffer.ByteBuf;
 import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.VlanVid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.VlanVid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanVidCase;
 
 /**
  * @author michal.polkorab
@@ -33,14 +33,14 @@ public class OxmVlanVidDeserializerTest {
 
         buffer.skipBytes(4); // skip XID
         OxmVlanVidDeserializer deserializer = new OxmVlanVidDeserializer();
-        MatchEntries entry = deserializer.deserialize(buffer);
+        MatchEntry entry = deserializer.deserialize(buffer);
 
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
         Assert.assertEquals("Wrong entry field", VlanVid.class, entry.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
         Assert.assertEquals("Wrong entry value", 10,
-                entry.getAugmentation(VlanVidMatchEntry.class).getVlanVid().intValue());
+                ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().getVlanVid().intValue());
         Assert.assertEquals("Wrong entry value", false,
-                entry.getAugmentation(VlanVidMatchEntry.class).isCfiBit());
+                ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().isCfiBit());
     }
 }
\ No newline at end of file
index 046762feaecef105bbff96da897bcea1306469ba..abed50d9e93dec66454bf1e85dc12d4d0a4376ad 100644 (file)
@@ -12,7 +12,7 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.OF13MatchSerializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
 
 /**
  *
index d178fdc2b7ef30e0b13a0ba8a49d78e5611cdecc..a186c4912a911c60ebc61929c37fe0097484e1eb 100644 (file)
@@ -24,17 +24,17 @@ import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmFieldsAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmFieldsActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmFieldsAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmFieldsActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.oxm.container.match.entry.value.ExperimenterIdCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.oxm.container.match.entry.value.experimenter.id._case.ExperimenterBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.SetField;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.ActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ExperimenterClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ExperimenterClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
 
 /**
  * @author madamjak
@@ -43,7 +43,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
 public class OF13SetFieldActionSerializerTest {
 
     private SerializerRegistry registry;
-    @Mock OFSerializer<MatchEntries> serializerMock;
+    @Mock OFSerializer<MatchEntry> serializerMock;
 
     /**
      * Initialize registry and mock
@@ -64,17 +64,19 @@ public class OF13SetFieldActionSerializerTest {
         ser.injectSerializerRegistry(registry);
         ActionBuilder actionBuilder = new ActionBuilder();
         long experimenterId = 12L;
-        ExperimenterIdMatchEntryBuilder expIdMatchBuilder = new ExperimenterIdMatchEntryBuilder();
-        expIdMatchBuilder.setExperimenter(new ExperimenterId(experimenterId));
-        MatchEntriesBuilder meb = new MatchEntriesBuilder();
+        ExperimenterIdCaseBuilder expCaseBuilder = new ExperimenterIdCaseBuilder();
+        ExperimenterBuilder expBuilder = new ExperimenterBuilder();
+        expBuilder.setExperimenter(new ExperimenterId(experimenterId));
+        expCaseBuilder.setExperimenter(expBuilder.build());
+        MatchEntryBuilder meb = new MatchEntryBuilder();
         meb.setOxmClass(ExperimenterClass.class);
         meb.setOxmMatchField(OxmMatchFieldClass.class);
-        meb.addAugmentation(ExperimenterIdMatchEntry.class, expIdMatchBuilder.build());
-        List<MatchEntries> matchEntries = new ArrayList<>();
-        MatchEntries me = meb.build();
-        matchEntries.add(me);
+        meb.setMatchEntryValue(expCaseBuilder.build());
+        List<MatchEntry> MatchEntry = new ArrayList<>();
+        MatchEntry me = meb.build();
+        MatchEntry.add(me);
         OxmFieldsActionBuilder oxmActBuilder = new OxmFieldsActionBuilder();
-        oxmActBuilder.setMatchEntries(matchEntries);
+        oxmActBuilder.setMatchEntry(MatchEntry);
         actionBuilder.addAugmentation(OxmFieldsAction.class, oxmActBuilder.build());
         actionBuilder.setType(SetField.class);
         MatchEntrySerializerKey<?, ?> key = new MatchEntrySerializerKey<>(
@@ -83,7 +85,7 @@ public class OF13SetFieldActionSerializerTest {
         registry.registerSerializer(key, serializerMock);
         ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();
         ser.serialize(actionBuilder.build(), out);
-        Mockito.verify(serializerMock, Mockito.times(1)).serialize((MatchEntries)Mockito.anyObject(), (ByteBuf)Mockito.anyObject());
+        Mockito.verify(serializerMock, Mockito.times(1)).serialize((MatchEntry)Mockito.anyObject(), (ByteBuf)Mockito.anyObject());
         int lenght = out.readableBytes();
         Assert.assertEquals("Wrong - bad field code", ActionConstants.SET_FIELD_CODE, out.readUnsignedShort());
         Assert.assertEquals("Wrong - bad lenght", lenght, out.readUnsignedShort());
index a0c39227ad588c0094383fa14bbe9051edd88379..f1ba2ca2abd5597b9e68e3313e3e82fdbda9d51f 100644 (file)
@@ -21,23 +21,19 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFSerializer;
 import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionsInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionsInstructionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EcnMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EcnMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataInstructionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortNumberMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortNumberMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TableIdInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TableIdInstructionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionsInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionsInstructionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MetadataInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MetadataInstructionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.TableIdInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.TableIdInstructionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Output;
 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.rev130731.actions.grouping.ActionBuilder;
@@ -50,13 +46,17 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowModFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPhyPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpEcn;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmMatchType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.MatchBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPhyPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpEcn;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmMatchType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPhyPortCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpEcnCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.in.phy.port._case.InPhyPortBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ip.ecn._case.IpEcnBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.MatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInputBuilder;
 
@@ -103,23 +103,27 @@ public class FlowModInputMessageFactoryTest {
         builder.setFlags(new FlowModFlags(true, false, true, false, true));
         MatchBuilder matchBuilder = new MatchBuilder();
         matchBuilder.setType(OxmMatchType.class);
-        List<MatchEntries> entries = new ArrayList<>();
-        MatchEntriesBuilder entriesBuilder = new MatchEntriesBuilder();
+        List<MatchEntry> entries = new ArrayList<>();
+        MatchEntryBuilder entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(InPhyPort.class);
         entriesBuilder.setHasMask(false);
-        PortNumberMatchEntryBuilder portNumberBuilder = new PortNumberMatchEntryBuilder();
-        portNumberBuilder.setPortNumber(new PortNumber(42L));
-        entriesBuilder.addAugmentation(PortNumberMatchEntry.class, portNumberBuilder.build());
+        InPhyPortCaseBuilder inPhyPortCaseBuilder = new InPhyPortCaseBuilder();
+        InPhyPortBuilder inPhyPortBuilder = new InPhyPortBuilder();
+        inPhyPortBuilder.setPortNumber(new PortNumber(42L));
+        inPhyPortCaseBuilder.setInPhyPort(inPhyPortBuilder.build());
+        entriesBuilder.setMatchEntryValue(inPhyPortCaseBuilder.build());
         entries.add(entriesBuilder.build());
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(IpEcn.class);
         entriesBuilder.setHasMask(false);
-        EcnMatchEntryBuilder ecnBuilder = new EcnMatchEntryBuilder();
-        ecnBuilder.setEcn((short) 4);
-        entriesBuilder.addAugmentation(EcnMatchEntry.class, ecnBuilder.build());
+        IpEcnCaseBuilder ipEcnCaseBuilder = new IpEcnCaseBuilder();
+        IpEcnBuilder ipEcnBuilder = new IpEcnBuilder();
+        ipEcnBuilder.setEcn((short) 4);
+        ipEcnCaseBuilder.setIpEcn(ipEcnBuilder.build());
+        entriesBuilder.setMatchEntryValue(ipEcnCaseBuilder.build());
         entries.add(entriesBuilder.build());
-        matchBuilder.setMatchEntries(entries);
+        matchBuilder.setMatchEntry(entries);
         builder.setMatch(matchBuilder.build());
         List<Instruction> instructions = new ArrayList<>();
         InstructionBuilder insBuilder = new InstructionBuilder();
index 0ec4d2f4e3e56cf76a21bdebc9055ccbe8889c9c..579bd3796fef92eb5e8f2999c73dbcef86897409 100644 (file)
@@ -21,16 +21,16 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFSerializer;
 import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IpAddressAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IpAddressActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.IpAddressAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.IpAddressActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.SetNwDst;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.SetTpSrc;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
@@ -39,7 +39,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowModFlagsV10;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowWildcardsV10;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10Builder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInputBuilder;
 
index 3ce0086235e0196f6b5ea8c6da81d7447af0d476..01fe88711751b3e28bc434d70fd3248095515cb2 100644 (file)
@@ -20,14 +20,14 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFSerializer;
 import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Output;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.StripVlan;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
index 464f1c36b4c5bbc42397b0ec2c4a9e16082db58e..da2486c4ff418e9c583b4d4d77035b30217d2352 100644 (file)
@@ -25,7 +25,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowWildcardsV10;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartRequestFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10Builder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestDescCaseBuilder;
index f202caadffb10bbf25f8e060b511d184fa3e446f..189fac23f5065ba3fb02d93a5359007d28f254ba 100644 (file)
@@ -20,12 +20,12 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFSerializer;
 import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthertypeAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthertypeActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.EthertypeAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.EthertypeActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.PopVlan;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.PushVlan;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
index 2f78055b10fdd2902de70d10dd8d449091431cbd..c4d58dc94c1c1dd5a7e20e9f62e720804c09f369 100644 (file)
@@ -24,8 +24,8 @@ import org.opendaylight.openflowjava.protocol.api.keys.ExperimenterIdSerializerK
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.serialization.factories.MultipartRequestInputFactory;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMultipartRequest;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMultipartRequestBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdMultipartRequest;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdMultipartRequestBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartRequestFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
index e8f7f97db2e591092f2269b186b8270b94d7500a..d7a19d203528a097c0ac2939c65607e4f962a8b4 100644 (file)
@@ -31,18 +31,18 @@ import org.opendaylight.openflowjava.protocol.impl.serialization.factories.Multi
 import org.opendaylight.openflowjava.protocol.impl.serialization.factories.MultipartRequestInputFactoryTest;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.InstructionRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.InstructionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NextTableRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NextTableRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.table.features.properties.container.table.feature.properties.NextTableIds;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.table.features.properties.container.table.feature.properties.NextTableIdsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeaturePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdTableFeaturePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeaturePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeaturePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeaturePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIds;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIdsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Output;
 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.rev130731.actions.grouping.ActionBuilder;
@@ -59,13 +59,13 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableConfig;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableFeaturesPropType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPhyPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpEcn;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpProto;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPhyPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpEcn;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpProto;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestTableFeaturesCaseBuilder;
@@ -221,63 +221,63 @@ public class MultipartRequestTableFeaturesTest {
         propBuilder = new TableFeaturePropertiesBuilder();
         propBuilder.setType(TableFeaturesPropType.OFPTFPTMATCH);
         OxmRelatedTableFeaturePropertyBuilder oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
-        List<MatchEntries> entries = new ArrayList<>();
-        MatchEntriesBuilder entriesBuilder = new MatchEntriesBuilder();
+        List<MatchEntry> entries = new ArrayList<>();
+        MatchEntryBuilder entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(InPhyPort.class);
         entriesBuilder.setHasMask(false);
         entries.add(entriesBuilder.build());
-        entriesBuilder = new MatchEntriesBuilder();
+        entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(InPort.class);
         entriesBuilder.setHasMask(false);
         entries.add(entriesBuilder.build());
-        oxmBuilder.setMatchEntries(entries);
+        oxmBuilder.setMatchEntry(entries);
         propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
         properties.add(propBuilder.build());
         propBuilder = new TableFeaturePropertiesBuilder();
         propBuilder.setType(TableFeaturesPropType.OFPTFPTWILDCARDS);
         oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
         entries = new ArrayList<>();
-        oxmBuilder.setMatchEntries(entries);
+        oxmBuilder.setMatchEntry(entries);
         propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
         properties.add(propBuilder.build());
         propBuilder = new TableFeaturePropertiesBuilder();
         propBuilder.setType(TableFeaturesPropType.OFPTFPTWRITESETFIELD);
         oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
         entries = new ArrayList<>();
-        oxmBuilder.setMatchEntries(entries);
+        oxmBuilder.setMatchEntry(entries);
         propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
         properties.add(propBuilder.build());
         propBuilder = new TableFeaturePropertiesBuilder();
         propBuilder.setType(TableFeaturesPropType.OFPTFPTWRITESETFIELDMISS);
         oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
         entries = new ArrayList<>();
-        oxmBuilder.setMatchEntries(entries);
+        oxmBuilder.setMatchEntry(entries);
         propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
         properties.add(propBuilder.build());
         propBuilder = new TableFeaturePropertiesBuilder();
         propBuilder.setType(TableFeaturesPropType.OFPTFPTAPPLYSETFIELD);
         oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
         entries = new ArrayList<>();
-        entriesBuilder = new MatchEntriesBuilder();
+        entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(IpProto.class);
         entriesBuilder.setHasMask(false);
         entries.add(entriesBuilder.build());
-        entriesBuilder = new MatchEntriesBuilder();
+        entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(IpEcn.class);
         entriesBuilder.setHasMask(false);
         entries.add(entriesBuilder.build());
-        oxmBuilder.setMatchEntries(entries);
+        oxmBuilder.setMatchEntry(entries);
         propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
         properties.add(propBuilder.build());
         propBuilder = new TableFeaturePropertiesBuilder();
         propBuilder.setType(TableFeaturesPropType.OFPTFPTAPPLYSETFIELDMISS);
         oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
         entries = new ArrayList<>();
-        oxmBuilder.setMatchEntries(entries);
+        oxmBuilder.setMatchEntry(entries);
         propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
         properties.add(propBuilder.build());
         tableFeaturesBuilder.setTableFeatureProperties(properties);
index 412adb56f01f5a0e4297dfa416701577b8082f68..220a2af5792e7483f62af4253366de9e2293d1d8 100644 (file)
@@ -26,7 +26,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowWildcardsV10;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartRequestFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10Builder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCaseBuilder;
index 955c1221c41e320bb03474997b104e1521bdfd6a..0fcacef140d2fddf40fe5942c11ac053c0f0cfee 100644 (file)
@@ -24,8 +24,8 @@ import org.opendaylight.openflowjava.protocol.api.keys.ExperimenterIdSerializerK
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.serialization.factories.OF10StatsRequestInputFactory;
 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMultipartRequest;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMultipartRequestBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdMultipartRequest;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdMultipartRequestBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartRequestFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
index ab564ee0e35b5af0727b1c7324c24851955f5515..322d17868fc379786041c617bb0ae4db595f9a65 100644 (file)
@@ -16,11 +16,11 @@ import io.netty.buffer.PooledByteBufAllocator;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OpCodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OpCodeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpOp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpOp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpOpCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.op._case.ArpOpBuilder;
 
 /**
  * @author michal.polkorab
@@ -35,7 +35,7 @@ public class OxmArpOpSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareArpOpMatchEntry(1402);
+        MatchEntryBuilder builder = prepareArpOpMatchEntry(1402);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -50,7 +50,7 @@ public class OxmArpOpSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareArpOpHeader(false);
+        MatchEntryBuilder builder = prepareArpOpHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -83,16 +83,18 @@ public class OxmArpOpSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_SHORT_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareArpOpMatchEntry(int value) {
-        MatchEntriesBuilder builder = prepareArpOpHeader(false);
-        OpCodeMatchEntryBuilder opBuilder = new OpCodeMatchEntryBuilder();
-        opBuilder.setOpCode(value);
-        builder.addAugmentation(OpCodeMatchEntry.class, opBuilder.build());
+    private static MatchEntryBuilder prepareArpOpMatchEntry(int value) {
+        MatchEntryBuilder builder = prepareArpOpHeader(false);
+        ArpOpCaseBuilder casebuilder = new ArpOpCaseBuilder();
+        ArpOpBuilder valueBuilder = new ArpOpBuilder();
+        valueBuilder.setOpCode(value);
+        casebuilder.setArpOp(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareArpOpHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareArpOpHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(ArpOp.class);
         builder.setHasMask(hasMask);
index 3cd8d886d7f84789440718b72e6770f5b5f7eb1f..145772b79ef55954688842a855bf0b3eb3214cef 100644 (file)
@@ -18,13 +18,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpTha;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpSha;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpShaCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.sha._case.ArpShaBuilder;
 
 /**
  * @author michal.polkorab
@@ -32,14 +30,14 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
  */
 public class OxmArpShaSerializerTest {
 
-    OxmArpThaSerializer serializer = new OxmArpThaSerializer();
+    OxmArpShaSerializer serializer = new OxmArpShaSerializer();
 
     /**
      * Test correct serialization
      */
     @Test
     public void testSerializeWithoutMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(false, "00:01:02:03:04:05");
+        MatchEntryBuilder builder = prepareMatchEntry(false, "00:01:02:03:04:05");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -56,7 +54,7 @@ public class OxmArpShaSerializerTest {
      */
     @Test
     public void testSerializeWithMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(true, "00:01:02:03:04:0A");
+        MatchEntryBuilder builder = prepareMatchEntry(true, "00:01:02:03:04:0A");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -77,7 +75,7 @@ public class OxmArpShaSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithoutMask() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -91,7 +89,7 @@ public class OxmArpShaSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithMask() {
-        MatchEntriesBuilder builder = prepareHeader(true);
+        MatchEntryBuilder builder = prepareHeader(true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -113,7 +111,7 @@ public class OxmArpShaSerializerTest {
      */
     @Test
     public void getOxmFieldCode() {
-        assertEquals("Wrong oxm-class", OxmMatchConstants.ARP_THA, serializer.getOxmFieldCode());
+        assertEquals("Wrong oxm-class", OxmMatchConstants.ARP_SHA, serializer.getOxmFieldCode());
     }
 
     /**
@@ -124,23 +122,23 @@ public class OxmArpShaSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.MAC_ADDRESS_LENGTH, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(boolean hasMask, String value) {
-        MatchEntriesBuilder builder = prepareHeader(hasMask);
+    private static MatchEntryBuilder prepareMatchEntry(boolean hasMask, String value) {
+        MatchEntryBuilder builder = prepareHeader(hasMask);
+        ArpShaCaseBuilder casebuilder = new ArpShaCaseBuilder();
+        ArpShaBuilder valueBuilder = new ArpShaBuilder();
         if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{15, 15, 0, 0, 10, 10});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+            valueBuilder.setMask(new byte[]{15, 15, 0, 0, 10, 10});
         }
-        MacAddressMatchEntryBuilder macBuilder = new MacAddressMatchEntryBuilder();
-        macBuilder.setMacAddress(new MacAddress(value));
-        builder.addAugmentation(MacAddressMatchEntry.class, macBuilder.build());
+        valueBuilder.setMacAddress(new MacAddress(value));
+        casebuilder.setArpSha(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
-        builder.setOxmMatchField(ArpTha.class);
+        builder.setOxmMatchField(ArpSha.class);
         builder.setHasMask(hasMask);
         return builder;
     }
@@ -148,7 +146,7 @@ public class OxmArpShaSerializerTest {
     private static void checkHeader(ByteBuf buffer, boolean hasMask) {
         assertEquals("Wrong oxm-class", OxmMatchConstants.OPENFLOW_BASIC_CLASS, buffer.readUnsignedShort());
         short fieldAndMask = buffer.readUnsignedByte();
-        assertEquals("Wrong oxm-field", OxmMatchConstants.ARP_THA, fieldAndMask >>> 1);
+        assertEquals("Wrong oxm-field", OxmMatchConstants.ARP_SHA, fieldAndMask >>> 1);
         assertEquals("Wrong hasMask", hasMask, (fieldAndMask & 1) != 0);
         if (hasMask) {
             assertEquals("Wrong length", 2 * EncodeConstants.MAC_ADDRESS_LENGTH, buffer.readUnsignedByte());
index 8f60a449dcf6c728e49f1a4c21516083f32745d9..176595daf36522b614af24006fb4ef82e563db39 100644 (file)
@@ -18,13 +18,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpSpa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpSpa;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpSpaCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.spa._case.ArpSpaBuilder;
 
 /**
  * @author michal.polkorab
@@ -39,7 +37,7 @@ public class OxmArpSpaSerializerTest {
      */
     @Test
     public void testSerializeWithoutMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(false, "10.0.0.1");
+        MatchEntryBuilder builder = prepareMatchEntry(false, "10.0.0.1");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -56,7 +54,7 @@ public class OxmArpSpaSerializerTest {
      */
     @Test
     public void testSerializeWithMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(true, "120.121.122.0");
+        MatchEntryBuilder builder = prepareMatchEntry(true, "120.121.122.0");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -77,7 +75,7 @@ public class OxmArpSpaSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithoutMask() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -91,7 +89,7 @@ public class OxmArpSpaSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithMask() {
-        MatchEntriesBuilder builder = prepareHeader(true);
+        MatchEntryBuilder builder = prepareHeader(true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -124,21 +122,21 @@ public class OxmArpSpaSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_INT_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(boolean hasMask, String value) {
-        MatchEntriesBuilder builder = prepareHeader(hasMask);
+    private static MatchEntryBuilder prepareMatchEntry(boolean hasMask, String value) {
+        MatchEntryBuilder builder = prepareHeader(hasMask);
+        ArpSpaCaseBuilder casebuilder = new ArpSpaCaseBuilder();
+        ArpSpaBuilder valueBuilder = new ArpSpaBuilder();
         if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{15, 15, 0, 0});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+            valueBuilder.setMask(new byte[]{15, 15, 0, 0});
         }
-        Ipv4AddressMatchEntryBuilder addressBuilder = new Ipv4AddressMatchEntryBuilder();
-        addressBuilder.setIpv4Address(new Ipv4Address(value));
-        builder.addAugmentation(Ipv4AddressMatchEntry.class, addressBuilder.build());
+        valueBuilder.setIpv4Address(new Ipv4Address(value));
+        casebuilder.setArpSpa(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(ArpSpa.class);
         builder.setHasMask(hasMask);
index 1bd15a7b2106886b7b76ca3fde03059dc97c1585..a753c9649f973079beb676ec3ef0baae0486e5e6 100644 (file)
@@ -18,13 +18,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpSha;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpTha;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpThaCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.tha._case.ArpThaBuilder;
 
 /**
  * @author michal.polkorab
@@ -32,14 +30,14 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.
  */
 public class OxmArpThaSerializerTest {
 
-    OxmArpShaSerializer serializer = new OxmArpShaSerializer();
+    OxmArpThaSerializer serializer = new OxmArpThaSerializer();
 
     /**
      * Test correct serialization
      */
     @Test
     public void testSerializeWithoutMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(false, "00:01:02:03:04:05");
+        MatchEntryBuilder builder = prepareMatchEntry(false, "00:01:02:03:04:05");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -56,7 +54,7 @@ public class OxmArpThaSerializerTest {
      */
     @Test
     public void testSerializeWithMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(true, "00:01:02:03:04:0A");
+        MatchEntryBuilder builder = prepareMatchEntry(true, "00:01:02:03:04:0A");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -77,7 +75,7 @@ public class OxmArpThaSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithoutMask() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -91,7 +89,7 @@ public class OxmArpThaSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithMask() {
-        MatchEntriesBuilder builder = prepareHeader(true);
+        MatchEntryBuilder builder = prepareHeader(true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -113,7 +111,7 @@ public class OxmArpThaSerializerTest {
      */
     @Test
     public void getOxmFieldCode() {
-        assertEquals("Wrong oxm-class", OxmMatchConstants.ARP_SHA, serializer.getOxmFieldCode());
+        assertEquals("Wrong oxm-class", OxmMatchConstants.ARP_THA, serializer.getOxmFieldCode());
     }
 
     /**
@@ -124,23 +122,23 @@ public class OxmArpThaSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.MAC_ADDRESS_LENGTH, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(boolean hasMask, String value) {
-        MatchEntriesBuilder builder = prepareHeader(hasMask);
+    private static MatchEntryBuilder prepareMatchEntry(boolean hasMask, String value) {
+        MatchEntryBuilder builder = prepareHeader(hasMask);
+        ArpThaCaseBuilder casebuilder = new ArpThaCaseBuilder();
+        ArpThaBuilder valueBuilder = new ArpThaBuilder();
         if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{15, 15, 0, 0, 10, 10});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+            valueBuilder.setMask(new byte[]{15, 15, 0, 0, 10, 10});
         }
-        MacAddressMatchEntryBuilder macBuilder = new MacAddressMatchEntryBuilder();
-        macBuilder.setMacAddress(new MacAddress(value));
-        builder.addAugmentation(MacAddressMatchEntry.class, macBuilder.build());
+        valueBuilder.setMacAddress(new MacAddress(value));
+        casebuilder.setArpTha(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
-        builder.setOxmMatchField(ArpSha.class);
+        builder.setOxmMatchField(ArpTha.class);
         builder.setHasMask(hasMask);
         return builder;
     }
@@ -148,7 +146,7 @@ public class OxmArpThaSerializerTest {
     private static void checkHeader(ByteBuf buffer, boolean hasMask) {
         assertEquals("Wrong oxm-class", OxmMatchConstants.OPENFLOW_BASIC_CLASS, buffer.readUnsignedShort());
         short fieldAndMask = buffer.readUnsignedByte();
-        assertEquals("Wrong oxm-field", OxmMatchConstants.ARP_SHA, fieldAndMask >>> 1);
+        assertEquals("Wrong oxm-field", OxmMatchConstants.ARP_THA, fieldAndMask >>> 1);
         assertEquals("Wrong hasMask", hasMask, (fieldAndMask & 1) != 0);
         if (hasMask) {
             assertEquals("Wrong length", 2 * EncodeConstants.MAC_ADDRESS_LENGTH, buffer.readUnsignedByte());
index 5122e8229e176c88a573b59c1b20676f28ec9890..78812111661cad0b62146670dabddad4487c83e8 100644 (file)
@@ -18,13 +18,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpTpa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpTpa;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpTpaCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.tpa._case.ArpTpaBuilder;
 
 /**
  * @author michal.polkorab
@@ -39,7 +37,7 @@ public class OxmArpTpaSerializerTest {
      */
     @Test
     public void testSerializeWithoutMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(false, "10.0.0.1");
+        MatchEntryBuilder builder = prepareMatchEntry(false, "10.0.0.1");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -56,7 +54,7 @@ public class OxmArpTpaSerializerTest {
      */
     @Test
     public void testSerializeWithMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(true, "120.121.122.0");
+        MatchEntryBuilder builder = prepareMatchEntry(true, "120.121.122.0");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -77,7 +75,7 @@ public class OxmArpTpaSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithoutMask() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -91,7 +89,7 @@ public class OxmArpTpaSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithMask() {
-        MatchEntriesBuilder builder = prepareHeader(true);
+        MatchEntryBuilder builder = prepareHeader(true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -124,21 +122,21 @@ public class OxmArpTpaSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_INT_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(boolean hasMask, String value) {
-        MatchEntriesBuilder builder = prepareHeader(hasMask);
+    private static MatchEntryBuilder prepareMatchEntry(boolean hasMask, String value) {
+        MatchEntryBuilder builder = prepareHeader(hasMask);
+        ArpTpaCaseBuilder casebuilder = new ArpTpaCaseBuilder();
+        ArpTpaBuilder valueBuilder = new ArpTpaBuilder();
         if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{15, 15, 0, 0});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+            valueBuilder.setMask(new byte[]{15, 15, 0, 0});
         }
-        Ipv4AddressMatchEntryBuilder addressBuilder = new Ipv4AddressMatchEntryBuilder();
-        addressBuilder.setIpv4Address(new Ipv4Address(value));
-        builder.addAugmentation(Ipv4AddressMatchEntry.class, addressBuilder.build());
+        valueBuilder.setIpv4Address(new Ipv4Address(value));
+        casebuilder.setArpTpa(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(ArpTpa.class);
         builder.setHasMask(hasMask);
index 03116abd91a8bce49bba86321319f9294475f308..c442608bcb8b86c635bc31cfc1fa086d50ea1f1a 100644 (file)
@@ -18,13 +18,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthDstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.eth.dst._case.EthDstBuilder;
 
 /**
  * @author michal.polkorab
@@ -39,7 +37,7 @@ public class OxmEthDstSerializerTest {
      */
     @Test
     public void testSerializeWithoutMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(false, "00:01:02:03:04:05");
+        MatchEntryBuilder builder = prepareMatchEntry(false, "00:01:02:03:04:05");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -56,7 +54,7 @@ public class OxmEthDstSerializerTest {
      */
     @Test
     public void testSerializeWithMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(true, "00:01:02:03:04:0A");
+        MatchEntryBuilder builder = prepareMatchEntry(true, "00:01:02:03:04:0A");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -77,7 +75,7 @@ public class OxmEthDstSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithoutMask() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -91,7 +89,7 @@ public class OxmEthDstSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithMask() {
-        MatchEntriesBuilder builder = prepareHeader(true);
+        MatchEntryBuilder builder = prepareHeader(true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -124,21 +122,21 @@ public class OxmEthDstSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.MAC_ADDRESS_LENGTH, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(boolean hasMask, String value) {
-        MatchEntriesBuilder builder = prepareHeader(hasMask);
+    private static MatchEntryBuilder prepareMatchEntry(boolean hasMask, String value) {
+        MatchEntryBuilder builder = prepareHeader(hasMask);
+        EthDstCaseBuilder casebuilder = new EthDstCaseBuilder();
+        EthDstBuilder valueBuilder = new EthDstBuilder();
         if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{15, 15, 0, 0, 10, 10});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+            valueBuilder.setMask(new byte[]{15, 15, 0, 0, 10, 10});
         }
-        MacAddressMatchEntryBuilder macBuilder = new MacAddressMatchEntryBuilder();
-        macBuilder.setMacAddress(new MacAddress(value));
-        builder.addAugmentation(MacAddressMatchEntry.class, macBuilder.build());
+        valueBuilder.setMacAddress(new MacAddress(value));
+        casebuilder.setEthDst(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(EthDst.class);
         builder.setHasMask(hasMask);
index 6f143277609df2e8bba94d6a5da5e0dbc427c61d..263399dc13439d080fa44d787e44abcc687abe7f 100644 (file)
@@ -18,13 +18,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthSrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.eth.src._case.EthSrcBuilder;
 
 /**
  * @author michal.polkorab
@@ -39,7 +37,7 @@ public class OxmEthSrcSerializerTest {
      */
     @Test
     public void testSerializeWithoutMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(false, "00:01:02:03:04:05");
+        MatchEntryBuilder builder = prepareMatchEntry(false, "00:01:02:03:04:05");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -56,7 +54,7 @@ public class OxmEthSrcSerializerTest {
      */
     @Test
     public void testSerializeWithMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(true, "00:01:02:03:04:0A");
+        MatchEntryBuilder builder = prepareMatchEntry(true, "00:01:02:03:04:0A");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -77,7 +75,7 @@ public class OxmEthSrcSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithoutMask() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -91,7 +89,7 @@ public class OxmEthSrcSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithMask() {
-        MatchEntriesBuilder builder = prepareHeader(true);
+        MatchEntryBuilder builder = prepareHeader(true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -124,21 +122,21 @@ public class OxmEthSrcSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.MAC_ADDRESS_LENGTH, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(boolean hasMask, String value) {
-        MatchEntriesBuilder builder = prepareHeader(hasMask);
+    private static MatchEntryBuilder prepareMatchEntry(boolean hasMask, String value) {
+        MatchEntryBuilder builder = prepareHeader(hasMask);
+        EthSrcCaseBuilder casebuilder = new EthSrcCaseBuilder();
+        EthSrcBuilder valueBuilder = new EthSrcBuilder();
         if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{15, 15, 0, 0, 10, 10});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+            valueBuilder.setMask(new byte[]{15, 15, 0, 0, 10, 10});
         }
-        MacAddressMatchEntryBuilder macBuilder = new MacAddressMatchEntryBuilder();
-        macBuilder.setMacAddress(new MacAddress(value));
-        builder.addAugmentation(MacAddressMatchEntry.class, macBuilder.build());
+        valueBuilder.setMacAddress(new MacAddress(value));
+        casebuilder.setEthSrc(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(EthSrc.class);
         builder.setHasMask(hasMask);
index 7850358f24e75175c3133107f15b1dc2d7c0af25..9bb5c9243d21fce6e24df112cde3bc37a15358e7 100644 (file)
@@ -16,12 +16,12 @@ import io.netty.buffer.PooledByteBufAllocator;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthTypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthTypeMatchEntryBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.EtherType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthTypeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.eth.type._case.EthTypeBuilder;
 
 /**
  * @author michal.polkorab
@@ -36,7 +36,7 @@ public class OxmEthTypeSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareEthTypeMatchEntry(65535);
+        MatchEntryBuilder builder = prepareEthTypeMatchEntry(65535);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -51,7 +51,7 @@ public class OxmEthTypeSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareEthTypeHeader(false);
+        MatchEntryBuilder builder = prepareEthTypeHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -84,17 +84,18 @@ public class OxmEthTypeSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_SHORT_IN_BYTES, serializer.getValueLength());
     }
 
-
-    private static MatchEntriesBuilder prepareEthTypeMatchEntry(int type) {
-        MatchEntriesBuilder builder = prepareEthTypeHeader(false);
-        EthTypeMatchEntryBuilder typeBuilder = new EthTypeMatchEntryBuilder();
-        typeBuilder.setEthType(new EtherType(type));
-        builder.addAugmentation(EthTypeMatchEntry.class, typeBuilder.build());
+    private static MatchEntryBuilder prepareEthTypeMatchEntry(int type) {
+        MatchEntryBuilder builder = prepareEthTypeHeader(false);
+        EthTypeCaseBuilder casebuilder = new EthTypeCaseBuilder();
+        EthTypeBuilder valueBuilder = new EthTypeBuilder();
+        valueBuilder.setEthType(new EtherType(type));
+        casebuilder.setEthType(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareEthTypeHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareEthTypeHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(EthType.class);
         builder.setHasMask(hasMask);
index 8afa0c1cbbe42f2c7322babe32f1f77613f0a3e7..6004776e4e015ab5709de77603bded12cbdad64c 100644 (file)
@@ -16,11 +16,11 @@ import io.netty.buffer.PooledByteBufAllocator;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4CodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4CodeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv4Code;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv4Code;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv4CodeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv4.code._case.Icmpv4CodeBuilder;
 
 /**
  * @author michal.polkorab
@@ -35,7 +35,7 @@ public class OxmIcmpv4CodeSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareIcmpv4CodeMatchEntry((short) 200);
+        MatchEntryBuilder builder = prepareIcmpv4CodeMatchEntry((short) 200);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -50,7 +50,7 @@ public class OxmIcmpv4CodeSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareIcmpv4CodeHeader(false);
+        MatchEntryBuilder builder = prepareIcmpv4CodeHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -83,17 +83,18 @@ public class OxmIcmpv4CodeSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_BYTE_IN_BYTES, serializer.getValueLength());
     }
 
-
-    private static MatchEntriesBuilder prepareIcmpv4CodeMatchEntry(short value) {
-        MatchEntriesBuilder builder = prepareIcmpv4CodeHeader(false);
-        Icmpv4CodeMatchEntryBuilder icmpv4Builder = new Icmpv4CodeMatchEntryBuilder();
-        icmpv4Builder.setIcmpv4Code(value);
-        builder.addAugmentation(Icmpv4CodeMatchEntry.class, icmpv4Builder.build());
+    private static MatchEntryBuilder prepareIcmpv4CodeMatchEntry(short value) {
+        MatchEntryBuilder builder = prepareIcmpv4CodeHeader(false);
+        Icmpv4CodeCaseBuilder casebuilder = new Icmpv4CodeCaseBuilder();
+        Icmpv4CodeBuilder valueBuilder = new Icmpv4CodeBuilder();
+        valueBuilder.setIcmpv4Code(value);
+        casebuilder.setIcmpv4Code(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareIcmpv4CodeHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareIcmpv4CodeHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(Icmpv4Code.class);
         builder.setHasMask(hasMask);
index 23df28c810af4046fc56b0f5dc212fcea5f2186a..d62c45681b2cd03a79e03a3240b572e34de8a88d 100644 (file)
@@ -16,11 +16,11 @@ import io.netty.buffer.PooledByteBufAllocator;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4TypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4TypeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv4Type;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv4Type;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv4TypeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv4.type._case.Icmpv4TypeBuilder;
 
 /**
  * @author michal.polkorab
@@ -35,7 +35,7 @@ public class OxmIcmpv4TypeSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareIcmpv4TypeMatchEntry((short) 128);
+        MatchEntryBuilder builder = prepareIcmpv4TypeMatchEntry((short) 128);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -50,7 +50,7 @@ public class OxmIcmpv4TypeSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareIcmpv4TypeHeader(false);
+        MatchEntryBuilder builder = prepareIcmpv4TypeHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -83,17 +83,18 @@ public class OxmIcmpv4TypeSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_BYTE_IN_BYTES, serializer.getValueLength());
     }
 
-
-    private static MatchEntriesBuilder prepareIcmpv4TypeMatchEntry(short value) {
-        MatchEntriesBuilder builder = prepareIcmpv4TypeHeader(false);
-        Icmpv4TypeMatchEntryBuilder icmpv4Builder = new Icmpv4TypeMatchEntryBuilder();
-        icmpv4Builder.setIcmpv4Type(value);
-        builder.addAugmentation(Icmpv4TypeMatchEntry.class, icmpv4Builder.build());
+    private static MatchEntryBuilder prepareIcmpv4TypeMatchEntry(short value) {
+        MatchEntryBuilder builder = prepareIcmpv4TypeHeader(false);
+        Icmpv4TypeCaseBuilder casebuilder = new Icmpv4TypeCaseBuilder();
+        Icmpv4TypeBuilder valueBuilder = new Icmpv4TypeBuilder();
+        valueBuilder.setIcmpv4Type(value);
+        casebuilder.setIcmpv4Type(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareIcmpv4TypeHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareIcmpv4TypeHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(Icmpv4Type.class);
         builder.setHasMask(hasMask);
index 410fa4aa9ef6948d92a6a3b66ee9dcb3a323378c..6706a9d2a6888ca497a7a3eba438bd061a52fdc9 100644 (file)
@@ -16,11 +16,11 @@ import io.netty.buffer.PooledByteBufAllocator;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6CodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6CodeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv6Code;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv6Code;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv6CodeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv6.code._case.Icmpv6CodeBuilder;
 
 /**
  * @author michal.polkorab
@@ -35,7 +35,7 @@ public class OxmIcmpv6CodeSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareIcmpv6CodeMatchEntry((short) 101);
+        MatchEntryBuilder builder = prepareIcmpv6CodeMatchEntry((short) 101);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -50,7 +50,7 @@ public class OxmIcmpv6CodeSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareIcmpv6CodeHeader(false);
+        MatchEntryBuilder builder = prepareIcmpv6CodeHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -83,16 +83,18 @@ public class OxmIcmpv6CodeSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_BYTE_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareIcmpv6CodeMatchEntry(short value) {
-        MatchEntriesBuilder builder = prepareIcmpv6CodeHeader(false);
-        Icmpv6CodeMatchEntryBuilder icmpv6Builder = new Icmpv6CodeMatchEntryBuilder();
-        icmpv6Builder.setIcmpv6Code(value);
-        builder.addAugmentation(Icmpv6CodeMatchEntry.class, icmpv6Builder.build());
+    private static MatchEntryBuilder prepareIcmpv6CodeMatchEntry(short value) {
+        MatchEntryBuilder builder = prepareIcmpv6CodeHeader(false);
+        Icmpv6CodeCaseBuilder casebuilder = new Icmpv6CodeCaseBuilder();
+        Icmpv6CodeBuilder valueBuilder = new Icmpv6CodeBuilder();
+        valueBuilder.setIcmpv6Code(value);
+        casebuilder.setIcmpv6Code(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareIcmpv6CodeHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareIcmpv6CodeHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(Icmpv6Code.class);
         builder.setHasMask(hasMask);
index c97a7d4261f56ee6d830ccc69979771abe04b7a9..7f0ad5fb89d102e30824308ab304e9daca192114 100644 (file)
@@ -16,11 +16,11 @@ import io.netty.buffer.PooledByteBufAllocator;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6TypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6TypeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv6Type;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv6Type;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv6TypeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv6.type._case.Icmpv6TypeBuilder;
 
 /**
  * @author michal.polkorab
@@ -35,7 +35,7 @@ public class OxmIcmpv6TypeSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareIcmpv6TypeMatchEntry((short) 123);
+        MatchEntryBuilder builder = prepareIcmpv6TypeMatchEntry((short) 123);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -50,7 +50,7 @@ public class OxmIcmpv6TypeSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareIcmpv6TypeHeader(false);
+        MatchEntryBuilder builder = prepareIcmpv6TypeHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -83,17 +83,18 @@ public class OxmIcmpv6TypeSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_BYTE_IN_BYTES, serializer.getValueLength());
     }
 
-
-    private static MatchEntriesBuilder prepareIcmpv6TypeMatchEntry(short value) {
-        MatchEntriesBuilder builder = prepareIcmpv6TypeHeader(false);
-        Icmpv6TypeMatchEntryBuilder icmpv6Builder = new Icmpv6TypeMatchEntryBuilder();
-        icmpv6Builder.setIcmpv6Type(value);
-        builder.addAugmentation(Icmpv6TypeMatchEntry.class, icmpv6Builder.build());
+    private static MatchEntryBuilder prepareIcmpv6TypeMatchEntry(short value) {
+        MatchEntryBuilder builder = prepareIcmpv6TypeHeader(false);
+        Icmpv6TypeCaseBuilder casebuilder = new Icmpv6TypeCaseBuilder();
+        Icmpv6TypeBuilder valueBuilder = new Icmpv6TypeBuilder();
+        valueBuilder.setIcmpv6Type(value);
+        casebuilder.setIcmpv6Type(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareIcmpv6TypeHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareIcmpv6TypeHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(Icmpv6Type.class);
         builder.setHasMask(hasMask);
index 9fdd7dda2a2aaf776a2103b577267ce8c4556660..527252b8c6631c6eafa47030a94145c6fcf5afe8 100644 (file)
@@ -17,11 +17,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Dscp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DscpMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DscpMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpDscp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpDscp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpDscpCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ip.dscp._case.IpDscpBuilder;
 
 /**
  * @author michal.polkorab
@@ -36,7 +36,7 @@ public class OxmIpDscpSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareIpDscpMatchEntry((short) 58);
+        MatchEntryBuilder builder = prepareIpDscpMatchEntry((short) 58);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -51,7 +51,7 @@ public class OxmIpDscpSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareIpDscpHeader(false);
+        MatchEntryBuilder builder = prepareIpDscpHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -84,16 +84,18 @@ public class OxmIpDscpSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_BYTE_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareIpDscpMatchEntry(short value) {
-        MatchEntriesBuilder builder = prepareIpDscpHeader(false);
-        DscpMatchEntryBuilder dscpBuilder = new DscpMatchEntryBuilder();
+    private static MatchEntryBuilder prepareIpDscpMatchEntry(short value) {
+        MatchEntryBuilder builder = prepareIpDscpHeader(false);
+        IpDscpCaseBuilder casebuilder = new IpDscpCaseBuilder();
+        IpDscpBuilder dscpBuilder = new IpDscpBuilder();
         dscpBuilder.setDscp(new Dscp(value));
-        builder.addAugmentation(DscpMatchEntry.class, dscpBuilder.build());
+        casebuilder.setIpDscp(dscpBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareIpDscpHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareIpDscpHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(IpDscp.class);
         builder.setHasMask(hasMask);
index 21e2deafa0f576ac735a724c36494a5b33de33de..6edde4deeebdb40cd8d26eccfc1a7b36d34637f3 100644 (file)
@@ -16,11 +16,11 @@ import io.netty.buffer.PooledByteBufAllocator;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ProtocolNumberMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ProtocolNumberMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpProto;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpProto;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpProtoCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ip.proto._case.IpProtoBuilder;
 
 /**
  * @author michal.polkorab
@@ -35,7 +35,7 @@ public class OxmIpProtoSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareMatchEntry((short) 123);
+        MatchEntryBuilder builder = prepareMatchEntry((short) 123);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -50,7 +50,7 @@ public class OxmIpProtoSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -83,16 +83,18 @@ public class OxmIpProtoSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_BYTE_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(short value) {
-        MatchEntriesBuilder builder = prepareHeader(false);
-        ProtocolNumberMatchEntryBuilder protoBuilder = new ProtocolNumberMatchEntryBuilder();
+    private static MatchEntryBuilder prepareMatchEntry(short value) {
+        MatchEntryBuilder builder = prepareHeader(false);
+        IpProtoCaseBuilder casebuilder = new IpProtoCaseBuilder();
+        IpProtoBuilder protoBuilder = new IpProtoBuilder();
         protoBuilder.setProtocolNumber(value);
-        builder.addAugmentation(ProtocolNumberMatchEntry.class, protoBuilder.build());
+        casebuilder.setIpProto(protoBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(IpProto.class);
         builder.setHasMask(hasMask);
index 7cb8db66b9421b0201263e28bb17b8a451864e0f..e4c184f9aea09926f08a2c5130ae8c90fe0dfbcd 100644 (file)
@@ -18,13 +18,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv4Dst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv4Dst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv4DstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv4.dst._case.Ipv4DstBuilder;
 
 /**
  * @author michal.polkorab
@@ -39,7 +37,7 @@ public class OxmIpv4DstSerializerTest {
      */
     @Test
     public void testSerializeWithoutMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(false, "10.0.0.1");
+        MatchEntryBuilder builder = prepareMatchEntry(false, "10.0.0.1");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -56,7 +54,7 @@ public class OxmIpv4DstSerializerTest {
      */
     @Test
     public void testSerializeWithMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(true, "120.121.122.0");
+        MatchEntryBuilder builder = prepareMatchEntry(true, "120.121.122.0");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -77,7 +75,7 @@ public class OxmIpv4DstSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithoutMask() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -91,7 +89,7 @@ public class OxmIpv4DstSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithMask() {
-        MatchEntriesBuilder builder = prepareHeader(true);
+        MatchEntryBuilder builder = prepareHeader(true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -124,21 +122,21 @@ public class OxmIpv4DstSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_INT_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(boolean hasMask, String value) {
-        MatchEntriesBuilder builder = prepareHeader(hasMask);
+    private static MatchEntryBuilder prepareMatchEntry(boolean hasMask, String value) {
+        MatchEntryBuilder builder = prepareHeader(hasMask);
+        Ipv4DstCaseBuilder casebuilder = new Ipv4DstCaseBuilder();
+        Ipv4DstBuilder valueBuilder = new Ipv4DstBuilder();
         if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{15, 15, 0, 0});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+            valueBuilder.setMask(new byte[]{15, 15, 0, 0});
         }
-        Ipv4AddressMatchEntryBuilder addressBuilder = new Ipv4AddressMatchEntryBuilder();
-        addressBuilder.setIpv4Address(new Ipv4Address(value));
-        builder.addAugmentation(Ipv4AddressMatchEntry.class, addressBuilder.build());
+        valueBuilder.setIpv4Address(new Ipv4Address(value));
+        casebuilder.setIpv4Dst(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(Ipv4Dst.class);
         builder.setHasMask(hasMask);
index 6ea93c2a2f9865fee9cdc9c6b1c4af9372e74727..c1c8f9eb3cdb1030d808604e0e2acd8673e3f7f3 100644 (file)
@@ -18,13 +18,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv4Src;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv4Src;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv4SrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv4.src._case.Ipv4SrcBuilder;
 
 /**
  * @author michal.polkorab
@@ -39,7 +37,7 @@ public class OxmIpv4SrcSerializerTest {
      */
     @Test
     public void testSerializeWithoutMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(false, "10.0.0.1");
+        MatchEntryBuilder builder = prepareMatchEntry(false, "10.0.0.1");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -56,7 +54,7 @@ public class OxmIpv4SrcSerializerTest {
      */
     @Test
     public void testSerializeWithMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(true, "120.121.122.0");
+        MatchEntryBuilder builder = prepareMatchEntry(true, "120.121.122.0");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -77,7 +75,7 @@ public class OxmIpv4SrcSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithoutMask() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -91,7 +89,7 @@ public class OxmIpv4SrcSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithMask() {
-        MatchEntriesBuilder builder = prepareHeader(true);
+        MatchEntryBuilder builder = prepareHeader(true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -124,21 +122,21 @@ public class OxmIpv4SrcSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_INT_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(boolean hasMask, String value) {
-        MatchEntriesBuilder builder = prepareHeader(hasMask);
+    private static MatchEntryBuilder prepareMatchEntry(boolean hasMask, String value) {
+        MatchEntryBuilder builder = prepareHeader(hasMask);
+        Ipv4SrcCaseBuilder casebuilder = new Ipv4SrcCaseBuilder();
+        Ipv4SrcBuilder valueBuilder = new Ipv4SrcBuilder();
         if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{15, 15, 0, 0});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+            valueBuilder.setMask(new byte[]{15, 15, 0, 0});
         }
-        Ipv4AddressMatchEntryBuilder addressBuilder = new Ipv4AddressMatchEntryBuilder();
-        addressBuilder.setIpv4Address(new Ipv4Address(value));
-        builder.addAugmentation(Ipv4AddressMatchEntry.class, addressBuilder.build());
+        valueBuilder.setIpv4Address(new Ipv4Address(value));
+        casebuilder.setIpv4Src(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(Ipv4Src.class);
         builder.setHasMask(hasMask);
index eb8d3644509acf14fc6dd7b89135db0b61c67fb0..b775e516b79c3d04fb26e1590a42c912a1c58e54 100644 (file)
@@ -17,14 +17,12 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PseudoFieldMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PseudoFieldMatchEntryBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.Ipv6ExthdrFlags;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Exthdr;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Exthdr;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6ExthdrCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.exthdr._case.Ipv6ExthdrBuilder;
 
 /**
  * @author michal.polkorab
@@ -38,8 +36,8 @@ public class OxmIpv6ExtHdrSerializerTest {
      * Test correct serialization
      */
     @Test
-    public void testSerializeWithMask() {
-        MatchEntriesBuilder builder = prepareIpv6ExtHdrMatchEntry(false,
+    public void testSerializeWithoutMask() {
+        MatchEntryBuilder builder = prepareIpv6ExtHdrMatchEntry(false,
                 new Ipv6ExthdrFlags(true, false, true, false, true, false, true, false, true));
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
@@ -54,8 +52,8 @@ public class OxmIpv6ExtHdrSerializerTest {
      * Test correct serialization
      */
     @Test
-    public void testSerializeWithoutMask() {
-        MatchEntriesBuilder builder = prepareIpv6ExtHdrMatchEntry(true,
+    public void testSerializeWithMask() {
+        MatchEntryBuilder builder = prepareIpv6ExtHdrMatchEntry(true,
                 new Ipv6ExthdrFlags(false, true, false, true, false, true, false, true, false));
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
@@ -74,7 +72,7 @@ public class OxmIpv6ExtHdrSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithoutMask() {
-        MatchEntriesBuilder builder = prepareIpv6ExtHdrHeader(false);
+        MatchEntryBuilder builder = prepareIpv6ExtHdrHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -88,7 +86,7 @@ public class OxmIpv6ExtHdrSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithMask() {
-        MatchEntriesBuilder builder = prepareIpv6ExtHdrHeader(true);
+        MatchEntryBuilder builder = prepareIpv6ExtHdrHeader(true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -121,22 +119,21 @@ public class OxmIpv6ExtHdrSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_SHORT_IN_BYTES, serializer.getValueLength());
     }
 
-
-    private static MatchEntriesBuilder prepareIpv6ExtHdrMatchEntry(boolean hasMask, Ipv6ExthdrFlags flags) {
-        MatchEntriesBuilder builder = prepareIpv6ExtHdrHeader(hasMask);
+    private static MatchEntryBuilder prepareIpv6ExtHdrMatchEntry(boolean hasMask, Ipv6ExthdrFlags flags) {
+        MatchEntryBuilder builder = prepareIpv6ExtHdrHeader(hasMask);
+        Ipv6ExthdrCaseBuilder casebuilder = new Ipv6ExthdrCaseBuilder();
+        Ipv6ExthdrBuilder valueBuilder = new Ipv6ExthdrBuilder();
         if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{0, 15});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+            valueBuilder.setMask(new byte[]{0, 15});
         }
-        PseudoFieldMatchEntryBuilder pseudoBuilder = new PseudoFieldMatchEntryBuilder();
-        pseudoBuilder.setPseudoField(flags);
-        builder.addAugmentation(PseudoFieldMatchEntry.class, pseudoBuilder.build());
+        valueBuilder.setPseudoField(flags);
+        casebuilder.setIpv6Exthdr(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareIpv6ExtHdrHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareIpv6ExtHdrHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(Ipv6Exthdr.class);
         builder.setHasMask(hasMask);
index 3e9dce5d952279c4dca3be0554c4186c79701dc9..d625317cc616327984eeb19f7e50c5dfab53c83d 100644 (file)
@@ -18,13 +18,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdSll;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdSll;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdSllCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.nd.sll._case.Ipv6NdSllBuilder;
 
 /**
  * @author michal.polkorab
@@ -39,7 +37,7 @@ public class OxmIpv6NdSllSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareMatchEntry(false, "00:01:02:03:04:05");
+        MatchEntryBuilder builder = prepareMatchEntry("00:01:02:03:04:05");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -56,7 +54,7 @@ public class OxmIpv6NdSllSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -89,21 +87,18 @@ public class OxmIpv6NdSllSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.MAC_ADDRESS_LENGTH, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(boolean hasMask, String value) {
-        MatchEntriesBuilder builder = prepareHeader(hasMask);
-        if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{15, 15, 0, 0, 10, 10});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
-        }
-        MacAddressMatchEntryBuilder macBuilder = new MacAddressMatchEntryBuilder();
-        macBuilder.setMacAddress(new MacAddress(value));
-        builder.addAugmentation(MacAddressMatchEntry.class, macBuilder.build());
+    private static MatchEntryBuilder prepareMatchEntry(String value) {
+        MatchEntryBuilder builder = prepareHeader(false);
+        Ipv6NdSllCaseBuilder casebuilder = new Ipv6NdSllCaseBuilder();
+        Ipv6NdSllBuilder valueBuilder = new Ipv6NdSllBuilder();
+        valueBuilder.setMacAddress(new MacAddress(value));
+        casebuilder.setIpv6NdSll(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(Ipv6NdSll.class);
         builder.setHasMask(hasMask);
index 29585d9bbdf983d47abc4fdb7ef7e56f9b66a5d5..026805895071f82031a67531e3c4f1213730fa52 100644 (file)
@@ -18,13 +18,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdTll;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdTll;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdTllCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.nd.tll._case.Ipv6NdTllBuilder;
 
 /**
  * @author michal.polkorab
@@ -39,7 +37,7 @@ public class OxmIpv6NdTllSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareMatchEntry(false, "00:01:02:03:04:05");
+        MatchEntryBuilder builder = prepareMatchEntry("00:01:02:03:04:05");
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -56,7 +54,7 @@ public class OxmIpv6NdTllSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -89,21 +87,18 @@ public class OxmIpv6NdTllSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.MAC_ADDRESS_LENGTH, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(boolean hasMask, String value) {
-        MatchEntriesBuilder builder = prepareHeader(hasMask);
-        if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{15, 15, 0, 0, 10, 10});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
-        }
-        MacAddressMatchEntryBuilder macBuilder = new MacAddressMatchEntryBuilder();
-        macBuilder.setMacAddress(new MacAddress(value));
-        builder.addAugmentation(MacAddressMatchEntry.class, macBuilder.build());
+    private static MatchEntryBuilder prepareMatchEntry(String value) {
+        MatchEntryBuilder builder = prepareHeader(false);
+        Ipv6NdTllCaseBuilder casebuilder = new Ipv6NdTllCaseBuilder();
+        Ipv6NdTllBuilder valueBuilder = new Ipv6NdTllBuilder();
+        valueBuilder.setMacAddress(new MacAddress(value));
+        casebuilder.setIpv6NdTll(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(Ipv6NdTll.class);
         builder.setHasMask(hasMask);
index b790e1335b5b4e1f085b6ba5aabd9f2a92d2f250..3540829a5195b6b6e14f9eae72e1bf08a9f2e936 100644 (file)
@@ -17,13 +17,11 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Metadata;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Metadata;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MetadataCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.metadata._case.MetadataBuilder;
 
 /**
  * @author michal.polkorab
@@ -38,7 +36,7 @@ public class OxmMetadataSerializerTest {
      */
     @Test
     public void testSerializeWithoutMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(false, new byte[]{0, 1, 2, 3, 4, 5, 6, 7});
+        MatchEntryBuilder builder = prepareMatchEntry(false, new byte[]{0, 1, 2, 3, 4, 5, 6, 7});
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -55,7 +53,7 @@ public class OxmMetadataSerializerTest {
      */
     @Test
     public void testSerializeWithMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(true, new byte[]{8, 9, 10, 11, 12, 13, 14, 15});
+        MatchEntryBuilder builder = prepareMatchEntry(true, new byte[]{8, 9, 10, 11, 12, 13, 14, 15});
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -76,7 +74,7 @@ public class OxmMetadataSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithoutMask() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -90,7 +88,7 @@ public class OxmMetadataSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithMask() {
-        MatchEntriesBuilder builder = prepareHeader(true);
+        MatchEntryBuilder builder = prepareHeader(true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -123,21 +121,21 @@ public class OxmMetadataSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_LONG_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(boolean hasMask, byte[] value) {
-        MatchEntriesBuilder builder = prepareHeader(hasMask);
+    private static MatchEntryBuilder prepareMatchEntry(boolean hasMask, byte[] value) {
+        MatchEntryBuilder builder = prepareHeader(hasMask);
+        MetadataCaseBuilder casebuilder = new MetadataCaseBuilder();
+        MetadataBuilder valueBuilder = new MetadataBuilder();
         if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{30, 30, 25, 25, 15, 15, 0, 0});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+            valueBuilder.setMask(new byte[]{30, 30, 25, 25, 15, 15, 0, 0});
         }
-        MetadataMatchEntryBuilder metadataBuilder = new MetadataMatchEntryBuilder();
-        metadataBuilder.setMetadata(value);
-        builder.addAugmentation(MetadataMatchEntry.class, metadataBuilder.build());
+        valueBuilder.setMetadata(value);
+        casebuilder.setMetadata(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(Metadata.class);
         builder.setHasMask(hasMask);
index 0bc77dbc8e29b5a870be863e08e6521e6884d7f7..da0390e496a7c04893bd5925406dae7bc116fa53 100644 (file)
@@ -16,11 +16,11 @@ import io.netty.buffer.PooledByteBufAllocator;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.BosMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.BosMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsBos;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsBos;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsBosCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.mpls.bos._case.MplsBosBuilder;
 
 /**
  * @author michal.polkorab
@@ -35,7 +35,7 @@ public class OxmMplsBosSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareMplsBosMatchEntry(true);
+        MatchEntryBuilder builder = prepareMplsBosMatchEntry(true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -50,7 +50,7 @@ public class OxmMplsBosSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareMplsBosHeader(false);
+        MatchEntryBuilder builder = prepareMplsBosHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -83,17 +83,18 @@ public class OxmMplsBosSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_BYTE_IN_BYTES, serializer.getValueLength());
     }
 
-
-    private static MatchEntriesBuilder prepareMplsBosMatchEntry(boolean bos) {
-        MatchEntriesBuilder builder = prepareMplsBosHeader(false);
-        BosMatchEntryBuilder bosBuilder = new BosMatchEntryBuilder();
-        bosBuilder.setBos(bos);
-        builder.addAugmentation(BosMatchEntry.class, bosBuilder.build());
+    private static MatchEntryBuilder prepareMplsBosMatchEntry(boolean bos) {
+        MatchEntryBuilder builder = prepareMplsBosHeader(false);
+        MplsBosCaseBuilder casebuilder = new MplsBosCaseBuilder();
+        MplsBosBuilder valueBuilder = new MplsBosBuilder();
+        valueBuilder.setBos(bos);
+        casebuilder.setMplsBos(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareMplsBosHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareMplsBosHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(MplsBos.class);
         builder.setHasMask(hasMask);
index 742001f73078c4e6ee491a16fa8be90eb830d6d6..4557be2fc50563657a1a6bd2cf413e09b92cf8bc 100644 (file)
@@ -16,11 +16,11 @@ import io.netty.buffer.PooledByteBufAllocator;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsLabelMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsLabelMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsLabel;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsLabel;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsLabelCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.mpls.label._case.MplsLabelBuilder;
 
 /**
  * @author michal.polkorab
@@ -35,7 +35,7 @@ public class OxmMplsLabelSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareMplsLabelMatchEntry(168535);
+        MatchEntryBuilder builder = prepareMplsLabelMatchEntry(168535);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -50,7 +50,7 @@ public class OxmMplsLabelSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareMplsLabelHeader(false);
+        MatchEntryBuilder builder = prepareMplsLabelHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -83,16 +83,18 @@ public class OxmMplsLabelSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_INT_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMplsLabelMatchEntry(long label) {
-        MatchEntriesBuilder builder = prepareMplsLabelHeader(false);
-        MplsLabelMatchEntryBuilder labelBuilder = new MplsLabelMatchEntryBuilder();
-        labelBuilder.setMplsLabel(label);
-        builder.addAugmentation(MplsLabelMatchEntry.class, labelBuilder.build());
+    private static MatchEntryBuilder prepareMplsLabelMatchEntry(long label) {
+        MatchEntryBuilder builder = prepareMplsLabelHeader(false);
+        MplsLabelCaseBuilder casebuilder = new MplsLabelCaseBuilder();
+        MplsLabelBuilder valueBuilder = new MplsLabelBuilder();
+        valueBuilder.setMplsLabel(label);
+        casebuilder.setMplsLabel(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareMplsLabelHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareMplsLabelHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(MplsLabel.class);
         builder.setHasMask(hasMask);
index 737eba0af46a757eb25d9d6a538ebcd7b8dcc688..273f7a06f594ce18762016890660c9b3d9092411 100644 (file)
@@ -16,11 +16,11 @@ import io.netty.buffer.PooledByteBufAllocator;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TcMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TcMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsTc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsTc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsTcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.mpls.tc._case.MplsTcBuilder;
 
 /**
  * @author michal.polkorab
@@ -35,7 +35,7 @@ public class OxmMplsTcSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareMplsTcMatchEntry((short) 16);
+        MatchEntryBuilder builder = prepareMplsTcMatchEntry((short) 16);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -50,7 +50,7 @@ public class OxmMplsTcSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareMplsTcHeader(false);
+        MatchEntryBuilder builder = prepareMplsTcHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -83,16 +83,18 @@ public class OxmMplsTcSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_BYTE_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMplsTcMatchEntry(short value) {
-        MatchEntriesBuilder builder = prepareMplsTcHeader(false);
-        TcMatchEntryBuilder tcBuilder = new TcMatchEntryBuilder();
-        tcBuilder.setTc(value);
-        builder.addAugmentation(TcMatchEntry.class, tcBuilder.build());
+    private static MatchEntryBuilder prepareMplsTcMatchEntry(short value) {
+        MatchEntryBuilder builder = prepareMplsTcHeader(false);
+        MplsTcCaseBuilder casebuilder = new MplsTcCaseBuilder();
+        MplsTcBuilder valueBuilder = new MplsTcBuilder();
+        valueBuilder.setTc(value);
+        casebuilder.setMplsTc(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareMplsTcHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareMplsTcHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(MplsTc.class);
         builder.setHasMask(hasMask);
index 02742e880d9989a4655798e72ebf4cfefe7c5622..3d8db87f6db9e7dc60da9712fb39336a5d8b722e 100644 (file)
@@ -17,13 +17,11 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IsidMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IsidMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.PbbIsid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.PbbIsid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.PbbIsidCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.pbb.isid._case.PbbIsidBuilder;
 
 /**
  * @author michal.polkorab
@@ -38,7 +36,7 @@ public class OxmPbbIsidSerializerTest {
      */
     @Test
     public void testSerializeWithMask() {
-        MatchEntriesBuilder builder = preparePbbIsidMatchEntry(false, 12345);
+        MatchEntryBuilder builder = preparePbbIsidMatchEntry(false, 12345);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -53,7 +51,7 @@ public class OxmPbbIsidSerializerTest {
      */
     @Test
     public void testSerializeWithoutMask() {
-        MatchEntriesBuilder builder = preparePbbIsidMatchEntry(true, 6789);
+        MatchEntryBuilder builder = preparePbbIsidMatchEntry(true, 6789);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -71,7 +69,7 @@ public class OxmPbbIsidSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithoutMask() {
-        MatchEntriesBuilder builder = preparePbbIsidHeader(false);
+        MatchEntryBuilder builder = preparePbbIsidHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -85,7 +83,7 @@ public class OxmPbbIsidSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithMask() {
-        MatchEntriesBuilder builder = preparePbbIsidHeader(true);
+        MatchEntryBuilder builder = preparePbbIsidHeader(true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -118,22 +116,21 @@ public class OxmPbbIsidSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_3_BYTES, serializer.getValueLength());
     }
 
-
-    private static MatchEntriesBuilder preparePbbIsidMatchEntry(boolean hasMask, long value) {
-        MatchEntriesBuilder builder = preparePbbIsidHeader(hasMask);
+    private static MatchEntryBuilder preparePbbIsidMatchEntry(boolean hasMask, long value) {
+        MatchEntryBuilder builder = preparePbbIsidHeader(hasMask);
+        PbbIsidCaseBuilder casebuilder = new PbbIsidCaseBuilder();
+        PbbIsidBuilder valueBuilder = new PbbIsidBuilder();
         if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{0, 15, 10});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+            valueBuilder.setMask(new byte[]{0, 15, 10});
         }
-        IsidMatchEntryBuilder isidBuilder = new IsidMatchEntryBuilder();
-        isidBuilder.setIsid(value);
-        builder.addAugmentation(IsidMatchEntry.class, isidBuilder.build());
+        valueBuilder.setIsid(value);
+        casebuilder.setPbbIsid(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder preparePbbIsidHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder preparePbbIsidHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(PbbIsid.class);
         builder.setHasMask(hasMask);
index 9bf4e07bc31850dbe5143bd9a484e448c4028319..dd51c9578030ac91493be98d0f45599382ae7228 100644 (file)
@@ -17,11 +17,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.SctpDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.SctpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.SctpDstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.sctp.dst._case.SctpDstBuilder;
 
 /**
  * @author michal.polkorab
@@ -36,7 +36,7 @@ public class OxmSctpDstSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareMatchEntry(4096);
+        MatchEntryBuilder builder = prepareMatchEntry(4096);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -51,7 +51,7 @@ public class OxmSctpDstSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -84,16 +84,18 @@ public class OxmSctpDstSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_SHORT_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(int value) {
-        MatchEntriesBuilder builder = prepareHeader(false);
-        PortMatchEntryBuilder portBuilder = new PortMatchEntryBuilder();
-        portBuilder.setPort(new PortNumber(value));
-        builder.addAugmentation(PortMatchEntry.class, portBuilder.build());
+    private static MatchEntryBuilder prepareMatchEntry(int value) {
+        MatchEntryBuilder builder = prepareHeader(false);
+        SctpDstCaseBuilder casebuilder = new SctpDstCaseBuilder();
+        SctpDstBuilder valueBuilder = new SctpDstBuilder();
+        valueBuilder.setPort(new PortNumber(value));
+        casebuilder.setSctpDst(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(SctpDst.class);
         builder.setHasMask(hasMask);
index 91d3099f6d740b6bed3f9b2697321585f50cdbdb..ca46f9ef44a37a895c79f9bd2ac3d4fee7747c00 100644 (file)
@@ -17,11 +17,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.SctpSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.SctpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.SctpSrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.sctp.src._case.SctpSrcBuilder;
 
 /**
  * @author michal.polkorab
@@ -36,7 +36,7 @@ public class OxmSctpSrcSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareMatchEntry(4096);
+        MatchEntryBuilder builder = prepareMatchEntry(4096);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -51,7 +51,7 @@ public class OxmSctpSrcSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -84,16 +84,18 @@ public class OxmSctpSrcSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_SHORT_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(int value) {
-        MatchEntriesBuilder builder = prepareHeader(false);
-        PortMatchEntryBuilder portBuilder = new PortMatchEntryBuilder();
-        portBuilder.setPort(new PortNumber(value));
-        builder.addAugmentation(PortMatchEntry.class, portBuilder.build());
+    private static MatchEntryBuilder prepareMatchEntry(int value) {
+        MatchEntryBuilder builder = prepareHeader(false);
+        SctpSrcCaseBuilder casebuilder = new SctpSrcCaseBuilder();
+        SctpSrcBuilder valueBuilder = new SctpSrcBuilder();
+        valueBuilder.setPort(new PortNumber(value));
+        casebuilder.setSctpSrc(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(SctpSrc.class);
         builder.setHasMask(hasMask);
index 431725ae7e1b3f127f9913333a2d37ca05f78c31..adcdf7bb7aea7e2e871c13815fa157c5d59d93b9 100644 (file)
@@ -17,11 +17,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TcpDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TcpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TcpDstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.tcp.dst._case.TcpDstBuilder;
 
 /**
  * @author michal.polkorab
@@ -36,7 +36,7 @@ public class OxmTcpDstSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareMatchEntry(4096);
+        MatchEntryBuilder builder = prepareMatchEntry(4096);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -51,7 +51,7 @@ public class OxmTcpDstSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -84,16 +84,18 @@ public class OxmTcpDstSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_SHORT_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(int value) {
-        MatchEntriesBuilder builder = prepareHeader(false);
-        PortMatchEntryBuilder portBuilder = new PortMatchEntryBuilder();
-        portBuilder.setPort(new PortNumber(value));
-        builder.addAugmentation(PortMatchEntry.class, portBuilder.build());
+    private static MatchEntryBuilder prepareMatchEntry(int value) {
+        MatchEntryBuilder builder = prepareHeader(false);
+        TcpDstCaseBuilder casebuilder = new TcpDstCaseBuilder();
+        TcpDstBuilder valueBuilder = new TcpDstBuilder();
+        valueBuilder.setPort(new PortNumber(value));
+        casebuilder.setTcpDst(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(TcpDst.class);
         builder.setHasMask(hasMask);
index 3cdd17e36ac1d63b9c9c39f8ca0956c651ee83f8..003c6e62ded14fdec9682cda25315a98c72acf57 100644 (file)
@@ -17,11 +17,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TcpSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TcpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TcpSrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.tcp.src._case.TcpSrcBuilder;
 
 /**
  * @author michal.polkorab
@@ -36,7 +36,7 @@ public class OxmTcpSrcSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareMatchEntry(512);
+        MatchEntryBuilder builder = prepareMatchEntry(512);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -51,7 +51,7 @@ public class OxmTcpSrcSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -84,16 +84,18 @@ public class OxmTcpSrcSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_SHORT_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(int value) {
-        MatchEntriesBuilder builder = prepareHeader(false);
-        PortMatchEntryBuilder portBuilder = new PortMatchEntryBuilder();
-        portBuilder.setPort(new PortNumber(value));
-        builder.addAugmentation(PortMatchEntry.class, portBuilder.build());
+    private static MatchEntryBuilder prepareMatchEntry(int value) {
+        MatchEntryBuilder builder = prepareHeader(false);
+        TcpSrcCaseBuilder casebuilder = new TcpSrcCaseBuilder();
+        TcpSrcBuilder valueBuilder = new TcpSrcBuilder();
+        valueBuilder.setPort(new PortNumber(value));
+        casebuilder.setTcpSrc(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(TcpSrc.class);
         builder.setHasMask(hasMask);
index 73cc676abf391b014f0cd6e7c53df9fcba083721..193bf057fafb516591ae2e135b640884c56e20d5 100644 (file)
@@ -17,13 +17,11 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TunnelId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TunnelId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TunnelIdCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.tunnel.id._case.TunnelIdBuilder;
 
 /**
  * @author michal.polkorab
@@ -38,7 +36,7 @@ public class OxmTunnelIdSerializerTest {
      */
     @Test
     public void testSerializeWithoutMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(false, new byte[]{0, 1, 2, 3, 4, 5, 6, 7});
+        MatchEntryBuilder builder = prepareMatchEntry(false, new byte[]{0, 1, 2, 3, 4, 5, 6, 7});
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -55,7 +53,7 @@ public class OxmTunnelIdSerializerTest {
      */
     @Test
     public void testSerializeWithMask() {
-        MatchEntriesBuilder builder = prepareMatchEntry(true, new byte[]{8, 9, 10, 11, 12, 13, 14, 15});
+        MatchEntryBuilder builder = prepareMatchEntry(true, new byte[]{8, 9, 10, 11, 12, 13, 14, 15});
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -76,7 +74,7 @@ public class OxmTunnelIdSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithoutMask() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -90,7 +88,7 @@ public class OxmTunnelIdSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithMask() {
-        MatchEntriesBuilder builder = prepareHeader(true);
+        MatchEntryBuilder builder = prepareHeader(true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -123,21 +121,21 @@ public class OxmTunnelIdSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_LONG_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(boolean hasMask, byte[] value) {
-        MatchEntriesBuilder builder = prepareHeader(hasMask);
+    private static MatchEntryBuilder prepareMatchEntry(boolean hasMask, byte[] value) {
+        MatchEntryBuilder builder = prepareHeader(hasMask);
+        TunnelIdCaseBuilder casebuilder = new TunnelIdCaseBuilder();
+        TunnelIdBuilder valueBuilder = new TunnelIdBuilder();
         if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{30, 30, 25, 25, 15, 15, 0, 0});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+            valueBuilder.setMask(new byte[]{30, 30, 25, 25, 15, 15, 0, 0});
         }
-        MetadataMatchEntryBuilder metadataBuilder = new MetadataMatchEntryBuilder();
-        metadataBuilder.setMetadata(value);
-        builder.addAugmentation(MetadataMatchEntry.class, metadataBuilder.build());
+        valueBuilder.setTunnelId(value);
+        casebuilder.setTunnelId(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(TunnelId.class);
         builder.setHasMask(hasMask);
index 35318d8fb0ee0e3ee4c2709326573c25e156061e..a77e20ec2692312501c57db32f09518066ea6e19 100644 (file)
@@ -17,11 +17,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.UdpDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.UdpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.UdpDstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.udp.dst._case.UdpDstBuilder;
 
 /**
  * @author michal.polkorab
@@ -36,7 +36,7 @@ public class OxmUdpDstSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareMatchEntry(2048);
+        MatchEntryBuilder builder = prepareMatchEntry(2048);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -51,7 +51,7 @@ public class OxmUdpDstSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -84,16 +84,18 @@ public class OxmUdpDstSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_SHORT_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(int value) {
-        MatchEntriesBuilder builder = prepareHeader(false);
-        PortMatchEntryBuilder portBuilder = new PortMatchEntryBuilder();
-        portBuilder.setPort(new PortNumber(value));
-        builder.addAugmentation(PortMatchEntry.class, portBuilder.build());
+    private static MatchEntryBuilder prepareMatchEntry(int value) {
+        MatchEntryBuilder builder = prepareHeader(false);
+        UdpDstCaseBuilder casebuilder = new UdpDstCaseBuilder();
+        UdpDstBuilder valueBuilder = new UdpDstBuilder();
+        valueBuilder.setPort(new PortNumber(value));
+        casebuilder.setUdpDst(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(UdpDst.class);
         builder.setHasMask(hasMask);
index 7cb4d0abeebc27d27f9b6af8d1997b21c07240fa..9edfccb43d95d783e27163286663a1db382df6bf 100644 (file)
@@ -17,11 +17,11 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.UdpSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.UdpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.UdpSrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.udp.src._case.UdpSrcBuilder;
 
 /**
  * @author michal.polkorab
@@ -36,7 +36,7 @@ public class OxmUdpSrcSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareMatchEntry(1024);
+        MatchEntryBuilder builder = prepareMatchEntry(1024);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -51,7 +51,7 @@ public class OxmUdpSrcSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareHeader(false);
+        MatchEntryBuilder builder = prepareHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -84,16 +84,18 @@ public class OxmUdpSrcSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_SHORT_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareMatchEntry(int value) {
-        MatchEntriesBuilder builder = prepareHeader(false);
-        PortMatchEntryBuilder portBuilder = new PortMatchEntryBuilder();
-        portBuilder.setPort(new PortNumber(value));
-        builder.addAugmentation(PortMatchEntry.class, portBuilder.build());
+    private static MatchEntryBuilder prepareMatchEntry(int value) {
+        MatchEntryBuilder builder = prepareHeader(false);
+        UdpSrcCaseBuilder casebuilder = new UdpSrcCaseBuilder();
+        UdpSrcBuilder valueBuilder = new UdpSrcBuilder();
+        valueBuilder.setPort(new PortNumber(value));
+        casebuilder.setUdpSrc(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(UdpSrc.class);
         builder.setHasMask(hasMask);
index b96e0d7694796abd4e9429f02485a7401dc5c338..ecadb71cc610b1011a894ce4c0e0e09f23ef22a8 100644 (file)
@@ -16,11 +16,11 @@ import io.netty.buffer.PooledByteBufAllocator;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanPcpMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanPcpMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.VlanPcp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.VlanPcp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanPcpCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.vlan.pcp._case.VlanPcpBuilder;
 
 /**
  * @author michal.polkorab
@@ -35,7 +35,7 @@ public class OxmVlanPcpSerializerTest {
      */
     @Test
     public void testSerialize() {
-        MatchEntriesBuilder builder = prepareVlanPcpMatchEntry((short) 42);
+        MatchEntryBuilder builder = prepareVlanPcpMatchEntry((short) 42);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -50,7 +50,7 @@ public class OxmVlanPcpSerializerTest {
      */
     @Test
     public void testSerializeHeader() {
-        MatchEntriesBuilder builder = prepareVlanPcpHeader(false);
+        MatchEntryBuilder builder = prepareVlanPcpHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -83,16 +83,18 @@ public class OxmVlanPcpSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_BYTE_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareVlanPcpMatchEntry(short value) {
-        MatchEntriesBuilder builder = prepareVlanPcpHeader(false);
-        VlanPcpMatchEntryBuilder pcpBuilder = new VlanPcpMatchEntryBuilder();
-        pcpBuilder.setVlanPcp(value);
-        builder.addAugmentation(VlanPcpMatchEntry.class, pcpBuilder.build());
+    private static MatchEntryBuilder prepareVlanPcpMatchEntry(short value) {
+        MatchEntryBuilder builder = prepareVlanPcpHeader(false);
+        VlanPcpCaseBuilder casebuilder = new VlanPcpCaseBuilder();
+        VlanPcpBuilder valueBuilder = new VlanPcpBuilder();
+        valueBuilder.setVlanPcp(value);
+        casebuilder.setVlanPcp(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareVlanPcpHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareVlanPcpHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(VlanPcp.class);
         builder.setHasMask(hasMask);
index a22e6c812fa2cc5f77eb983b3cc79a27551dca33..effaccdbd37e8fad4257e88f7a953ff032ab01d7 100644 (file)
@@ -17,13 +17,11 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.VlanVid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.VlanVid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanVidCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.vlan.vid._case.VlanVidBuilder;
 
 /**
  * @author michal.polkorab
@@ -38,7 +36,7 @@ public class OxmVlanVidSerializerTest {
      */
     @Test
     public void testSerializeWithCfiBitSet() {
-        MatchEntriesBuilder builder = prepareVlanVidMatchEntry(false, true);
+        MatchEntryBuilder builder = prepareVlanVidMatchEntry(false, true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -53,7 +51,7 @@ public class OxmVlanVidSerializerTest {
      */
     @Test
     public void testSerializeWithoutCfiBitSet() {
-        MatchEntriesBuilder builder = prepareVlanVidMatchEntry(true, false);
+        MatchEntryBuilder builder = prepareVlanVidMatchEntry(true, false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serialize(builder.build(), buffer);
@@ -71,7 +69,7 @@ public class OxmVlanVidSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithoutMask() {
-        MatchEntriesBuilder builder = prepareVlanVidHeader(false);
+        MatchEntryBuilder builder = prepareVlanVidHeader(false);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -85,7 +83,7 @@ public class OxmVlanVidSerializerTest {
      */
     @Test
     public void testSerializeHeaderWithMask() {
-        MatchEntriesBuilder builder = prepareVlanVidHeader(true);
+        MatchEntryBuilder builder = prepareVlanVidHeader(true);
 
         ByteBuf buffer = PooledByteBufAllocator.DEFAULT.buffer();
         serializer.serializeHeader(builder.build(), buffer);
@@ -118,22 +116,22 @@ public class OxmVlanVidSerializerTest {
         assertEquals("Wrong value length", EncodeConstants.SIZE_OF_SHORT_IN_BYTES, serializer.getValueLength());
     }
 
-    private static MatchEntriesBuilder prepareVlanVidMatchEntry(boolean hasMask, boolean cfiBit) {
-        MatchEntriesBuilder builder = prepareVlanVidHeader(hasMask);
+    private static MatchEntryBuilder prepareVlanVidMatchEntry(boolean hasMask, boolean cfiBit) {
+        MatchEntryBuilder builder = prepareVlanVidHeader(hasMask);
+        VlanVidCaseBuilder casebuilder = new VlanVidCaseBuilder();
+        VlanVidBuilder valueBuilder = new VlanVidBuilder();
         if (hasMask) {
-            MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-            maskBuilder.setMask(new byte[]{15, 15});
-            builder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+            valueBuilder.setMask(new byte[]{15, 15});
         }
-        VlanVidMatchEntryBuilder vlanBuilder = new VlanVidMatchEntryBuilder();
-        vlanBuilder.setVlanVid(500);
-        vlanBuilder.setCfiBit(cfiBit);
-        builder.addAugmentation(VlanVidMatchEntry.class, vlanBuilder.build());
+        valueBuilder.setVlanVid(500);
+        valueBuilder.setCfiBit(cfiBit);
+        casebuilder.setVlanVid(valueBuilder.build());
+        builder.setMatchEntryValue(casebuilder.build());
         return builder;
     }
 
-    private static MatchEntriesBuilder prepareVlanVidHeader(boolean hasMask) {
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+    private static MatchEntryBuilder prepareVlanVidHeader(boolean hasMask) {
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(VlanVid.class);
         builder.setHasMask(hasMask);
index e9f98b7c932ec23b4f775cef8f728d5f150c7351..54dd16d096e743b0516fd8445b0d26fb8758e030 100644 (file)
@@ -18,17 +18,17 @@ import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegi
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.action.AbstractActionDeserializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthertypeAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.GroupIdAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsTtlAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTtlAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmFieldsAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortNumberMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.QueueIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.EthertypeAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.GroupIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MplsTtlAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTtlAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmFieldsAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.QueueIdAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPhyPortCase;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -125,15 +125,16 @@ public class ActionsDeserializerTest {
                 + "openflow.common.action.rev130731.DecNwTtl", actions.get(12).getType().getName());
         Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight."
                 + "openflow.common.action.rev130731.SetField", actions.get(13).getType().getName());
-        List<MatchEntries> entries = actions.get(13).getAugmentation(OxmFieldsAction.class).getMatchEntries();
+        List<MatchEntry> entries = actions.get(13).getAugmentation(OxmFieldsAction.class).getMatchEntry();
         Assert.assertEquals("Wrong number of fields", 1, entries.size());
         Assert.assertEquals("Wrong match entry class", "org.opendaylight.yang.gen.v1.urn.opendaylight.openflow."
-                + "oxm.rev130731.OpenflowBasicClass", entries.get(0).getOxmClass().getName());
+                + "oxm.rev150225.OpenflowBasicClass", entries.get(0).getOxmClass().getName());
         Assert.assertEquals("Wrong match entry field", "org.opendaylight.yang.gen.v1.urn.opendaylight.openflow."
-                + "oxm.rev130731.InPhyPort", entries.get(0).getOxmMatchField().getName());
+                + "oxm.rev150225.InPhyPort", entries.get(0).getOxmMatchField().getName());
         Assert.assertEquals("Wrong match entry mask", false, entries.get(0).isHasMask());
         Assert.assertEquals("Wrong match entry value", 11,
-                entries.get(0).getAugmentation(PortNumberMatchEntry.class).getPortNumber().getValue().intValue());
+                ((InPhyPortCase) entries.get(0).getMatchEntryValue()).getInPhyPort().getPortNumber()
+                .getValue().intValue());
         Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight."
                 + "openflow.common.action.rev130731.PushPbb", actions.get(14).getType().getName());
         Assert.assertEquals("Wrong action value", 10,
index 39452dccbebd7158c5dd5ee67d9b51cfe5269ac2..77af43c505142e94d64797d6afcfa64553ae2338 100644 (file)
@@ -18,15 +18,15 @@ import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegi
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionsInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.GroupIdAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MeterIdInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsTtlAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.QueueIdAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TableIdInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionsInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.GroupIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MetadataInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MeterIdInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MplsTtlAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.QueueIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.TableIdInstruction;
 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.instruction.rev130731.instructions.grouping.Instruction;
 
index b139257f23a9258c99235e3a56df8630d253c598..4519deedb13d39df30c366ea6fc4b46e2e2fb51a 100644 (file)
@@ -25,76 +25,92 @@ import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Address;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.BosMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DscpMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EcnMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthTypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4CodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4TypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6CodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6TypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6AddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6FlabelMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IsidMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsLabelMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OpCodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortNumberMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ProtocolNumberMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PseudoFieldMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TcMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanPcpMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidMatchEntry;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.Ipv6ExthdrFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.StandardMatchType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpOp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpSha;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpSpa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpTha;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpTpa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv4Code;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv4Type;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv6Code;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv6Type;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPhyPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpDscp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpEcn;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpProto;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv4Dst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv4Src;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Dst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Exthdr;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Flabel;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdSll;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdTarget;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdTll;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Src;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Metadata;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsBos;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsLabel;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsTc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmMatchType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.PbbIsid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.SctpDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.SctpSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TcpDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TcpSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TunnelId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.UdpDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.UdpSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.VlanPcp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.VlanVid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpOp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpSha;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpSpa;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpTha;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpTpa;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv4Code;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv4Type;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv6Code;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv6Type;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPhyPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpDscp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpEcn;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpProto;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv4Dst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv4Src;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Dst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Exthdr;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Flabel;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdSll;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdTarget;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdTll;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Src;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Metadata;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsBos;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsLabel;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsTc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmMatchType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.PbbIsid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.SctpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.SctpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TcpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TcpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TunnelId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.UdpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.UdpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.VlanPcp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.VlanVid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpOpCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpShaCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpSpaCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpThaCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpTpaCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthDstCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthSrcCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthTypeCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv4CodeCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv4TypeCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv6CodeCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv6TypeCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPhyPortCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPortCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpDscpCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpEcnCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpProtoCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv4DstCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv4SrcCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6DstCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6ExthdrCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6FlabelCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdSllCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdTargetCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdTllCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6SrcCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MetadataCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsBosCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsLabelCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsTcCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.PbbIsidCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.SctpDstCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.SctpSrcCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TcpDstCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TcpSrcCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TunnelIdCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.UdpDstCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.UdpSrcCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanPcpCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanVidCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
 
 /**
  * @author michal.polkorab
@@ -127,10 +143,10 @@ public class MatchDeserializerTest {
         MatchEntryDeserializerKey key = new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID,
                 0x8000, 12);
         key.setExperimenterId(null);
-        OFDeserializer<MatchEntries> entryDeserializer = registry.getDeserializer(key);
-        MatchEntries entry = entryDeserializer.deserialize(buffer);
+        OFDeserializer<MatchEntry> entryDeserializer = registry.getDeserializer(key);
+        MatchEntry entry = entryDeserializer.deserialize(buffer);
         Assert.assertEquals("Wrong Ipv4 address format", new Ipv4Address("0.1.2.3"),
-                entry.getAugmentation(Ipv4AddressMatchEntry.class).getIpv4Address());
+                ((Ipv4DstCase) entry.getMatchEntryValue()).getIpv4Dst().getIpv4Address());
     }
 
     /**
@@ -143,10 +159,10 @@ public class MatchDeserializerTest {
         MatchEntryDeserializerKey key = new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID,
                 0x8000, 26);
         key.setExperimenterId(null);
-        OFDeserializer<MatchEntries> entryDeserializer = registry.getDeserializer(key);
-        MatchEntries entry = entryDeserializer.deserialize(buffer);
+        OFDeserializer<MatchEntry> entryDeserializer = registry.getDeserializer(key);
+        MatchEntry entry = entryDeserializer.deserialize(buffer);
         Assert.assertEquals("Wrong Ipv6 address format", new Ipv6Address("0000:0001:0002:0003:0004:0005:0006:0F07"),
-                entry.getAugmentation(Ipv6AddressMatchEntry.class).getIpv6Address());
+                ((Ipv6SrcCase) entry.getMatchEntryValue()).getIpv6Src().getIpv6Address());
     }
 
     /**
@@ -154,7 +170,7 @@ public class MatchDeserializerTest {
      */
     @Test
     public void testMatch() {
-        ByteBuf buffer = ByteBufUtils.hexStringToByteBuf("00 01 01 AC "
+        ByteBuf buffer = ByteBufUtils.hexStringToByteBuf("00 01 01 A8 "
                 + "80 00 00 04 00 00 00 01 "
                 + "80 00 02 04 00 00 00 02 "
                 + "80 00 05 10 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 04 "
@@ -185,7 +201,7 @@ public class MatchDeserializerTest {
                 +             "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 "
                 + "80 00 37 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 17 "
                 +             "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 18 "
-                + "80 00 39 08 00 00 00 02 00 00 00 03 "
+                + "80 00 38 04 00 00 00 02 "
                 + "80 00 3A 01 15 "
                 + "80 00 3C 01 17 "
                 + "80 00 3E 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 " //ipv6ndtarget
@@ -196,290 +212,289 @@ public class MatchDeserializerTest {
                 + "80 00 48 01 01 "
                 + "80 00 4B 06 00 00 02 00 00 01 "
                 + "80 00 4D 10 00 00 00 00 00 00 00 07 00 00 00 00 00 00 00 FF "
-                + "80 00 4F 04 00 00 03 04 "
-                + "00 00 00 00");
+                + "80 00 4F 04 00 00 03 04");
 
+        System.out.println(buffer.readableBytes());
         Match match = matchDeserializer.deserialize(buffer);
         Assert.assertEquals("Wrong match type", OxmMatchType.class, match.getType());
-        Assert.assertEquals("Wrong match entries size", 40, match.getMatchEntries().size());
-        List<MatchEntries> entries = match.getMatchEntries();
-        MatchEntries entry0 = entries.get(0);
+        Assert.assertEquals("Wrong match entries size", 40, match.getMatchEntry().size());
+        List<MatchEntry> entries = match.getMatchEntry();
+        MatchEntry entry0 = entries.get(0);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry0.getOxmClass());
         Assert.assertEquals("Wrong entry field", InPort.class, entry0.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry0.isHasMask());
         Assert.assertEquals("Wrong entry value", 1,
-                entry0.getAugmentation(PortNumberMatchEntry.class).getPortNumber().getValue().intValue());
-        MatchEntries entry1 = entries.get(1);
+                ((InPortCase) entry0.getMatchEntryValue()).getInPort().getPortNumber().getValue().intValue());
+        MatchEntry entry1 = entries.get(1);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry1.getOxmClass());
         Assert.assertEquals("Wrong entry field", InPhyPort.class, entry1.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry1.isHasMask());
         Assert.assertEquals("Wrong entry value", 2,
-                entry1.getAugmentation(PortNumberMatchEntry.class).getPortNumber().getValue().intValue());
-        MatchEntries entry2 = entries.get(2);
+                ((InPhyPortCase) entry1.getMatchEntryValue()).getInPhyPort().getPortNumber().getValue().intValue());
+        MatchEntry entry2 = entries.get(2);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry2.getOxmClass());
         Assert.assertEquals("Wrong entry field", Metadata.class, entry2.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry2.isHasMask());
         Assert.assertArrayEquals("Wrong entry value", ByteBufUtils.hexStringToBytes("00 00 00 00 00 00 00 03"),
-                entry2.getAugmentation(MetadataMatchEntry.class).getMetadata());
+                ((MetadataCase) entry2.getMatchEntryValue()).getMetadata().getMetadata());
         Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 00 00 00 00 04"),
-                entry2.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry3 = entries.get(3);
+                ((MetadataCase) entry2.getMatchEntryValue()).getMetadata().getMask());
+        MatchEntry entry3 = entries.get(3);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry3.getOxmClass());
         Assert.assertEquals("Wrong entry field", EthDst.class, entry3.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry3.isHasMask());
         Assert.assertEquals("Wrong entry value", new MacAddress("00:00:00:00:00:05"),
-                entry3.getAugmentation(MacAddressMatchEntry.class).getMacAddress());
+                ((EthDstCase) entry3.getMatchEntryValue()).getEthDst().getMacAddress());
         Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 00 00 06"),
-                entry3.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry4 = entries.get(4);
+                ((EthDstCase) entry3.getMatchEntryValue()).getEthDst().getMask());
+        MatchEntry entry4 = entries.get(4);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry4.getOxmClass());
         Assert.assertEquals("Wrong entry field", EthSrc.class, entry4.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry4.isHasMask());
         Assert.assertEquals("Wrong entry value", new MacAddress("00:00:00:00:00:07"),
-                entry4.getAugmentation(MacAddressMatchEntry.class).getMacAddress());
+                ((EthSrcCase) entry4.getMatchEntryValue()).getEthSrc().getMacAddress());
         Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 00 00 08"),
-                entry4.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry5 = entries.get(5);
+                ((EthSrcCase) entry4.getMatchEntryValue()).getEthSrc().getMask());
+        MatchEntry entry5 = entries.get(5);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry5.getOxmClass());
         Assert.assertEquals("Wrong entry field", EthType.class, entry5.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry5.isHasMask());
         Assert.assertEquals("Wrong entry value", 9,
-                entry5.getAugmentation(EthTypeMatchEntry.class).getEthType().getValue().intValue());
-        MatchEntries entry6 = entries.get(6);
+                ((EthTypeCase) entry5.getMatchEntryValue()).getEthType().getEthType().getValue().intValue());
+        MatchEntry entry6 = entries.get(6);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry6.getOxmClass());
         Assert.assertEquals("Wrong entry field", VlanVid.class, entry6.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry6.isHasMask());
         Assert.assertEquals("Wrong entry value", 10,
-                entry6.getAugmentation(VlanVidMatchEntry.class).getVlanVid().intValue());
+                ((VlanVidCase) entry6.getMatchEntryValue()).getVlanVid().getVlanVid().intValue());
         Assert.assertEquals("Wrong entry value", false,
-                entry6.getAugmentation(VlanVidMatchEntry.class).isCfiBit());
+                ((VlanVidCase) entry6.getMatchEntryValue()).getVlanVid().isCfiBit());
         Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 0B"),
-                entry6.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry7 = entries.get(7);
+                ((VlanVidCase) entry6.getMatchEntryValue()).getVlanVid().getMask());
+        MatchEntry entry7 = entries.get(7);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry7.getOxmClass());
         Assert.assertEquals("Wrong entry field", VlanPcp.class, entry7.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry7.isHasMask());
         Assert.assertEquals("Wrong entry value", 12,
-                entry7.getAugmentation(VlanPcpMatchEntry.class).getVlanPcp().intValue());
-        MatchEntries entry8 = entries.get(8);
+                ((VlanPcpCase) entry7.getMatchEntryValue()).getVlanPcp().getVlanPcp().intValue());
+        MatchEntry entry8 = entries.get(8);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry8.getOxmClass());
         Assert.assertEquals("Wrong entry field", IpDscp.class, entry8.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry8.isHasMask());
         Assert.assertEquals("Wrong entry value", 13,
-                entry8.getAugmentation(DscpMatchEntry.class).getDscp().getValue().intValue());
-        MatchEntries entry9 = entries.get(9);
+                ((IpDscpCase) entry8.getMatchEntryValue()).getIpDscp().getDscp().getValue().intValue());
+        MatchEntry entry9 = entries.get(9);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry9.getOxmClass());
         Assert.assertEquals("Wrong entry field", IpEcn.class, entry9.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry9.isHasMask());
         Assert.assertEquals("Wrong entry value", 14,
-                entry9.getAugmentation(EcnMatchEntry.class).getEcn().intValue());
-        MatchEntries entry10 = entries.get(10);
+                ((IpEcnCase) entry9.getMatchEntryValue()).getIpEcn().getEcn().intValue());
+        MatchEntry entry10 = entries.get(10);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry10.getOxmClass());
         Assert.assertEquals("Wrong entry field", IpProto.class, entry10.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry10.isHasMask());
         Assert.assertEquals("Wrong entry value", 15,
-                entry10.getAugmentation(ProtocolNumberMatchEntry.class).getProtocolNumber().intValue());
-        MatchEntries entry11 = entries.get(11);
+                ((IpProtoCase) entry10.getMatchEntryValue()).getIpProto().getProtocolNumber().intValue());
+        MatchEntry entry11 = entries.get(11);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry11.getOxmClass());
         Assert.assertEquals("Wrong entry field", Ipv4Src.class, entry11.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry11.isHasMask());
         Assert.assertEquals("Wrong entry value", new Ipv4Address("10.0.0.1"),
-                entry11.getAugmentation(Ipv4AddressMatchEntry.class).getIpv4Address());
+                ((Ipv4SrcCase) entry11.getMatchEntryValue()).getIpv4Src().getIpv4Address());
         Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 FF 00"),
-                entry11.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry12 = entries.get(12);
+                ((Ipv4SrcCase) entry11.getMatchEntryValue()).getIpv4Src().getMask());
+        MatchEntry entry12 = entries.get(12);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry12.getOxmClass());
         Assert.assertEquals("Wrong entry field", Ipv4Dst.class, entry12.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry12.isHasMask());
         Assert.assertEquals("Wrong entry value", new Ipv4Address("10.0.0.2"),
-                entry12.getAugmentation(Ipv4AddressMatchEntry.class).getIpv4Address());
+                ((Ipv4DstCase) entry12.getMatchEntryValue()).getIpv4Dst().getIpv4Address());
         Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 FF"),
-                entry12.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry13 = entries.get(13);
+                ((Ipv4DstCase) entry12.getMatchEntryValue()).getIpv4Dst().getMask());
+        MatchEntry entry13 = entries.get(13);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry13.getOxmClass());
         Assert.assertEquals("Wrong entry field", TcpSrc.class, entry13.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry13.isHasMask());
         Assert.assertEquals("Wrong entry value", 3,
-                entry13.getAugmentation(PortMatchEntry.class).getPort().getValue().intValue());
-        MatchEntries entry14 = entries.get(14);
+                ((TcpSrcCase) entry13.getMatchEntryValue()).getTcpSrc().getPort().getValue().intValue());
+        MatchEntry entry14 = entries.get(14);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry14.getOxmClass());
         Assert.assertEquals("Wrong entry field", TcpDst.class, entry14.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry14.isHasMask());
         Assert.assertEquals("Wrong entry value", 4,
-                entry14.getAugmentation(PortMatchEntry.class).getPort().getValue().intValue());
-        MatchEntries entry15 = entries.get(15);
+                ((TcpDstCase) entry14.getMatchEntryValue()).getTcpDst().getPort().getValue().intValue());
+        MatchEntry entry15 = entries.get(15);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry15.getOxmClass());
         Assert.assertEquals("Wrong entry field", UdpSrc.class, entry15.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry15.isHasMask());
         Assert.assertEquals("Wrong entry value", 5,
-                entry15.getAugmentation(PortMatchEntry.class).getPort().getValue().intValue());
-        MatchEntries entry16 = entries.get(16);
+                ((UdpSrcCase) entry15.getMatchEntryValue()).getUdpSrc().getPort().getValue().intValue());
+        MatchEntry entry16 = entries.get(16);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry16.getOxmClass());
         Assert.assertEquals("Wrong entry field", UdpDst.class, entry16.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry16.isHasMask());
         Assert.assertEquals("Wrong entry value", 6,
-                entry16.getAugmentation(PortMatchEntry.class).getPort().getValue().intValue());
-        MatchEntries entry17 = entries.get(17);
+                ((UdpDstCase) entry16.getMatchEntryValue()).getUdpDst().getPort().getValue().intValue());
+        MatchEntry entry17 = entries.get(17);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry17.getOxmClass());
         Assert.assertEquals("Wrong entry field", SctpSrc.class, entry17.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry17.isHasMask());
         Assert.assertEquals("Wrong entry value", 7,
-                entry17.getAugmentation(PortMatchEntry.class).getPort().getValue().intValue());
-        MatchEntries entry18 = entries.get(18);
+                ((SctpSrcCase) entry17.getMatchEntryValue()).getSctpSrc().getPort().getValue().intValue());
+        MatchEntry entry18 = entries.get(18);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry18.getOxmClass());
         Assert.assertEquals("Wrong entry field", SctpDst.class, entry18.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry18.isHasMask());
         Assert.assertEquals("Wrong entry value", 8,
-                entry18.getAugmentation(PortMatchEntry.class).getPort().getValue().intValue());
-        MatchEntries entry19 = entries.get(19);
+                ((SctpDstCase) entry18.getMatchEntryValue()).getSctpDst().getPort().getValue().intValue());
+        MatchEntry entry19 = entries.get(19);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry19.getOxmClass());
         Assert.assertEquals("Wrong entry field", Icmpv4Type.class, entry19.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry19.isHasMask());
         Assert.assertEquals("Wrong entry value", 5,
-                entry19.getAugmentation(Icmpv4TypeMatchEntry.class).getIcmpv4Type().intValue());
-        MatchEntries entry20 = entries.get(20);
+                ((Icmpv4TypeCase) entry19.getMatchEntryValue()).getIcmpv4Type().getIcmpv4Type().intValue());
+        MatchEntry entry20 = entries.get(20);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry20.getOxmClass());
         Assert.assertEquals("Wrong entry field", Icmpv4Code.class, entry20.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry20.isHasMask());
         Assert.assertEquals("Wrong entry value", 7,
-                entry20.getAugmentation(Icmpv4CodeMatchEntry.class).getIcmpv4Code().intValue());
-        MatchEntries entry21 = entries.get(21);
+                ((Icmpv4CodeCase) entry20.getMatchEntryValue()).getIcmpv4Code().getIcmpv4Code().intValue());
+        MatchEntry entry21 = entries.get(21);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry21.getOxmClass());
         Assert.assertEquals("Wrong entry field", ArpOp.class, entry21.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry21.isHasMask());
         Assert.assertEquals("Wrong entry value", 16,
-                entry21.getAugmentation(OpCodeMatchEntry.class).getOpCode().intValue());
-        MatchEntries entry22 = entries.get(22);
+                ((ArpOpCase) entry21.getMatchEntryValue()).getArpOp().getOpCode().intValue());
+        MatchEntry entry22 = entries.get(22);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry22.getOxmClass());
         Assert.assertEquals("Wrong entry field", ArpSpa.class, entry22.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry22.isHasMask());
         Assert.assertEquals("Wrong entry value", new Ipv4Address("10.0.0.9"),
-                entry22.getAugmentation(Ipv4AddressMatchEntry.class).getIpv4Address());
+                ((ArpSpaCase) entry22.getMatchEntryValue()).getArpSpa().getIpv4Address());
         Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 FF 00"),
-                entry22.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry23 = entries.get(23);
+                ((ArpSpaCase) entry22.getMatchEntryValue()).getArpSpa().getMask());
+        MatchEntry entry23 = entries.get(23);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry23.getOxmClass());
         Assert.assertEquals("Wrong entry field", ArpTpa.class, entry23.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry23.isHasMask());
         Assert.assertEquals("Wrong entry value", new Ipv4Address("10.0.0.10"),
-                entry23.getAugmentation(Ipv4AddressMatchEntry.class).getIpv4Address());
+                ((ArpTpaCase) entry23.getMatchEntryValue()).getArpTpa().getIpv4Address());
         Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 FF"),
-                entry23.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry24 = entries.get(24);
+                ((ArpTpaCase) entry23.getMatchEntryValue()).getArpTpa().getMask());
+        MatchEntry entry24 = entries.get(24);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry24.getOxmClass());
         Assert.assertEquals("Wrong entry field", ArpSha.class, entry24.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry24.isHasMask());
         Assert.assertEquals("Wrong entry value", new MacAddress("00:00:00:00:00:01"),
-                entry24.getAugmentation(MacAddressMatchEntry.class).getMacAddress());
+                ((ArpShaCase) entry24.getMatchEntryValue()).getArpSha().getMacAddress());
         Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 00 00 03"),
-                entry24.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry25 = entries.get(25);
+                ((ArpShaCase) entry24.getMatchEntryValue()).getArpSha().getMask());
+        MatchEntry entry25 = entries.get(25);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry25.getOxmClass());
         Assert.assertEquals("Wrong entry field", ArpTha.class, entry25.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry25.isHasMask());
         Assert.assertEquals("Wrong entry value", new MacAddress("00:00:00:00:00:02"),
-                entry25.getAugmentation(MacAddressMatchEntry.class).getMacAddress());
+                ((ArpThaCase) entry25.getMatchEntryValue()).getArpTha().getMacAddress());
         Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 00 00 04"),
-                entry25.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry26 = entries.get(26);
+                ((ArpThaCase) entry25.getMatchEntryValue()).getArpTha().getMask());
+        MatchEntry entry26 = entries.get(26);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry26.getOxmClass());
         Assert.assertEquals("Wrong entry field", Ipv6Src.class, entry26.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry26.isHasMask());
         Assert.assertEquals("Wrong entry value", new Ipv6Address("0000:0000:0000:0000:0000:0000:0000:0015"),
-                entry26.getAugmentation(Ipv6AddressMatchEntry.class).getIpv6Address());
+                ((Ipv6SrcCase) entry26.getMatchEntryValue()).getIpv6Src().getIpv6Address());
         Assert.assertArrayEquals("Wrong entry mask",
                 ByteBufUtils.hexStringToBytes("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16"),
-                entry26.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry27 = entries.get(27);
+                ((Ipv6SrcCase) entry26.getMatchEntryValue()).getIpv6Src().getMask());
+        MatchEntry entry27 = entries.get(27);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry27.getOxmClass());
         Assert.assertEquals("Wrong entry field", Ipv6Dst.class, entry27.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry27.isHasMask());
         Assert.assertEquals("Wrong entry value", new Ipv6Address("0000:0000:0000:0000:0000:0000:0000:0017"),
-                entry27.getAugmentation(Ipv6AddressMatchEntry.class).getIpv6Address());
+                ((Ipv6DstCase) entry27.getMatchEntryValue()).getIpv6Dst().getIpv6Address());
         Assert.assertArrayEquals("Wrong entry mask",
                 ByteBufUtils.hexStringToBytes("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 18"),
-                entry27.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry28 = entries.get(28);
+                ((Ipv6DstCase) entry27.getMatchEntryValue()).getIpv6Dst().getMask());
+        MatchEntry entry28 = entries.get(28);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry28.getOxmClass());
         Assert.assertEquals("Wrong entry field", Ipv6Flabel.class, entry28.getOxmMatchField());
-        Assert.assertEquals("Wrong entry hasMask", true, entry28.isHasMask());
+        Assert.assertEquals("Wrong entry hasMask", false, entry28.isHasMask());
         Assert.assertEquals("Wrong entry value", 2,
-                entry28.getAugmentation(Ipv6FlabelMatchEntry.class).getIpv6Flabel().getValue().intValue());
-        Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 03"),
-                entry28.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry29 = entries.get(29);
+                ((Ipv6FlabelCase) entry28.getMatchEntryValue()).getIpv6Flabel().getIpv6Flabel()
+                .getValue().intValue());
+        MatchEntry entry29 = entries.get(29);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry29.getOxmClass());
         Assert.assertEquals("Wrong entry field", Icmpv6Type.class, entry29.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry29.isHasMask());
         Assert.assertEquals("Wrong entry value", 21,
-                entry29.getAugmentation(Icmpv6TypeMatchEntry.class).getIcmpv6Type().intValue());
-        MatchEntries entry30 = entries.get(30);
+                ((Icmpv6TypeCase) entry29.getMatchEntryValue()).getIcmpv6Type().getIcmpv6Type().intValue());
+        MatchEntry entry30 = entries.get(30);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry30.getOxmClass());
         Assert.assertEquals("Wrong entry field", Icmpv6Code.class, entry30.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry30.isHasMask());
         Assert.assertEquals("Wrong entry value", 23,
-                entry30.getAugmentation(Icmpv6CodeMatchEntry.class).getIcmpv6Code().intValue());
-        MatchEntries entry31 = entries.get(31);
+                ((Icmpv6CodeCase) entry30.getMatchEntryValue()).getIcmpv6Code().getIcmpv6Code().intValue());
+        MatchEntry entry31 = entries.get(31);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry31.getOxmClass());
         Assert.assertEquals("Wrong entry field", Ipv6NdTarget.class, entry31.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry31.isHasMask());
         Assert.assertEquals("Wrong entry value", new Ipv6Address("0000:0000:0000:0000:0000:0000:0000:0020"),
-                entry31.getAugmentation(Ipv6AddressMatchEntry.class).getIpv6Address());
-        MatchEntries entry32 = entries.get(32);
+                ((Ipv6NdTargetCase) entry31.getMatchEntryValue()).getIpv6NdTarget().getIpv6Address());
+        MatchEntry entry32 = entries.get(32);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry32.getOxmClass());
         Assert.assertEquals("Wrong entry field", Ipv6NdSll.class, entry32.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry32.isHasMask());
         Assert.assertEquals("Wrong entry value", new MacAddress("00:05:00:00:00:01"),
-                entry32.getAugmentation(MacAddressMatchEntry.class).getMacAddress());
-        MatchEntries entry33 = entries.get(33);
+                ((Ipv6NdSllCase) entry32.getMatchEntryValue()).getIpv6NdSll().getMacAddress());
+        MatchEntry entry33 = entries.get(33);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry33.getOxmClass());
         Assert.assertEquals("Wrong entry field", Ipv6NdTll.class, entry33.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry33.isHasMask());
         Assert.assertEquals("Wrong entry value", new MacAddress("00:05:00:00:00:02"),
-                entry33.getAugmentation(MacAddressMatchEntry.class).getMacAddress());
-        MatchEntries entry34 = entries.get(34);
+                ((Ipv6NdTllCase) entry33.getMatchEntryValue()).getIpv6NdTll().getMacAddress());
+        MatchEntry entry34 = entries.get(34);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry34.getOxmClass());
         Assert.assertEquals("Wrong entry field", MplsLabel.class, entry34.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry34.isHasMask());
         Assert.assertEquals("Wrong entry value", 515,
-                entry34.getAugmentation(MplsLabelMatchEntry.class).getMplsLabel().intValue());
-        MatchEntries entry35 = entries.get(35);
+                ((MplsLabelCase) entry34.getMatchEntryValue()).getMplsLabel().getMplsLabel().intValue());
+        MatchEntry entry35 = entries.get(35);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry35.getOxmClass());
         Assert.assertEquals("Wrong entry field", MplsTc.class, entry35.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry35.isHasMask());
         Assert.assertEquals("Wrong entry value", 3,
-                entry35.getAugmentation(TcMatchEntry.class).getTc().intValue());
-        MatchEntries entry36 = entries.get(36);
+                ((MplsTcCase) entry35.getMatchEntryValue()).getMplsTc().getTc().intValue());
+        MatchEntry entry36 = entries.get(36);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry36.getOxmClass());
         Assert.assertEquals("Wrong entry field", MplsBos.class, entry36.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry36.isHasMask());
         Assert.assertEquals("Wrong entry value", true,
-                entry36.getAugmentation(BosMatchEntry.class).isBos());
-        MatchEntries entry37 = entries.get(37);
+                ((MplsBosCase) entry36.getMatchEntryValue()).getMplsBos().isBos());
+        MatchEntry entry37 = entries.get(37);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry37.getOxmClass());
         Assert.assertEquals("Wrong entry field", PbbIsid.class, entry37.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry37.isHasMask());
         Assert.assertEquals("Wrong entry value", 2,
-                entry37.getAugmentation(IsidMatchEntry.class).getIsid().intValue());
+                ((PbbIsidCase) entry37.getMatchEntryValue()).getPbbIsid().getIsid().intValue());
         Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 01"),
-                entry37.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry38 = entries.get(38);
+                ((PbbIsidCase) entry37.getMatchEntryValue()).getPbbIsid().getMask());
+        MatchEntry entry38 = entries.get(38);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry38.getOxmClass());
         Assert.assertEquals("Wrong entry field", TunnelId.class, entry38.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry38.isHasMask());
         Assert.assertArrayEquals("Wrong entry value", ByteBufUtils.hexStringToBytes("00 00 00 00 00 00 00 07"),
-                entry38.getAugmentation(MetadataMatchEntry.class).getMetadata());
+                ((TunnelIdCase) entry38.getMatchEntryValue()).getTunnelId().getTunnelId());
         Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 00 00 00 00 FF"),
-                entry38.getAugmentation(MaskMatchEntry.class).getMask());
-        MatchEntries entry39 = entries.get(39);
+                ((TunnelIdCase) entry38.getMatchEntryValue()).getTunnelId().getMask());
+        MatchEntry entry39 = entries.get(39);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry39.getOxmClass());
         Assert.assertEquals("Wrong entry field", Ipv6Exthdr.class, entry39.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", true, entry39.isHasMask());
         Assert.assertEquals("Wrong entry value",
                 new Ipv6ExthdrFlags(false, false, false, false, false, false, false, false, false),
-                entry39.getAugmentation(PseudoFieldMatchEntry.class).getPseudoField());
+                ((Ipv6ExthdrCase) entry39.getMatchEntryValue()).getIpv6Exthdr().getPseudoField());
         Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("03 04"),
-                entry39.getAugmentation(MaskMatchEntry.class).getMask());
+                ((Ipv6ExthdrCase) entry39.getMatchEntryValue()).getIpv6Exthdr().getMask());
         Assert.assertTrue("Unread data", buffer.readableBytes() == 0);
     }
 
@@ -493,12 +508,12 @@ public class MatchDeserializerTest {
         MatchEntryDeserializerKey key = new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID,
                 0x8000, 12);
         key.setExperimenterId(null);
-        HeaderDeserializer<MatchEntries> entryDeserializer = registry.getDeserializer(key);
-        MatchEntries entry = entryDeserializer.deserializeHeader(buffer);
+        HeaderDeserializer<MatchEntry> entryDeserializer = registry.getDeserializer(key);
+        MatchEntry entry = entryDeserializer.deserializeHeader(buffer);
         Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
         Assert.assertEquals("Wrong entry field", Ipv4Dst.class, entry.getOxmMatchField());
         Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
-        Assert.assertEquals("Wrong Ipv4 address", null, entry.getAugmentation(Ipv4AddressMatchEntry.class));
+        Assert.assertNull("Wrong Ipv4 address", entry.getMatchEntryValue());
     }
 
     /**
@@ -511,6 +526,6 @@ public class MatchDeserializerTest {
         Match match = matchDeserializer.deserialize(buffer);
 
         Assert.assertEquals("Wrong match type", StandardMatchType.class, match.getType());
-        Assert.assertEquals("Wrong match entries size", 1, match.getMatchEntries().size());
+        Assert.assertEquals("Wrong match entries size", 1, match.getMatchEntry().size());
     }
 }
\ No newline at end of file
index 2dd21e82b12b05220eb692515c9ca3653e27f5ef..b0fc21151fb32c3db156c9bcd3472e184eacc31a 100644 (file)
@@ -19,14 +19,14 @@ import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DlAddressAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IpAddressAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTosAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.QueueIdAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanPcpAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.DlAddressAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.IpAddressAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTosAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.QueueIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.VlanPcpAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.VlanVidAction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
 
 /**
index ad9f0c1496b7ba53a56b27de1f341352f89f37b3..16e9a8fafa8ba589d5ce968b4b8fb50bd533236c 100644 (file)
@@ -22,22 +22,22 @@ import org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegis
 import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DlAddressAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DlAddressActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IpAddressAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IpAddressActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTosAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTosActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.QueueIdAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.QueueIdActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanPcpAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanPcpActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.DlAddressAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.DlAddressActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.IpAddressAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.IpAddressActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTosAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTosActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.QueueIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.QueueIdActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.VlanPcpAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.VlanPcpActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.VlanVidAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.VlanVidActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Enqueue;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Output;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.SetDlDst;
index 35f7032528bd7686b97c111e63db92e734070fe4..83242ce4c4a6c45da568a3d0089870cbd55686b1 100644 (file)
@@ -21,7 +21,7 @@ import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerR
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowWildcardsV10;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10;
 
 /**
  * @author michal.polkorab
index b1b6d1036fdb97345c3682828720f5b34d9fa497..db16f9c58b87a44d6768a808394515f209d8d1f5 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowjava.protocol.impl.util;
 
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.UnpooledByteBufAllocator;
+
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -22,8 +23,8 @@ import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowWildcardsV10;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10Builder;
 
 /**
  * @author michal.polkorab
index ed47b0141be9fd18a4450276d97966a0330f2d3f..7e614b676dd3e92ab4392751f70d6377390544bb 100644 (file)
@@ -19,24 +19,22 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthertypeAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthertypeActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.GroupIdAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.GroupIdActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsTtlAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsTtlActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTtlAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTtlActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmFieldsAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmFieldsActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortNumberMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortNumberMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.QueueIdAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.QueueIdActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.EthertypeAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.EthertypeActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.GroupIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.GroupIdActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MplsTtlAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MplsTtlActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTtlAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTtlActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmFieldsAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmFieldsActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.QueueIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.QueueIdActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.CopyTtlIn;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.CopyTtlOut;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.DecMplsTtl;
@@ -57,10 +55,12 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.ActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.EtherType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPortCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.in.port._case.InPortBuilder;
 
 /**
  * @author michal.polkorab
@@ -154,16 +154,18 @@ public class OF13ActionsSerializerTest {
         actionBuilder = new ActionBuilder();
         actionBuilder.setType(SetField.class);
         OxmFieldsActionBuilder matchEntries = new OxmFieldsActionBuilder();
-        List<MatchEntries> entries = new ArrayList<>();
-        MatchEntriesBuilder matchBuilder = new MatchEntriesBuilder();
+        List<MatchEntry> entries = new ArrayList<>();
+        MatchEntryBuilder matchBuilder = new MatchEntryBuilder();
         matchBuilder.setOxmClass(OpenflowBasicClass.class);
         matchBuilder.setOxmMatchField(InPort.class);
         matchBuilder.setHasMask(false);
-        PortNumberMatchEntryBuilder portBuilder = new PortNumberMatchEntryBuilder();
-        portBuilder.setPortNumber(new PortNumber(1L));
-        matchBuilder.addAugmentation(PortNumberMatchEntry.class, portBuilder.build());
+        InPortCaseBuilder inPortCaseBuilder = new InPortCaseBuilder();
+        InPortBuilder inPortBuilder = new InPortBuilder();
+        inPortBuilder.setPortNumber(new PortNumber(1L));
+        inPortCaseBuilder.setInPort(inPortBuilder.build());
+        matchBuilder.setMatchEntryValue(inPortCaseBuilder.build());
         entries.add(matchBuilder.build());
-        matchEntries.setMatchEntries(entries);
+        matchEntries.setMatchEntry(entries);
         actionBuilder.addAugmentation(OxmFieldsAction.class, matchEntries.build());
         actions.add(actionBuilder.build());
         actionBuilder = new ActionBuilder();
@@ -261,16 +263,18 @@ public class OF13ActionsSerializerTest {
         actionBuilder = new ActionBuilder();
         actionBuilder.setType(SetField.class);
         OxmFieldsActionBuilder matchEntries = new OxmFieldsActionBuilder();
-        List<MatchEntries> entries = new ArrayList<>();
-        MatchEntriesBuilder matchBuilder = new MatchEntriesBuilder();
+        List<MatchEntry> entries = new ArrayList<>();
+        MatchEntryBuilder matchBuilder = new MatchEntryBuilder();
         matchBuilder.setOxmClass(OpenflowBasicClass.class);
         matchBuilder.setOxmMatchField(InPort.class);
         matchBuilder.setHasMask(false);
-        PortNumberMatchEntryBuilder portBuilder = new PortNumberMatchEntryBuilder();
-        portBuilder.setPortNumber(new PortNumber(1L));
-        matchBuilder.addAugmentation(PortNumberMatchEntry.class, portBuilder.build());
+        InPortCaseBuilder inPortCaseBuilder = new InPortCaseBuilder();
+        InPortBuilder inPortBuilder = new InPortBuilder();
+        inPortBuilder.setPortNumber(new PortNumber(1L));
+        inPortCaseBuilder.setInPort(inPortBuilder.build());
+        matchBuilder.setMatchEntryValue(inPortCaseBuilder.build());
         entries.add(matchBuilder.build());
-        matchEntries.setMatchEntries(entries);
+        matchEntries.setMatchEntry(entries);
         actionBuilder.addAugmentation(OxmFieldsAction.class, matchEntries.build());
         actions.add(actionBuilder.build());
 
index 6e972f829116481a22ae183394d76e4abf26e751..b48c265fde765d160cf6ed58268ca8af73714b6d 100644 (file)
@@ -20,22 +20,22 @@ import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegist
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionsInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionsInstructionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthertypeAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthertypeActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataInstructionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MeterIdInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MeterIdInstructionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTtlAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTtlActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TableIdInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TableIdInstructionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionsInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionsInstructionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.EthertypeAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.EthertypeActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MaxLengthActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MetadataInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MetadataInstructionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MeterIdInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.MeterIdInstructionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTtlAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTtlActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.PortActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.TableIdInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.TableIdInstructionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Output;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.PopPbb;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.PushVlan;
index de60195a0433e05166ef31822dcf742cf8ae9157..a7bad7ae5ffde4367cf4c3b6eab835b33f998985 100644 (file)
@@ -26,103 +26,135 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Address;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6FlowLabel;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.BosMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.BosMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DscpMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DscpMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EcnMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EcnMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthTypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthTypeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4CodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4CodeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4TypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv4TypeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6CodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6CodeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6TypeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Icmpv6TypeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6AddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6AddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6FlabelMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6FlabelMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IsidMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IsidMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MacAddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MetadataMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsLabelMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsLabelMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OpCodeMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OpCodeMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortNumberMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortNumberMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ProtocolNumberMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ProtocolNumberMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PseudoFieldMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PseudoFieldMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TcMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.TcMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanPcpMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanPcpMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.VlanVidMatchEntryBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.EtherType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.Ipv6ExthdrFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpOp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpSha;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpSpa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpTha;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ArpTpa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.EthType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv4Code;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv4Type;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv6Code;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Icmpv6Type;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPhyPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpDscp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpEcn;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.IpProto;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv4Dst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv4Src;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Dst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Exthdr;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Flabel;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdSll;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdTarget;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdTll;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Src;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Metadata;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsBos;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsLabel;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MplsTc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmMatchType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.PbbIsid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.SctpDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.SctpSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TcpDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TcpSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.TunnelId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.UdpDst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.UdpSrc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.VlanPcp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.VlanVid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.MatchBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpOp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpSha;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpSpa;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpTha;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ArpTpa;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv4Code;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv4Type;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv6Code;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Icmpv6Type;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPhyPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpDscp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpEcn;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpProto;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv4Dst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv4Src;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Dst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Exthdr;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Flabel;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdSll;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdTarget;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdTll;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Src;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Metadata;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsBos;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsLabel;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MplsTc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmMatchType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.PbbIsid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.SctpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.SctpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TcpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TcpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TunnelId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.UdpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.UdpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.VlanPcp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.VlanVid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpOpCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpShaCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpSpaCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpThaCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpTpaCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthDstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthSrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthTypeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv4CodeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv4TypeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv6CodeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv6TypeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPhyPortCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPortCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpDscpCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpEcnCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpProtoCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv4DstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv4SrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6DstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6ExthdrCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6FlabelCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdSllCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdTargetCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdTllCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6SrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MetadataCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsBosCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsLabelCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsTcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.PbbIsidCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.SctpDstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.SctpSrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TcpDstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TcpSrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TunnelIdCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.UdpDstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.UdpSrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanPcpCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanVidCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.op._case.ArpOpBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.sha._case.ArpShaBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.spa._case.ArpSpaBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.tha._case.ArpThaBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.tpa._case.ArpTpaBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.eth.dst._case.EthDstBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.eth.src._case.EthSrcBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.eth.type._case.EthTypeBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv4.code._case.Icmpv4CodeBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv4.type._case.Icmpv4TypeBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv6.code._case.Icmpv6CodeBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv6.type._case.Icmpv6TypeBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.in.phy.port._case.InPhyPortBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.in.port._case.InPortBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ip.dscp._case.IpDscpBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ip.ecn._case.IpEcnBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ip.proto._case.IpProtoBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv4.dst._case.Ipv4DstBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv4.src._case.Ipv4SrcBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.dst._case.Ipv6DstBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.exthdr._case.Ipv6ExthdrBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.flabel._case.Ipv6FlabelBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.nd.sll._case.Ipv6NdSllBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.nd.target._case.Ipv6NdTargetBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.nd.tll._case.Ipv6NdTllBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.src._case.Ipv6SrcBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.metadata._case.MetadataBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.mpls.bos._case.MplsBosBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.mpls.label._case.MplsLabelBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.mpls.tc._case.MplsTcBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.pbb.isid._case.PbbIsidBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.sctp.dst._case.SctpDstBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.sctp.src._case.SctpSrcBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.tcp.dst._case.TcpDstBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.tcp.src._case.TcpSrcBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.tunnel.id._case.TunnelIdBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.udp.dst._case.UdpDstBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.udp.src._case.UdpSrcBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.vlan.pcp._case.VlanPcpBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.vlan.vid._case.VlanVidBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.MatchBuilder;
 
 /**
  * @author michal.polkorab
@@ -168,395 +200,439 @@ public class OF13MatchSerializer02Test {
     public void test() {
         MatchBuilder builder = new MatchBuilder();
         builder.setType(OxmMatchType.class);
-        List<MatchEntries> entries = new ArrayList<>();
-        MatchEntriesBuilder entryBuilder = new MatchEntriesBuilder();
+        List<MatchEntry> entries = new ArrayList<>();
+        MatchEntryBuilder entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(InPort.class);
         entryBuilder.setHasMask(false);
-        PortNumberMatchEntryBuilder portNumberBuilder = new PortNumberMatchEntryBuilder();
-        portNumberBuilder.setPortNumber(new PortNumber(42L));
-        entryBuilder.addAugmentation(PortNumberMatchEntry.class, portNumberBuilder.build());
+        InPortCaseBuilder inPortCaseBuilder = new InPortCaseBuilder();
+        InPortBuilder inPortBuilder = new InPortBuilder();
+        inPortBuilder.setPortNumber(new PortNumber(42L));
+        inPortCaseBuilder.setInPort(inPortBuilder.build());
+        entryBuilder.setMatchEntryValue(inPortCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(InPhyPort.class);
         entryBuilder.setHasMask(false);
-        portNumberBuilder = new PortNumberMatchEntryBuilder();
-        portNumberBuilder.setPortNumber(new PortNumber(43L));
-        entryBuilder.addAugmentation(PortNumberMatchEntry.class, portNumberBuilder.build());
+        InPhyPortCaseBuilder inPhyPortCaseBuilder = new InPhyPortCaseBuilder();
+        InPhyPortBuilder inPhyPortBuilder = new InPhyPortBuilder();
+        inPhyPortBuilder.setPortNumber(new PortNumber(43L));
+        inPhyPortCaseBuilder.setInPhyPort(inPhyPortBuilder.build());
+        entryBuilder.setMatchEntryValue(inPhyPortCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(Metadata.class);
         entryBuilder.setHasMask(true);
-        MetadataMatchEntryBuilder metadataBuilder = new MetadataMatchEntryBuilder();
+        MetadataCaseBuilder metaCaseBuilder = new MetadataCaseBuilder();
+        MetadataBuilder metadataBuilder = new MetadataBuilder();
         metadataBuilder.setMetadata(new byte[]{0,0,0,0,0,0,0,1});
-        entryBuilder.addAugmentation(MetadataMatchEntry.class, metadataBuilder.build());
-        MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,0,0,0,0,0,0,2});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        metadataBuilder.setMask(new byte[]{0,0,0,0,0,0,0,2});
+        metaCaseBuilder.setMetadata(metadataBuilder.build());
+        entryBuilder.setMatchEntryValue(metaCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(EthDst.class);
         entryBuilder.setHasMask(true);
-        MacAddressMatchEntryBuilder macBuilder = new MacAddressMatchEntryBuilder();
-        macBuilder.setMacAddress(new MacAddress("01:00:03:00:00:06"));
-        entryBuilder.addAugmentation(MacAddressMatchEntry.class, macBuilder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,0,0,0,0,5});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        EthDstCaseBuilder ethDstCaseBuilder = new EthDstCaseBuilder();
+        EthDstBuilder ethDstBuilder = new EthDstBuilder();
+        ethDstBuilder.setMacAddress(new MacAddress("01:00:03:00:00:06"));
+        ethDstBuilder.setMask(new byte[]{0,0,0,0,0,5});
+        ethDstCaseBuilder.setEthDst(ethDstBuilder.build());
+        entryBuilder.setMatchEntryValue(ethDstCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(EthSrc.class);
         entryBuilder.setHasMask(true);
-        macBuilder = new MacAddressMatchEntryBuilder();
-        macBuilder.setMacAddress(new MacAddress("04:00:02:00:00:08"));
-        entryBuilder.addAugmentation(MacAddressMatchEntry.class, macBuilder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,0,0,0,0,2});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        EthSrcCaseBuilder ethSrcCaseBuilder = new EthSrcCaseBuilder();
+        EthSrcBuilder ethSrcBuilder = new EthSrcBuilder();
+        ethSrcBuilder.setMacAddress(new MacAddress("04:00:02:00:00:08"));
+        ethSrcBuilder.setMask(new byte[]{0,0,0,0,0,2});
+        ethSrcCaseBuilder.setEthSrc(ethSrcBuilder.build());
+        entryBuilder.setMatchEntryValue(ethSrcCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(EthType.class);
         entryBuilder.setHasMask(false);
-        EthTypeMatchEntryBuilder ethBuilder = new EthTypeMatchEntryBuilder();
-        ethBuilder.setEthType(new EtherType(46));
-        entryBuilder.addAugmentation(EthTypeMatchEntry.class, ethBuilder.build());
+        EthTypeCaseBuilder ethTypeCaseBuilder = new EthTypeCaseBuilder();
+        EthTypeBuilder ethTypeBuilder = new EthTypeBuilder();
+        ethTypeBuilder.setEthType(new EtherType(46));
+        ethTypeCaseBuilder.setEthType(ethTypeBuilder.build());
+        entryBuilder.setMatchEntryValue(ethTypeCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(VlanVid.class);
         entryBuilder.setHasMask(true);
-        VlanVidMatchEntryBuilder vidBuilder = new VlanVidMatchEntryBuilder();
-        vidBuilder.setCfiBit(true);
-        vidBuilder.setVlanVid(45);
-        entryBuilder.addAugmentation(VlanVidMatchEntry.class, vidBuilder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,9});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        VlanVidCaseBuilder vlanVidCaseBuilder = new VlanVidCaseBuilder();
+        VlanVidBuilder vlanVidBuilder = new VlanVidBuilder();
+        vlanVidBuilder.setVlanVid(45);
+        vlanVidBuilder.setCfiBit(true);
+        vlanVidBuilder.setMask(new byte[]{0,9});
+        vlanVidCaseBuilder.setVlanVid(vlanVidBuilder.build());
+        entryBuilder.setMatchEntryValue(vlanVidCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(VlanPcp.class);
         entryBuilder.setHasMask(false);
-        VlanPcpMatchEntryBuilder pcpBuilder = new VlanPcpMatchEntryBuilder();
-        pcpBuilder.setVlanPcp((short) 14);
-        entryBuilder.addAugmentation(VlanPcpMatchEntry.class, pcpBuilder.build());
+        VlanPcpCaseBuilder vlanPcpCaseBuilder = new VlanPcpCaseBuilder();
+        VlanPcpBuilder vlanPcpBuilder = new VlanPcpBuilder();
+        vlanPcpBuilder.setVlanPcp((short) 14);
+        vlanPcpCaseBuilder.setVlanPcp(vlanPcpBuilder.build());
+        entryBuilder.setMatchEntryValue(vlanPcpCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(IpDscp.class);
         entryBuilder.setHasMask(false);
-        DscpMatchEntryBuilder dscpBuilder = new DscpMatchEntryBuilder();
-        dscpBuilder.setDscp(new Dscp((short) 48));
-        entryBuilder.addAugmentation(DscpMatchEntry.class, dscpBuilder.build());
+        IpDscpCaseBuilder ipDscpCaseBuilder = new IpDscpCaseBuilder();
+        IpDscpBuilder ipDscpBuilder = new IpDscpBuilder();
+        ipDscpBuilder.setDscp(new Dscp((short) 48));
+        ipDscpCaseBuilder.setIpDscp(ipDscpBuilder.build());
+        entryBuilder.setMatchEntryValue(ipDscpCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(IpEcn.class);
         entryBuilder.setHasMask(false);
-        EcnMatchEntryBuilder ecnBuilder = new EcnMatchEntryBuilder();
-        ecnBuilder.setEcn((short) 49);
-        entryBuilder.addAugmentation(EcnMatchEntry.class, ecnBuilder.build());
+        IpEcnCaseBuilder ipEcnCaseBuilder = new IpEcnCaseBuilder();
+        IpEcnBuilder ipEcnBuilder = new IpEcnBuilder();
+        ipEcnBuilder.setEcn((short) 49);
+        ipEcnCaseBuilder.setIpEcn(ipEcnBuilder.build());
+        entryBuilder.setMatchEntryValue(ipEcnCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(IpProto.class);
         entryBuilder.setHasMask(false);
-        ProtocolNumberMatchEntryBuilder protoBuilder = new ProtocolNumberMatchEntryBuilder();
-        protoBuilder.setProtocolNumber((short) 50);
-        entryBuilder.addAugmentation(ProtocolNumberMatchEntry.class, protoBuilder.build());
+        IpProtoCaseBuilder ipProtoCaseBuilder = new IpProtoCaseBuilder();
+        IpProtoBuilder ipProtoBuilder = new IpProtoBuilder();
+        ipProtoBuilder.setProtocolNumber((short) 50);
+        ipProtoCaseBuilder.setIpProto(ipProtoBuilder.build());
+        entryBuilder.setMatchEntryValue(ipProtoCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(Ipv4Src.class);
         entryBuilder.setHasMask(true);
-        Ipv4AddressMatchEntryBuilder ipv4Builder = new Ipv4AddressMatchEntryBuilder();
-        ipv4Builder.setIpv4Address(new Ipv4Address("10.0.0.1"));
-        entryBuilder.addAugmentation(Ipv4AddressMatchEntry.class, ipv4Builder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,0,0,14});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        Ipv4SrcCaseBuilder ipv4SrcCaseBuilder = new Ipv4SrcCaseBuilder();
+        Ipv4SrcBuilder ipv4SrcBuilder = new Ipv4SrcBuilder();
+        ipv4SrcBuilder.setIpv4Address(new Ipv4Address("10.0.0.1"));
+        ipv4SrcBuilder.setMask(new byte[]{0,0,0,14});
+        ipv4SrcCaseBuilder.setIpv4Src(ipv4SrcBuilder.build());
+        entryBuilder.setMatchEntryValue(ipv4SrcCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(Ipv4Dst.class);
         entryBuilder.setHasMask(true);
-        ipv4Builder = new Ipv4AddressMatchEntryBuilder();
-        ipv4Builder.setIpv4Address(new Ipv4Address("10.0.0.2"));
-        entryBuilder.addAugmentation(Ipv4AddressMatchEntry.class, ipv4Builder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,0,0,15});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        Ipv4DstCaseBuilder ipv4DstCaseBuilder = new Ipv4DstCaseBuilder();
+        Ipv4DstBuilder ipv4DstBuilder = new Ipv4DstBuilder();
+        ipv4DstBuilder.setIpv4Address(new Ipv4Address("10.0.0.2"));
+        ipv4DstBuilder.setMask(new byte[]{0,0,0,15});
+        ipv4DstCaseBuilder.setIpv4Dst(ipv4DstBuilder.build());
+        entryBuilder.setMatchEntryValue(ipv4DstCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(TcpSrc.class);
         entryBuilder.setHasMask(false);
-        PortMatchEntryBuilder portBuilder = new PortMatchEntryBuilder();
-        portBuilder.setPort(new org.opendaylight.yang.gen.v1.urn.ietf.params
+        TcpSrcCaseBuilder tcpSrcCaseBuilder = new TcpSrcCaseBuilder();
+        TcpSrcBuilder tcpSrcBuilder = new TcpSrcBuilder();
+        tcpSrcBuilder.setPort(new org.opendaylight.yang.gen.v1.urn.ietf.params
                 .xml.ns.yang.ietf.inet.types.rev100924.PortNumber(6653));
-        entryBuilder.addAugmentation(PortMatchEntry.class, portBuilder.build());
+        tcpSrcCaseBuilder.setTcpSrc(tcpSrcBuilder.build());
+        entryBuilder.setMatchEntryValue(tcpSrcCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(TcpDst.class);
         entryBuilder.setHasMask(false);
-        portBuilder = new PortMatchEntryBuilder();
-        portBuilder.setPort(new org.opendaylight.yang.gen.v1.urn.ietf.params
+        TcpDstCaseBuilder tcpDstCaseBuilder = new TcpDstCaseBuilder();
+        TcpDstBuilder tcpDstBuilder = new TcpDstBuilder();
+        tcpDstBuilder.setPort(new org.opendaylight.yang.gen.v1.urn.ietf.params
                 .xml.ns.yang.ietf.inet.types.rev100924.PortNumber(6654));
-        entryBuilder.addAugmentation(PortMatchEntry.class, portBuilder.build());
+        tcpDstCaseBuilder.setTcpDst(tcpDstBuilder.build());
+        entryBuilder.setMatchEntryValue(tcpDstCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(UdpSrc.class);
         entryBuilder.setHasMask(false);
-        portBuilder = new PortMatchEntryBuilder();
-        portBuilder.setPort(new org.opendaylight.yang.gen.v1.urn.ietf.params
+        UdpSrcCaseBuilder udpSrcCaseBuilder = new UdpSrcCaseBuilder();
+        UdpSrcBuilder udpSrcBuilder = new UdpSrcBuilder();
+        udpSrcBuilder.setPort(new org.opendaylight.yang.gen.v1.urn.ietf.params
                 .xml.ns.yang.ietf.inet.types.rev100924.PortNumber(6655));
-        entryBuilder.addAugmentation(PortMatchEntry.class, portBuilder.build());
+        udpSrcCaseBuilder.setUdpSrc(udpSrcBuilder.build());
+        entryBuilder.setMatchEntryValue(udpSrcCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(UdpDst.class);
         entryBuilder.setHasMask(false);
-        portBuilder = new PortMatchEntryBuilder();
-        portBuilder.setPort(new org.opendaylight.yang.gen.v1.urn.ietf.params
+        UdpDstCaseBuilder udpDstCaseBuilder = new UdpDstCaseBuilder();
+        UdpDstBuilder udpDstBuilder = new UdpDstBuilder();
+        udpDstBuilder.setPort(new org.opendaylight.yang.gen.v1.urn.ietf.params
                 .xml.ns.yang.ietf.inet.types.rev100924.PortNumber(6656));
-        entryBuilder.addAugmentation(PortMatchEntry.class, portBuilder.build());
+        udpDstCaseBuilder.setUdpDst(udpDstBuilder.build());
+        entryBuilder.setMatchEntryValue(udpDstCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(SctpSrc.class);
         entryBuilder.setHasMask(false);
-        portBuilder = new PortMatchEntryBuilder();
-        portBuilder.setPort(new org.opendaylight.yang.gen.v1.urn.ietf.params
+        SctpSrcCaseBuilder sctpSrcCaseBuilder = new SctpSrcCaseBuilder();
+        SctpSrcBuilder sctpSrcBuilder = new SctpSrcBuilder();
+        sctpSrcBuilder.setPort(new org.opendaylight.yang.gen.v1.urn.ietf.params
                 .xml.ns.yang.ietf.inet.types.rev100924.PortNumber(6657));
-        entryBuilder.addAugmentation(PortMatchEntry.class, portBuilder.build());
+        sctpSrcCaseBuilder.setSctpSrc(sctpSrcBuilder.build());
+        entryBuilder.setMatchEntryValue(sctpSrcCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(SctpDst.class);
         entryBuilder.setHasMask(false);
-        portBuilder = new PortMatchEntryBuilder();
-        portBuilder.setPort(new org.opendaylight.yang.gen.v1.urn.ietf.params
+        SctpDstCaseBuilder sctpDstCaseBuilder = new SctpDstCaseBuilder();
+        SctpDstBuilder sctpDstBuilder = new SctpDstBuilder();
+        sctpDstBuilder.setPort(new org.opendaylight.yang.gen.v1.urn.ietf.params
                 .xml.ns.yang.ietf.inet.types.rev100924.PortNumber(6658));
-        entryBuilder.addAugmentation(PortMatchEntry.class, portBuilder.build());
+        sctpDstCaseBuilder.setSctpDst(sctpDstBuilder.build());
+        entryBuilder.setMatchEntryValue(sctpDstCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(Icmpv4Type.class);
         entryBuilder.setHasMask(false);
-        Icmpv4TypeMatchEntryBuilder icmpv4typeBuilder = new Icmpv4TypeMatchEntryBuilder();
-        icmpv4typeBuilder.setIcmpv4Type((short) 51);
-        entryBuilder.addAugmentation(Icmpv4TypeMatchEntry.class, icmpv4typeBuilder.build());
+        Icmpv4TypeCaseBuilder icmpv4TypeCaseBuilder = new Icmpv4TypeCaseBuilder();
+        Icmpv4TypeBuilder icmpv4TypeBuilder = new Icmpv4TypeBuilder();
+        icmpv4TypeBuilder.setIcmpv4Type((short) 51);
+        icmpv4TypeCaseBuilder.setIcmpv4Type(icmpv4TypeBuilder.build());
+        entryBuilder.setMatchEntryValue(icmpv4TypeCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(Icmpv4Code.class);
         entryBuilder.setHasMask(false);
-        Icmpv4CodeMatchEntryBuilder icmpv4CodeBuilder = new Icmpv4CodeMatchEntryBuilder();
+        Icmpv4CodeCaseBuilder icmpv4CodeCaseBuilder = new Icmpv4CodeCaseBuilder();
+        Icmpv4CodeBuilder icmpv4CodeBuilder = new Icmpv4CodeBuilder();
         icmpv4CodeBuilder.setIcmpv4Code((short) 52);
-        entryBuilder.addAugmentation(Icmpv4CodeMatchEntry.class, icmpv4CodeBuilder.build());
+        icmpv4CodeCaseBuilder.setIcmpv4Code(icmpv4CodeBuilder.build());
+        entryBuilder.setMatchEntryValue(icmpv4CodeCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(ArpOp.class);
         entryBuilder.setHasMask(false);
-        OpCodeMatchEntryBuilder opBuilder = new OpCodeMatchEntryBuilder();
-        opBuilder.setOpCode(53);
-        entryBuilder.addAugmentation(OpCodeMatchEntry.class, opBuilder.build());
+        ArpOpCaseBuilder arpOpCaseBuilder = new ArpOpCaseBuilder();
+        ArpOpBuilder arpOpBuilder = new ArpOpBuilder();
+        arpOpBuilder.setOpCode(53);
+        arpOpCaseBuilder.setArpOp(arpOpBuilder.build());
+        entryBuilder.setMatchEntryValue(arpOpCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(ArpSpa.class);
         entryBuilder.setHasMask(true);
-        ipv4Builder = new Ipv4AddressMatchEntryBuilder();
-        ipv4Builder.setIpv4Address(new Ipv4Address("10.0.0.4"));
-        entryBuilder.addAugmentation(Ipv4AddressMatchEntry.class, ipv4Builder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,0,0,16});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        ArpSpaCaseBuilder arpSpaCaseBuilder = new ArpSpaCaseBuilder();
+        ArpSpaBuilder arpSpaBuilder = new ArpSpaBuilder();
+        arpSpaBuilder.setIpv4Address(new Ipv4Address("10.0.0.4"));
+        arpSpaBuilder.setMask(new byte[]{0,0,0,16});
+        arpSpaCaseBuilder.setArpSpa(arpSpaBuilder.build());
+        entryBuilder.setMatchEntryValue(arpSpaCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(ArpTpa.class);
         entryBuilder.setHasMask(true);
-        ipv4Builder = new Ipv4AddressMatchEntryBuilder();
-        ipv4Builder.setIpv4Address(new Ipv4Address("10.0.0.5"));
-        entryBuilder.addAugmentation(Ipv4AddressMatchEntry.class, ipv4Builder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,0,0,17});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        ArpTpaCaseBuilder arpTpaCaseBuilder = new ArpTpaCaseBuilder();
+        ArpTpaBuilder arpTpaBuilder = new ArpTpaBuilder();
+        arpTpaBuilder.setIpv4Address(new Ipv4Address("10.0.0.5"));
+        arpTpaBuilder.setMask(new byte[]{0,0,0,17});
+        arpTpaCaseBuilder.setArpTpa(arpTpaBuilder.build());
+        entryBuilder.setMatchEntryValue(arpTpaCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(ArpSha.class);
         entryBuilder.setHasMask(true);
-        macBuilder = new MacAddressMatchEntryBuilder();
-        macBuilder.setMacAddress(new MacAddress("00:01:02:03:04:05"));
-        entryBuilder.addAugmentation(MacAddressMatchEntry.class, macBuilder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,0,4,0,0,6});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        ArpShaCaseBuilder arpShaCaseBuilder = new ArpShaCaseBuilder();
+        ArpShaBuilder arpShaBuilder = new ArpShaBuilder();
+        arpShaBuilder.setMacAddress(new MacAddress("00:01:02:03:04:05"));
+        arpShaBuilder.setMask(new byte[]{0,0,4,0,0,6});
+        arpShaCaseBuilder.setArpSha(arpShaBuilder.build());
+        entryBuilder.setMatchEntryValue(arpShaCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(ArpTha.class);
         entryBuilder.setHasMask(true);
-        macBuilder = new MacAddressMatchEntryBuilder();
-        macBuilder.setMacAddress(new MacAddress("00:00:00:00:00:03"));
-        entryBuilder.addAugmentation(MacAddressMatchEntry.class, macBuilder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,0,6,0,0,4});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        ArpThaCaseBuilder arpThaCaseBuilder = new ArpThaCaseBuilder();
+        ArpThaBuilder arpThaBuilder = new ArpThaBuilder();
+        arpThaBuilder.setMacAddress(new MacAddress("00:00:00:00:00:03"));
+        arpThaBuilder.setMask(new byte[]{0,0,6,0,0,4});
+        arpThaCaseBuilder.setArpTha(arpThaBuilder.build());
+        entryBuilder.setMatchEntryValue(arpThaCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(Ipv6Src.class);
         entryBuilder.setHasMask(true);
-        Ipv6AddressMatchEntryBuilder ipv6Builder = new Ipv6AddressMatchEntryBuilder();
-        ipv6Builder.setIpv6Address(new Ipv6Address("0:0:0:0:0:0:0:1"));
-        entryBuilder.addAugmentation(Ipv6AddressMatchEntry.class, ipv6Builder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        Ipv6SrcCaseBuilder ipv6SrcCaseBuilder = new Ipv6SrcCaseBuilder();
+        Ipv6SrcBuilder ipv6SrcBuilder = new Ipv6SrcBuilder();
+        ipv6SrcBuilder.setIpv6Address(new Ipv6Address("0:0:0:0:0:0:0:1"));
+        ipv6SrcBuilder.setMask(new byte[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1});
+        ipv6SrcCaseBuilder.setIpv6Src(ipv6SrcBuilder.build());
+        entryBuilder.setMatchEntryValue(ipv6SrcCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(Ipv6Dst.class);
         entryBuilder.setHasMask(true);
-        ipv6Builder = new Ipv6AddressMatchEntryBuilder();
-        ipv6Builder.setIpv6Address(new Ipv6Address("0:0:1:0:1:0:0:1"));
-        entryBuilder.addAugmentation(Ipv6AddressMatchEntry.class, ipv6Builder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,1});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        Ipv6DstCaseBuilder ipv6DstCaseBuilder = new Ipv6DstCaseBuilder();
+        Ipv6DstBuilder ipv6DstBuilder = new Ipv6DstBuilder();
+        ipv6DstBuilder.setIpv6Address(new Ipv6Address("0:0:1:0:1:0:0:1"));
+        ipv6DstBuilder.setMask(new byte[]{0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,1});
+        ipv6DstCaseBuilder.setIpv6Dst(ipv6DstBuilder.build());
+        entryBuilder.setMatchEntryValue(ipv6DstCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(Ipv6Flabel.class);
-        entryBuilder.setHasMask(true);
-        Ipv6FlabelMatchEntryBuilder flabelBuilder = new Ipv6FlabelMatchEntryBuilder();
-        flabelBuilder.setIpv6Flabel(new Ipv6FlowLabel(58L));
-        entryBuilder.addAugmentation(Ipv6FlabelMatchEntry.class, flabelBuilder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,1,0,2});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        entryBuilder.setHasMask(false);
+        Ipv6FlabelCaseBuilder ipv6FlabelCaseBuilder = new Ipv6FlabelCaseBuilder();
+        Ipv6FlabelBuilder ipv6FlabelBuilder = new Ipv6FlabelBuilder();
+        ipv6FlabelBuilder.setIpv6Flabel(new Ipv6FlowLabel(58L));
+        ipv6FlabelCaseBuilder.setIpv6Flabel(ipv6FlabelBuilder.build());
+        entryBuilder.setMatchEntryValue(ipv6FlabelCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(Icmpv6Type.class);
         entryBuilder.setHasMask(false);
-        Icmpv6TypeMatchEntryBuilder icmpv6TypeBuilder = new Icmpv6TypeMatchEntryBuilder();
+        Icmpv6TypeCaseBuilder icmpv6TypeCaseBuilder = new Icmpv6TypeCaseBuilder();
+        Icmpv6TypeBuilder icmpv6TypeBuilder = new Icmpv6TypeBuilder();
         icmpv6TypeBuilder.setIcmpv6Type((short) 59);
-        entryBuilder.addAugmentation(Icmpv6TypeMatchEntry.class, icmpv6TypeBuilder.build());
+        icmpv6TypeCaseBuilder.setIcmpv6Type(icmpv6TypeBuilder.build());
+        entryBuilder.setMatchEntryValue(icmpv6TypeCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(Icmpv6Code.class);
         entryBuilder.setHasMask(false);
-        Icmpv6CodeMatchEntryBuilder icmpv6CodeBuilder = new Icmpv6CodeMatchEntryBuilder();
-        icmpv6CodeBuilder.setIcmpv6Code((short) 60);
-        entryBuilder.addAugmentation(Icmpv6CodeMatchEntry.class, icmpv6CodeBuilder.build());
+        Icmpv6CodeCaseBuilder Icmpv6CodeCaseBuilder = new Icmpv6CodeCaseBuilder();
+        Icmpv6CodeBuilder Icmpv6CodeBuilder = new Icmpv6CodeBuilder();
+        Icmpv6CodeBuilder.setIcmpv6Code((short) 60);
+        Icmpv6CodeCaseBuilder.setIcmpv6Code(Icmpv6CodeBuilder.build());
+        entryBuilder.setMatchEntryValue(Icmpv6CodeCaseBuilder.build());
         entries.add(entryBuilder.build());
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(Ipv6NdTarget.class);
         entryBuilder.setHasMask(false);
-        ipv6Builder = new Ipv6AddressMatchEntryBuilder();
-        ipv6Builder.setIpv6Address(new Ipv6Address("F:0:0::0:0:0:1"));
-        entryBuilder.addAugmentation(Ipv6AddressMatchEntry.class, ipv6Builder.build());
+        Ipv6NdTargetCaseBuilder ipv6NdTargetCaseBuilder = new Ipv6NdTargetCaseBuilder();
+        Ipv6NdTargetBuilder ipv6NdTargetBuilder = new Ipv6NdTargetBuilder();
+        ipv6NdTargetBuilder.setIpv6Address(new Ipv6Address("F:0:0::0:0:0:1"));
+        ipv6NdTargetCaseBuilder.setIpv6NdTarget(ipv6NdTargetBuilder.build());
+        entryBuilder.setMatchEntryValue(ipv6NdTargetCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(Ipv6NdSll.class);
         entryBuilder.setHasMask(false);
-        macBuilder = new MacAddressMatchEntryBuilder();
-        macBuilder.setMacAddress(new MacAddress("01:00:03:00:00:06"));
-        entryBuilder.addAugmentation(MacAddressMatchEntry.class, macBuilder.build());
+        Ipv6NdSllCaseBuilder ipv6NdSllCaseBuilder = new Ipv6NdSllCaseBuilder();
+        Ipv6NdSllBuilder ipv6NdSllBuilder = new Ipv6NdSllBuilder();
+        ipv6NdSllBuilder.setMacAddress(new MacAddress("01:00:03:00:00:06"));
+        ipv6NdSllCaseBuilder.setIpv6NdSll(ipv6NdSllBuilder.build());
+        entryBuilder.setMatchEntryValue(ipv6NdSllCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(Ipv6NdTll.class);
         entryBuilder.setHasMask(false);
-        macBuilder = new MacAddressMatchEntryBuilder();
-        macBuilder.setMacAddress(new MacAddress("04:00:02:00:00:08"));
-        entryBuilder.addAugmentation(MacAddressMatchEntry.class, macBuilder.build());
+        Ipv6NdTllCaseBuilder ipv6NdTllCaseBuilder = new Ipv6NdTllCaseBuilder();
+        Ipv6NdTllBuilder ipv6NdTllBuilder = new Ipv6NdTllBuilder();
+        ipv6NdTllBuilder.setMacAddress(new MacAddress("04:00:02:00:00:08"));
+        ipv6NdTllCaseBuilder.setIpv6NdTll(ipv6NdTllBuilder.build());
+        entryBuilder.setMatchEntryValue(ipv6NdTllCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(MplsLabel.class);
         entryBuilder.setHasMask(false);
-        MplsLabelMatchEntryBuilder labelBuilder = new MplsLabelMatchEntryBuilder();
-        labelBuilder.setMplsLabel(61L);
-        entryBuilder.addAugmentation(MplsLabelMatchEntry.class, labelBuilder.build());
+        MplsLabelCaseBuilder mplsLabelCaseBuilder = new MplsLabelCaseBuilder();
+        MplsLabelBuilder mplsLabelBuilder = new MplsLabelBuilder();
+        mplsLabelBuilder.setMplsLabel(61L);
+        mplsLabelCaseBuilder.setMplsLabel(mplsLabelBuilder.build());
+        entryBuilder.setMatchEntryValue(mplsLabelCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(MplsTc.class);
         entryBuilder.setHasMask(false);
-        TcMatchEntryBuilder tcBuilder = new TcMatchEntryBuilder();
-        tcBuilder.setTc((short) 62);
-        entryBuilder.addAugmentation(TcMatchEntry.class, tcBuilder.build());
+        MplsTcCaseBuilder MplsTcCaseBuilder = new MplsTcCaseBuilder();
+        MplsTcBuilder MplsTcBuilder = new MplsTcBuilder();
+        MplsTcBuilder.setTc((short) 62);
+        MplsTcCaseBuilder.setMplsTc(MplsTcBuilder.build());
+        entryBuilder.setMatchEntryValue(MplsTcCaseBuilder.build());
         entries.add(entryBuilder.build());
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(MplsBos.class);
         entryBuilder.setHasMask(false);
-        BosMatchEntryBuilder bosBuilder = new BosMatchEntryBuilder();
-        bosBuilder.setBos(true);
-        entryBuilder.addAugmentation(BosMatchEntry.class, bosBuilder.build());
+        MplsBosCaseBuilder MplsBosCaseBuilder = new MplsBosCaseBuilder();
+        MplsBosBuilder MplsBosBuilder = new MplsBosBuilder();
+        MplsBosBuilder.setBos(true);
+        MplsBosCaseBuilder.setMplsBos(MplsBosBuilder.build());
+        entryBuilder.setMatchEntryValue(MplsBosCaseBuilder.build());
         entries.add(entryBuilder.build());
-
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(PbbIsid.class);
         entryBuilder.setHasMask(true);
-        IsidMatchEntryBuilder isidBuilder = new IsidMatchEntryBuilder();
-        isidBuilder.setIsid(64L);
-        entryBuilder.addAugmentation(IsidMatchEntry.class, isidBuilder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,1,2});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        PbbIsidCaseBuilder pbbIsidCaseBuilder = new PbbIsidCaseBuilder();
+        PbbIsidBuilder pbbIsidBuilder = new PbbIsidBuilder();
+        pbbIsidBuilder.setIsid(64L);
+        pbbIsidBuilder.setMask(new byte[]{0,1,2});
+        pbbIsidCaseBuilder.setPbbIsid(pbbIsidBuilder.build());
+        entryBuilder.setMatchEntryValue(pbbIsidCaseBuilder.build());
         entries.add(entryBuilder.build());
-
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(TunnelId.class);
         entryBuilder.setHasMask(true);
-        metadataBuilder = new MetadataMatchEntryBuilder();
-        metadataBuilder.setMetadata(new byte[]{0,0,0,0,0,0,0,1});
-        entryBuilder.addAugmentation(MetadataMatchEntry.class, metadataBuilder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,0,0,0,0,0,0,2});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        TunnelIdCaseBuilder tunnelIdCaseBuilder = new TunnelIdCaseBuilder();
+        TunnelIdBuilder tunnelIdBuilder = new TunnelIdBuilder();
+        tunnelIdBuilder.setTunnelId(new byte[]{0,0,0,0,0,0,0,1});
+        tunnelIdBuilder.setMask(new byte[]{0,0,0,0,0,0,0,2});
+        tunnelIdCaseBuilder.setTunnelId(tunnelIdBuilder.build());
+        entryBuilder.setMatchEntryValue(tunnelIdCaseBuilder.build());
         entries.add(entryBuilder.build());
-
-        entryBuilder = new MatchEntriesBuilder();
+        entryBuilder = new MatchEntryBuilder();
         entryBuilder.setOxmClass(OpenflowBasicClass.class);
         entryBuilder.setOxmMatchField(Ipv6Exthdr.class);
         entryBuilder.setHasMask(true);
-        PseudoFieldMatchEntryBuilder pseudoBuilder = new PseudoFieldMatchEntryBuilder();
-        pseudoBuilder.setPseudoField(new Ipv6ExthdrFlags(true, false, true, false, true, false, true, false, true));
-        entryBuilder.addAugmentation(PseudoFieldMatchEntry.class, pseudoBuilder.build());
-        maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(new byte[]{0,2});
-        entryBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        Ipv6ExthdrCaseBuilder ipv6ExthdrCaseBuilder = new Ipv6ExthdrCaseBuilder();
+        Ipv6ExthdrBuilder ipv6ExthdrBuilder = new Ipv6ExthdrBuilder();
+        ipv6ExthdrBuilder.setPseudoField(new Ipv6ExthdrFlags(true, false, true,
+                false, true, false, true, false, true));
+        ipv6ExthdrBuilder.setMask(new byte[]{0,2});
+        ipv6ExthdrCaseBuilder.setIpv6Exthdr(ipv6ExthdrBuilder.build());
+        entryBuilder.setMatchEntryValue(ipv6ExthdrCaseBuilder.build());
         entries.add(entryBuilder.build());
 
 
-
-        builder.setMatchEntries(entries);
+        builder.setMatchEntry(entries);
         Match match = builder.build();
 
         ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();
         matchSerializer.serialize(match, out);
 
         Assert.assertEquals("Wrong match type", 1, out.readUnsignedShort());
-        Assert.assertEquals("Wrong match length", 428, out.readUnsignedShort());
+        Assert.assertEquals("Wrong match length", 424, out.readUnsignedShort());
         Assert.assertEquals("Wrong match entry class", 0x8000, out.readUnsignedShort());
         Assert.assertEquals("Wrong match entry field & hasMask", 0, out.readUnsignedByte());
         Assert.assertEquals("Wrong match entry length", 4, out.readUnsignedByte());
@@ -724,12 +800,9 @@ public class OF13MatchSerializer02Test {
         out.readBytes(array);
         Assert.assertArrayEquals("Wrong match entry mask", new byte[]{0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,1}, array);
         Assert.assertEquals("Wrong match entry class", 0x8000, out.readUnsignedShort());
-        Assert.assertEquals("Wrong match entry field & hasMask", 57, out.readUnsignedByte());
-        Assert.assertEquals("Wrong match entry length", 8, out.readUnsignedByte());
+        Assert.assertEquals("Wrong match entry field & hasMask", 56, out.readUnsignedByte());
+        Assert.assertEquals("Wrong match entry length", 4, out.readUnsignedByte()); //8, out.readUnsignedByte());
         Assert.assertEquals("Wrong match entry value", 58, out.readUnsignedInt());
-        array = new byte[4];
-        out.readBytes(array);
-        Assert.assertArrayEquals("Wrong match entry mask", new byte[]{0,1,0,2}, array);
         Assert.assertEquals("Wrong match entry class", 0x8000, out.readUnsignedShort());
         Assert.assertEquals("Wrong match entry field & hasMask", 58, out.readUnsignedByte());
         Assert.assertEquals("Wrong match entry length", 1, out.readUnsignedByte());
@@ -787,7 +860,7 @@ public class OF13MatchSerializer02Test {
         array = new byte[2];
         out.readBytes(array);
         Assert.assertArrayEquals("Wrong match entry value", new byte[]{0,2}, array);
-        Assert.assertTrue("Wrong padding", out.readableBytes() == 4);
+        Assert.assertTrue("Wrong padding", out.readableBytes() == 0);
     }
 
 }
index deb3df016fa01f297222483710cdc9f5f53e6c6a..fe1812c9eb853923c37648e41097d2390515b8ab 100644 (file)
@@ -26,31 +26,33 @@ import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Address;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6FlowLabel;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv4AddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6AddressMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6AddressMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6FlabelMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.Ipv6FlabelMatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaskMatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.oxm.container.match.entry.value.ExperimenterIdCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.oxm.container.match.entry.value.experimenter.id._case.ExperimenterBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.StandardMatchType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ExperimenterClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv4Src;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Dst;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Flabel;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6NdTarget;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Ipv6Src;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmMatchType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.MatchBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ExperimenterClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv4Src;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Dst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Flabel;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6NdTarget;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Src;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmMatchType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv4SrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6DstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6FlabelCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdTargetCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6SrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv4.src._case.Ipv4SrcBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.dst._case.Ipv6DstBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.flabel._case.Ipv6FlabelBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.nd.target._case.Ipv6NdTargetBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.src._case.Ipv6SrcBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.MatchBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -83,16 +85,18 @@ public class OF13MatchSerializerTest {
     public void testIpv4Src() {
         MatchBuilder builder = new MatchBuilder();
         builder.setType(OxmMatchType.class);
-        List<MatchEntries> entries = new ArrayList<>();
-        MatchEntriesBuilder entriesBuilder = new MatchEntriesBuilder();
+        List<MatchEntry> entries = new ArrayList<>();
+        MatchEntryBuilder entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(Ipv4Src.class);
         entriesBuilder.setHasMask(false);
-        Ipv4AddressMatchEntryBuilder addressBuilder = new Ipv4AddressMatchEntryBuilder();
-        addressBuilder.setIpv4Address(new Ipv4Address("1.2.3.4"));
-        entriesBuilder.addAugmentation(Ipv4AddressMatchEntry.class, addressBuilder.build());
+        Ipv4SrcCaseBuilder ipv4SrcCaseBuilder = new Ipv4SrcCaseBuilder();
+        Ipv4SrcBuilder ipv4SrcBuilder = new Ipv4SrcBuilder();
+        ipv4SrcBuilder.setIpv4Address(new Ipv4Address("1.2.3.4"));
+        ipv4SrcCaseBuilder.setIpv4Src(ipv4SrcBuilder.build());
+        entriesBuilder.setMatchEntryValue(ipv4SrcCaseBuilder.build());
         entries.add(entriesBuilder.build());
-        builder.setMatchEntries(entries);
+        builder.setMatchEntry(entries);
         Match match = builder.build();
 
         ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();
@@ -116,53 +120,63 @@ public class OF13MatchSerializerTest {
     public void testIpv6Various() {
         MatchBuilder builder = new MatchBuilder();
         builder.setType(OxmMatchType.class);
-        List<MatchEntries> entries = new ArrayList<>();
+        List<MatchEntry> entries = new ArrayList<>();
         // ipv6 match entry with correct Ipv6 address
-        MatchEntriesBuilder entriesBuilder = new MatchEntriesBuilder();
+        MatchEntryBuilder entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(Ipv6Src.class);
         entriesBuilder.setHasMask(false);
-        Ipv6AddressMatchEntryBuilder addressBuilder = new Ipv6AddressMatchEntryBuilder();
-        addressBuilder.setIpv6Address(new Ipv6Address("1:2:3:4:5:6:7:8"));
-        entriesBuilder.addAugmentation(Ipv6AddressMatchEntry.class, addressBuilder.build());
+        Ipv6SrcCaseBuilder ipv6SrcCaseBuilder = new Ipv6SrcCaseBuilder();
+        Ipv6SrcBuilder ipv6SrcBuilder = new Ipv6SrcBuilder();
+        ipv6SrcBuilder.setIpv6Address(new Ipv6Address("1:2:3:4:5:6:7:8"));
+        ipv6SrcCaseBuilder.setIpv6Src(ipv6SrcBuilder.build());
+        entriesBuilder.setMatchEntryValue(ipv6SrcCaseBuilder.build());
         entries.add(entriesBuilder.build());
         // ipv6 match entry with abbreviated Ipv6 address
-        entriesBuilder = new MatchEntriesBuilder();
+        entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(Ipv6NdTarget.class);
         entriesBuilder.setHasMask(false);
-        addressBuilder = new Ipv6AddressMatchEntryBuilder();
-        addressBuilder.setIpv6Address(new Ipv6Address("1:2::6:7:8"));
-        entriesBuilder.addAugmentation(Ipv6AddressMatchEntry.class, addressBuilder.build());
+        Ipv6NdTargetCaseBuilder ipv6NdTargetCaseBuilder = new Ipv6NdTargetCaseBuilder();
+        Ipv6NdTargetBuilder ipv6NdTargetBuilder = new Ipv6NdTargetBuilder();
+        ipv6NdTargetBuilder.setIpv6Address(new Ipv6Address("1:2::6:7:8"));
+        ipv6NdTargetCaseBuilder.setIpv6NdTarget(ipv6NdTargetBuilder.build());
+        entriesBuilder.setMatchEntryValue(ipv6NdTargetCaseBuilder.build());
         entries.add(entriesBuilder.build());
         // ipv6 match entry with abbreviated Ipv6 address
-        entriesBuilder = new MatchEntriesBuilder();
+        entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(Ipv6Dst.class);
         entriesBuilder.setHasMask(false);
-        addressBuilder = new Ipv6AddressMatchEntryBuilder();
-        addressBuilder.setIpv6Address(new Ipv6Address("1::8"));
-        entriesBuilder.addAugmentation(Ipv6AddressMatchEntry.class, addressBuilder.build());
+        Ipv6DstCaseBuilder ipv6DstCaseBuilder = new Ipv6DstCaseBuilder();
+        Ipv6DstBuilder ipv6DstBuilder = new Ipv6DstBuilder();
+        ipv6DstBuilder.setIpv6Address(new Ipv6Address("1::8"));
+        ipv6DstCaseBuilder.setIpv6Dst(ipv6DstBuilder.build());
+        entriesBuilder.setMatchEntryValue(ipv6DstCaseBuilder.build());
         entries.add(entriesBuilder.build());
         // ipv6 match entry with abbreviated Ipv6 address
-        entriesBuilder = new MatchEntriesBuilder();
+        entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(Ipv6Dst.class);
         entriesBuilder.setHasMask(false);
-        addressBuilder = new Ipv6AddressMatchEntryBuilder();
-        addressBuilder.setIpv6Address(new Ipv6Address("::1"));
-        entriesBuilder.addAugmentation(Ipv6AddressMatchEntry.class, addressBuilder.build());
+        ipv6DstCaseBuilder = new Ipv6DstCaseBuilder();
+        ipv6DstBuilder = new Ipv6DstBuilder();
+        ipv6DstBuilder.setIpv6Address(new Ipv6Address("::1"));
+        ipv6DstCaseBuilder.setIpv6Dst(ipv6DstBuilder.build());
+        entriesBuilder.setMatchEntryValue(ipv6DstCaseBuilder.build());
         entries.add(entriesBuilder.build());
         // ipv6 match entry with abbreviated Ipv6 address
-        entriesBuilder = new MatchEntriesBuilder();
+        entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(Ipv6Dst.class);
         entriesBuilder.setHasMask(false);
-        addressBuilder = new Ipv6AddressMatchEntryBuilder();
-        addressBuilder.setIpv6Address(new Ipv6Address("::"));
-        entriesBuilder.addAugmentation(Ipv6AddressMatchEntry.class, addressBuilder.build());
+        ipv6DstCaseBuilder = new Ipv6DstCaseBuilder();
+        ipv6DstBuilder = new Ipv6DstBuilder();
+        ipv6DstBuilder.setIpv6Address(new Ipv6Address("::"));
+        ipv6DstCaseBuilder.setIpv6Dst(ipv6DstBuilder.build());
+        entriesBuilder.setMatchEntryValue(ipv6DstCaseBuilder.build());
         entries.add(entriesBuilder.build());
-        builder.setMatchEntries(entries);
+        builder.setMatchEntry(entries);
         Match match = builder.build();
         ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();
         matchSerializer.serialize(match, out);
@@ -233,17 +247,19 @@ public class OF13MatchSerializerTest {
     public void testIpv6Incorrect() {
         MatchBuilder builder = new MatchBuilder();
         builder.setType(OxmMatchType.class);
-        List<MatchEntries> entries = new ArrayList<>();
+        List<MatchEntry> entries = new ArrayList<>();
         // ipv6 match entry with incorrect Ipv6 address
-        MatchEntriesBuilder entriesBuilder = new MatchEntriesBuilder();
+        MatchEntryBuilder entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(Ipv6Src.class);
         entriesBuilder.setHasMask(false);
-        Ipv6AddressMatchEntryBuilder addressBuilder = new Ipv6AddressMatchEntryBuilder();
-        addressBuilder.setIpv6Address(new Ipv6Address("1:2::::8"));
-        entriesBuilder.addAugmentation(Ipv6AddressMatchEntry.class, addressBuilder.build());
+        Ipv6SrcCaseBuilder ipv6SrcCaseBuilder = new Ipv6SrcCaseBuilder();
+        Ipv6SrcBuilder ipv6SrcBuilder = new Ipv6SrcBuilder();
+        ipv6SrcBuilder.setIpv6Address(new Ipv6Address("1:2::::8"));
+        ipv6SrcCaseBuilder.setIpv6Src(ipv6SrcBuilder.build());
+        entriesBuilder.setMatchEntryValue(ipv6SrcCaseBuilder.build());
         entries.add(entriesBuilder.build());
-        builder.setMatchEntries(entries);
+        builder.setMatchEntry(entries);
         Match match = builder.build();
         ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();
         matchSerializer.serialize(match, out);
@@ -262,7 +278,7 @@ public class OF13MatchSerializerTest {
         Assert.assertEquals("Wrong type", 1, out.readUnsignedShort());
         out.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         Assert.assertEquals("Wrong class", 0x8000, out.readUnsignedShort());
-        Assert.assertEquals("Wrong field and mask", 28<<1, out.readUnsignedByte());
+        Assert.assertEquals("Wrong field and mask", 56, out.readUnsignedByte());
         out.skipBytes(EncodeConstants.SIZE_OF_BYTE_IN_BYTES);
         byte[] label = new byte[4];
         out.readBytes(label);
@@ -272,11 +288,11 @@ public class OF13MatchSerializerTest {
     }
 
     /**
-     * Test for correct serialization of Ipv4Address match entry with mask
+     * Test for correct serialization of Ipv4Address match entry
      */
     @Test
     public void testIpv6FlabelWithMask() {
-        Match match = buildIpv6FLabelMatch(0x0f9e8dL, true, new byte[]{0, 0x0c, 0x7b, 0x6a});
+        Match match = buildIpv6FLabelMatch(0x0f9e8dL, true, new byte[]{0, 1, 2, 3});
 
         ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();
         matchSerializer.serialize(match, out);
@@ -284,13 +300,14 @@ public class OF13MatchSerializerTest {
         Assert.assertEquals("Wrong type", 1, out.readUnsignedShort());
         out.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         Assert.assertEquals("Wrong class", 0x8000, out.readUnsignedShort());
-        Assert.assertEquals("Wrong field and mask", 28<<1 | 1, out.readUnsignedByte());
+        Assert.assertEquals("Wrong field and mask", 57, out.readUnsignedByte());
         out.skipBytes(EncodeConstants.SIZE_OF_BYTE_IN_BYTES);
-        byte[] labelAndMask = new byte[8];
-        out.readBytes(labelAndMask);
-
-        LOG.debug("label: "+ByteBufUtils.bytesToHexString(labelAndMask));
-        Assert.assertArrayEquals("Wrong ipv6FLabel", new byte[]{0, 0x0f, (byte) 0x9e, (byte) 0x8d, 0, 0x0c, 0x7b, 0x6a}, labelAndMask);
+        byte[] label = new byte[4];
+        out.readBytes(label);
+        Assert.assertArrayEquals("Wrong ipv6FLabel", new byte[]{0, 0x0f, (byte) 0x9e, (byte) 0x8d}, label);
+        byte[] mask = new byte[4];
+        out.readBytes(mask);
+        Assert.assertArrayEquals("Wrong ipv6FLabel mask", new byte[]{0, 1, 2, 3}, mask);
     }
 
     /**
@@ -299,7 +316,6 @@ public class OF13MatchSerializerTest {
     @Test
     public void testIpv6FlabelWithMaskBad() {
         Match match = buildIpv6FLabelMatch(0x0f9e8dL, true, new byte[]{0x0c, 0x7b, 0x6a});
-
         ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();
 
         try {
@@ -319,19 +335,19 @@ public class OF13MatchSerializerTest {
     private static Match buildIpv6FLabelMatch(long labelValue, boolean hasMask, byte[] mask) {
         MatchBuilder builder = new MatchBuilder();
         builder.setType(OxmMatchType.class);
-        List<MatchEntries> entries = new ArrayList<>();
-        MatchEntriesBuilder entriesBuilder = new MatchEntriesBuilder();
+        List<MatchEntry> entries = new ArrayList<>();
+        MatchEntryBuilder entriesBuilder = new MatchEntryBuilder();
         entriesBuilder.setOxmClass(OpenflowBasicClass.class);
         entriesBuilder.setOxmMatchField(Ipv6Flabel.class);
         entriesBuilder.setHasMask(hasMask);
-        Ipv6FlabelMatchEntryBuilder ip6FLabelBuilder = new Ipv6FlabelMatchEntryBuilder();
-        ip6FLabelBuilder.setIpv6Flabel(new Ipv6FlowLabel(labelValue));
-        entriesBuilder.addAugmentation(Ipv6FlabelMatchEntry.class, ip6FLabelBuilder.build());
-        MaskMatchEntryBuilder maskBuilder = new MaskMatchEntryBuilder();
-        maskBuilder.setMask(mask);
-        entriesBuilder.addAugmentation(MaskMatchEntry.class, maskBuilder.build());
+        Ipv6FlabelCaseBuilder ipv6FlabelCaseBuilder = new Ipv6FlabelCaseBuilder();
+        Ipv6FlabelBuilder ipv6FlabelBuilder = new Ipv6FlabelBuilder();
+        ipv6FlabelBuilder.setIpv6Flabel(new Ipv6FlowLabel(labelValue));
+        ipv6FlabelBuilder.setMask(mask);
+        ipv6FlabelCaseBuilder.setIpv6Flabel(ipv6FlabelBuilder.build());
+        entriesBuilder.setMatchEntryValue(ipv6FlabelCaseBuilder.build());
         entries.add(entriesBuilder.build());
-        builder.setMatchEntries(entries);
+        builder.setMatchEntry(entries);
         Match match = builder.build();
         return match;
     }
@@ -360,14 +376,16 @@ public class OF13MatchSerializerTest {
      */
     @Test(expected=IllegalStateException.class)
     public void testSerializeExperimenterMatchEntry() {
-        List<MatchEntries> entries = new ArrayList<>();
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+        List<MatchEntry> entries = new ArrayList<>();
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(ExperimenterClass.class);
         builder.setOxmMatchField(OxmMatchFieldClass.class);
         builder.setHasMask(true);
-        ExperimenterIdMatchEntryBuilder expIdBuilder = new ExperimenterIdMatchEntryBuilder();
-        expIdBuilder.setExperimenter(new ExperimenterId(42L));
-        builder.addAugmentation(ExperimenterIdMatchEntry.class, expIdBuilder.build());
+        ExperimenterIdCaseBuilder caseBuilder = new ExperimenterIdCaseBuilder();
+        ExperimenterBuilder expBuilder = new ExperimenterBuilder();
+        expBuilder.setExperimenter(new ExperimenterId(42L));
+        caseBuilder.setExperimenter(expBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
         entries.add(builder.build());
         ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();
 
index f4a37a5234336b056134df244991324c8e6ac58c..99d297c7225a61e919f8c12971a7a3b0a22ef71d 100644 (file)
@@ -17,12 +17,12 @@ import org.opendaylight.openflowjava.protocol.api.keys.InstructionSerializerKey;
 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdInstruction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdInstructionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMatchEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterIdMatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdInstruction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdInstructionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.oxm.container.match.entry.value.ExperimenterIdCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.oxm.container.match.entry.value.experimenter.id._case.ExperimenterBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Experimenter;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.ExperimenterActionSubType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Output;
@@ -32,12 +32,12 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.InstructionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.ExperimenterClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ExperimenterClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
 
 /**
  * @author michal.polkorab
@@ -130,14 +130,14 @@ public class TypeKeyMakerFactoryTest {
      */
     @Test
     public void testMatchEntriesKeyMaker() {
-        TypeKeyMaker<MatchEntries> keyMaker = TypeKeyMakerFactory.createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
+        TypeKeyMaker<MatchEntry> keyMaker = TypeKeyMakerFactory.createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
         Assert.assertNotNull("Null keyMaker", keyMaker);
 
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(OpenflowBasicClass.class);
         builder.setOxmMatchField(InPort.class);
         builder.setHasMask(true);
-        MatchEntries entry = builder.build();
+        MatchEntry entry = builder.build();
         MessageTypeKey<?> key = keyMaker.make(entry);
 
         Assert.assertNotNull("Null key", key);
@@ -151,17 +151,19 @@ public class TypeKeyMakerFactoryTest {
      */
     @Test
     public void testExperimenterMatchEntriesKeyMaker() {
-        TypeKeyMaker<MatchEntries> keyMaker = TypeKeyMakerFactory.createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
+        TypeKeyMaker<MatchEntry> keyMaker = TypeKeyMakerFactory.createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
         Assert.assertNotNull("Null keyMaker", keyMaker);
 
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+        MatchEntryBuilder builder = new MatchEntryBuilder();
         builder.setOxmClass(ExperimenterClass.class);
         builder.setOxmMatchField(OxmMatchFieldClass.class);
         builder.setHasMask(true);
-        ExperimenterIdMatchEntryBuilder expIdBuilder = new ExperimenterIdMatchEntryBuilder();
-        expIdBuilder.setExperimenter(new ExperimenterId(42L));
-        builder.addAugmentation(ExperimenterIdMatchEntry.class, expIdBuilder.build());
-        MatchEntries entry = builder.build();
+        ExperimenterIdCaseBuilder caseBuilder = new ExperimenterIdCaseBuilder();
+        ExperimenterBuilder expBuilder = new ExperimenterBuilder();
+        expBuilder.setExperimenter(new ExperimenterId(42L));
+        caseBuilder.setExperimenter(expBuilder.build());
+        builder.setMatchEntryValue(caseBuilder.build());
+        MatchEntry entry = builder.build();
         MessageTypeKey<?> key = keyMaker.make(entry);
 
         Assert.assertNotNull("Null key", key);
index e83bac83b4a1c78e5bd589df4bd2b645ca977822..36a8d277f564e6c73626e0ca4a90998a21daa0df 100644 (file)
@@ -19,7 +19,6 @@ import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionReadyListener;
 import org.opendaylight.openflowjava.protocol.api.connection.SwitchConnectionHandler;
 import org.opendaylight.openflowjava.protocol.impl.core.SwitchConnectionProviderImpl;
-import org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.EchoReplyInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.EchoReplyInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.EchoRequestMessage;
@@ -192,8 +191,8 @@ public class MockPlugin implements OpenflowProtocolListener, SwitchConnectionHan
         LOGGER.debug("Reason: " + notification.getReason());
         LOGGER.debug("TableId: " + notification.getTableId());
         LOGGER.debug("Cookie: " + notification.getCookie());
-        LOGGER.debug("Class: " + notification.getMatch().getMatchEntries().get(0).getOxmClass());
-        LOGGER.debug("Field: " + notification.getMatch().getMatchEntries().get(0).getOxmMatchField());
+        LOGGER.debug("Class: " + notification.getMatch().getMatchEntry().get(0).getOxmClass());
+        LOGGER.debug("Field: " + notification.getMatch().getMatchEntry().get(0).getOxmMatchField());
         LOGGER.debug("Datasize: " + notification.getData().length);
     }