Search in sources :

Example 26 with VersionConvertorData

use of org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData in project openflowplugin by opendaylight.

the class MatchConvertorTest method testTunnelIpv4MatchConversion.

@Test
public void testTunnelIpv4MatchConversion() {
    MatchBuilder builder = new MatchBuilder();
    TunnelIpv4MatchBuilder tunnelIpv4MatchBuilder = new TunnelIpv4MatchBuilder();
    tunnelIpv4MatchBuilder.setTunnelIpv4Source(new Ipv4Prefix("10.0.0.1/32"));
    tunnelIpv4MatchBuilder.setTunnelIpv4Destination(new Ipv4Prefix("10.0.0.2/32"));
    builder.setLayer3Match(tunnelIpv4MatchBuilder.build());
    Match match = builder.build();
    Optional<List<MatchEntry>> entriesOptional = converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
    List<MatchEntry> entries = entriesOptional.get();
    Assert.assertEquals("Wrong entries size", 2, entries.size());
    MatchEntry entry = entries.get(0);
    checkEntryHeader(entry, Ipv4Src.class, false);
    Assert.assertEquals("Wrong ipv4 tunnel src", "10.0.0.1", ((Ipv4SrcCase) entry.getMatchEntryValue()).getIpv4Src().getIpv4Address().getValue());
    entry = entries.get(1);
    checkEntryHeader(entry, Ipv4Dst.class, false);
    Assert.assertEquals("Wrong ipv4 tunnel dst", "10.0.0.2", ((Ipv4DstCase) entry.getMatchEntryValue()).getIpv4Dst().getIpv4Address().getValue());
}
Also used : VersionConvertorData(org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData) MatchEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry) TunnelIpv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.TunnelIpv4MatchBuilder) List(java.util.List) ArpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.ArpMatchBuilder) Icmpv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv4MatchBuilder) TunnelIpv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.TunnelIpv4MatchBuilder) VlanMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.VlanMatchBuilder) EthernetMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder) Ipv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4MatchBuilder) Ipv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv6MatchBuilder) IpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.IpMatchBuilder) Icmpv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder) SctpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.SctpMatchBuilder) UdpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.UdpMatchBuilder) TcpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.TcpMatchBuilder) MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder) Ipv4Prefix(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix) Match(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.Match) Test(org.junit.Test)

Example 27 with VersionConvertorData

use of org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData in project openflowplugin by opendaylight.

the class MatchConvertorTest method testIpv6MatchConversion.

@Test
public void testIpv6MatchConversion() {
    Ipv6MatchBuilder ipv6Builder = new Ipv6MatchBuilder();
    ipv6Builder.setIpv6Source(new Ipv6Prefix("::1/128"));
    ipv6Builder.setIpv6Destination(new Ipv6Prefix("::2/128"));
    Ipv6LabelBuilder ipv6LabelBuilder = new Ipv6LabelBuilder();
    ipv6LabelBuilder.setIpv6Flabel(new Ipv6FlowLabel(3L));
    ipv6Builder.setIpv6Label(ipv6LabelBuilder.build());
    ipv6Builder.setIpv6NdTarget(new Ipv6Address("::4"));
    ipv6Builder.setIpv6NdSll(new MacAddress("00:00:00:00:00:05"));
    ipv6Builder.setIpv6NdTll(new MacAddress("00:00:00:00:00:06"));
    Ipv6ExtHeaderBuilder extHdrBuilder = new Ipv6ExtHeaderBuilder();
    extHdrBuilder.setIpv6Exthdr(153);
    ipv6Builder.setIpv6ExtHeader(extHdrBuilder.build());
    MatchBuilder builder = new MatchBuilder();
    builder.setLayer3Match(ipv6Builder.build());
    Match match = builder.build();
    Optional<List<MatchEntry>> entriesOptional = converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
    List<MatchEntry> entries = entriesOptional.get();
    Assert.assertEquals("Wrong entries size", 7, entries.size());
    MatchEntry entry = entries.get(0);
    /* Due to conversion ambiguities, we always get "has mask" because
         * an ip with no mask and prefix with /128 (or 32 in v4) cannot
         * be distinguished */
    checkEntryHeader(entry, Ipv6Src.class, true);
    Assert.assertEquals("Wrong ipv6 src", "::1", ((Ipv6SrcCase) entry.getMatchEntryValue()).getIpv6Src().getIpv6Address().getValue());
    entry = entries.get(1);
    checkEntryHeader(entry, Ipv6Dst.class, true);
    Assert.assertEquals("Wrong ipv6 dst", "::2", ((Ipv6DstCase) entry.getMatchEntryValue()).getIpv6Dst().getIpv6Address().getValue());
    entry = entries.get(2);
    checkEntryHeader(entry, Ipv6Flabel.class, false);
    Assert.assertEquals("Wrong ipv6 flabel", 3, ((Ipv6FlabelCase) entry.getMatchEntryValue()).getIpv6Flabel().getIpv6Flabel().getValue().intValue());
    entry = entries.get(3);
    checkEntryHeader(entry, Ipv6NdTarget.class, false);
    Assert.assertEquals("Wrong ipv6 nd target", "::4", ((Ipv6NdTargetCase) entry.getMatchEntryValue()).getIpv6NdTarget().getIpv6Address().getValue());
    entry = entries.get(4);
    checkEntryHeader(entry, Ipv6NdSll.class, false);
    Assert.assertEquals("Wrong ipv6 nd sll", "00:00:00:00:00:05", ((Ipv6NdSllCase) entry.getMatchEntryValue()).getIpv6NdSll().getMacAddress().getValue());
    entry = entries.get(5);
    checkEntryHeader(entry, Ipv6NdTll.class, false);
    Assert.assertEquals("Wrong ipv6 nd tll", "00:00:00:00:00:06", ((Ipv6NdTllCase) entry.getMatchEntryValue()).getIpv6NdTll().getMacAddress().getValue());
    entry = entries.get(6);
    checkEntryHeader(entry, Ipv6Exthdr.class, false);
    Assert.assertEquals("Wrong ipv6 ext hdr", new Ipv6ExthdrFlags(false, true, false, true, false, true, false, true, false), ((Ipv6ExthdrCase) entry.getMatchEntryValue()).getIpv6Exthdr().getPseudoField());
}
Also used : Ipv6FlabelCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6FlabelCase) Ipv6ExthdrCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6ExthdrCase) Ipv6ExthdrFlags(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.Ipv6ExthdrFlags) MatchEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry) Ipv6FlowLabel(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6FlowLabel) MacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress) Ipv6ExtHeaderBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ipv6.match.fields.Ipv6ExtHeaderBuilder) Ipv6Prefix(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix) Match(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.Match) VersionConvertorData(org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData) List(java.util.List) Ipv6LabelBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ipv6.match.fields.Ipv6LabelBuilder) Ipv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv6MatchBuilder) ArpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.ArpMatchBuilder) Icmpv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv4MatchBuilder) TunnelIpv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.TunnelIpv4MatchBuilder) VlanMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.VlanMatchBuilder) EthernetMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder) Ipv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4MatchBuilder) Ipv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv6MatchBuilder) IpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.IpMatchBuilder) Icmpv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder) SctpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.SctpMatchBuilder) UdpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.UdpMatchBuilder) TcpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.TcpMatchBuilder) MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder) Ipv6Address(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address) Test(org.junit.Test)

Example 28 with VersionConvertorData

use of org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData in project openflowplugin by opendaylight.

the class MatchConvertorTest method testConversionWithMasks.

@Test
public void testConversionWithMasks() {
    MatchBuilder builder = new MatchBuilder();
    MetadataBuilder metadataBuilder = new MetadataBuilder();
    metadataBuilder.setMetadata(new BigInteger("3"));
    metadataBuilder.setMetadataMask(new BigInteger("15"));
    builder.setMetadata(metadataBuilder.build());
    EthernetMatchBuilder ethernetBuilder = new EthernetMatchBuilder();
    EthernetSourceBuilder ethSrcBuilder = new EthernetSourceBuilder();
    ethSrcBuilder.setAddress(new MacAddress("00:00:00:00:00:05"));
    ethSrcBuilder.setMask(new MacAddress("00:00:00:00:00:08"));
    ethernetBuilder.setEthernetSource(ethSrcBuilder.build());
    EthernetDestinationBuilder ethDstBuilder = new EthernetDestinationBuilder();
    ethDstBuilder.setAddress(new MacAddress("00:00:00:00:00:06"));
    ethDstBuilder.setMask(new MacAddress("00:00:00:00:00:09"));
    ethernetBuilder.setEthernetDestination(ethDstBuilder.build());
    builder.setEthernetMatch(ethernetBuilder.build());
    VlanMatchBuilder vlanBuilder = new VlanMatchBuilder();
    VlanIdBuilder vlanIdBuilder = new VlanIdBuilder();
    vlanIdBuilder.setVlanId(new VlanId(0));
    vlanIdBuilder.setVlanIdPresent(true);
    vlanBuilder.setVlanId(vlanIdBuilder.build());
    builder.setVlanMatch(vlanBuilder.build());
    ProtocolMatchFieldsBuilder protoBuilder = new ProtocolMatchFieldsBuilder();
    PbbBuilder pbbBuilder = new PbbBuilder();
    pbbBuilder.setPbbIsid(20L);
    pbbBuilder.setPbbMask(8L);
    protoBuilder.setPbb(pbbBuilder.build());
    builder.setProtocolMatchFields(protoBuilder.build());
    TunnelBuilder tunnelBuilder = new TunnelBuilder();
    tunnelBuilder.setTunnelId(new BigInteger("21"));
    tunnelBuilder.setTunnelMask(new BigInteger("14"));
    builder.setTunnel(tunnelBuilder.build());
    Ipv4MatchBuilder ipv4MatchBuilder = new Ipv4MatchBuilder();
    ipv4MatchBuilder.setIpv4Source(new Ipv4Prefix("10.0.0.0/24"));
    ipv4MatchBuilder.setIpv4Destination(new Ipv4Prefix("10.0.0.0/8"));
    builder.setLayer3Match(ipv4MatchBuilder.build());
    Match match = builder.build();
    Optional<List<MatchEntry>> entriesOptional = converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
    List<MatchEntry> entries = entriesOptional.get();
    Assert.assertEquals("Wrong entries size", 8, entries.size());
    MatchEntry entry = entries.get(0);
    checkEntryHeader(entry, Metadata.class, true);
    Assert.assertArrayEquals("Wrong metadata", new byte[] { 0, 0, 0, 0, 0, 0, 0, 3 }, ((MetadataCase) entry.getMatchEntryValue()).getMetadata().getMetadata());
    Assert.assertArrayEquals("Wrong metadata mask", new byte[] { 0, 0, 0, 0, 0, 0, 0, 15 }, ((MetadataCase) entry.getMatchEntryValue()).getMetadata().getMask());
    entry = entries.get(1);
    checkEntryHeader(entry, EthDst.class, true);
    Assert.assertEquals("Wrong eth dst", new MacAddress("00:00:00:00:00:06"), ((EthDstCase) entry.getMatchEntryValue()).getEthDst().getMacAddress());
    Assert.assertArrayEquals("Wrong eth dst mask", new byte[] { 0, 0, 0, 0, 0, 9 }, ((EthDstCase) entry.getMatchEntryValue()).getEthDst().getMask());
    entry = entries.get(2);
    checkEntryHeader(entry, EthSrc.class, true);
    Assert.assertEquals("Wrong eth src", new MacAddress("00:00:00:00:00:05"), ((EthSrcCase) entry.getMatchEntryValue()).getEthSrc().getMacAddress());
    Assert.assertArrayEquals("Wrong eth src mask", new byte[] { 0, 0, 0, 0, 0, 8 }, ((EthSrcCase) entry.getMatchEntryValue()).getEthSrc().getMask());
    entry = entries.get(3);
    checkEntryHeader(entry, VlanVid.class, true);
    Assert.assertEquals("Wrong vlan id", 0, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().getVlanVid().intValue());
    Assert.assertEquals("Wrong cfi bit", true, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().isCfiBit());
    Assert.assertArrayEquals("Wrong vlanId mask", new byte[] { 16, 0 }, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().getMask());
    entry = entries.get(4);
    checkEntryHeader(entry, Ipv4Src.class, true);
    Assert.assertEquals("Wrong ipv4 src", "10.0.0.0", ((Ipv4SrcCase) entry.getMatchEntryValue()).getIpv4Src().getIpv4Address().getValue());
    Assert.assertArrayEquals("Wrong ipv4 src mask", new byte[] { (byte) 255, (byte) 255, (byte) 255, 0 }, ((Ipv4SrcCase) entry.getMatchEntryValue()).getIpv4Src().getMask());
    entry = entries.get(5);
    checkEntryHeader(entry, Ipv4Dst.class, true);
    Assert.assertEquals("Wrong ipv4 dst", "10.0.0.0", ((Ipv4DstCase) entry.getMatchEntryValue()).getIpv4Dst().getIpv4Address().getValue());
    Assert.assertArrayEquals("Wrong ipv4 dst mask", new byte[] { (byte) 255, 0, 0, 0 }, ((Ipv4DstCase) entry.getMatchEntryValue()).getIpv4Dst().getMask());
    entry = entries.get(6);
    checkEntryHeader(entry, PbbIsid.class, true);
    Assert.assertEquals("Wrong pbb isid", 20, ((PbbIsidCase) entry.getMatchEntryValue()).getPbbIsid().getIsid().intValue());
    Assert.assertArrayEquals("Wrong pbb isid mask", new byte[] { 0, 0, 8 }, ((PbbIsidCase) entry.getMatchEntryValue()).getPbbIsid().getMask());
    entry = entries.get(7);
    checkEntryHeader(entry, TunnelId.class, true);
    Assert.assertArrayEquals("Wrong tunnel id", new byte[] { 0, 0, 0, 0, 0, 0, 0, 21 }, ((TunnelIdCase) entry.getMatchEntryValue()).getTunnelId().getTunnelId());
    Assert.assertArrayEquals("Wrong tunnel id mask", new byte[] { 0, 0, 0, 0, 0, 0, 0, 14 }, ((TunnelIdCase) entry.getMatchEntryValue()).getTunnelId().getMask());
}
Also used : TunnelIpv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.TunnelIpv4MatchBuilder) Ipv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4MatchBuilder) MatchEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry) VlanMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.VlanMatchBuilder) TunnelBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.TunnelBuilder) Ipv4SrcCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv4SrcCase) Match(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.Match) Ipv4DstCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv4DstCase) List(java.util.List) VlanIdBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.vlan.match.fields.VlanIdBuilder) Ipv4Prefix(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix) VlanId(org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId) TunnelIdCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TunnelIdCase) MetadataBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.MetadataBuilder) ProtocolMatchFieldsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.ProtocolMatchFieldsBuilder) MetadataCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MetadataCase) MacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress) EthernetMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder) EthernetDestinationBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetDestinationBuilder) VersionConvertorData(org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData) EthDstCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthDstCase) EthSrcCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthSrcCase) EthernetSourceBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetSourceBuilder) BigInteger(java.math.BigInteger) VlanVidCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanVidCase) ArpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.ArpMatchBuilder) Icmpv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv4MatchBuilder) TunnelIpv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.TunnelIpv4MatchBuilder) VlanMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.VlanMatchBuilder) EthernetMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder) Ipv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4MatchBuilder) Ipv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv6MatchBuilder) IpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.IpMatchBuilder) Icmpv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder) SctpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.SctpMatchBuilder) UdpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.UdpMatchBuilder) TcpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.TcpMatchBuilder) MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder) PbbIsidCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.PbbIsidCase) PbbBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.protocol.match.fields.PbbBuilder) Test(org.junit.Test)

Example 29 with VersionConvertorData

use of org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData in project openflowplugin by opendaylight.

the class MatchConvertorTest method testArpMatchConversion.

@Test
public void testArpMatchConversion() {
    ArpMatchBuilder arpBuilder = new ArpMatchBuilder();
    arpBuilder.setArpOp(5);
    arpBuilder.setArpSourceTransportAddress(new Ipv4Prefix("10.0.0.3/32"));
    arpBuilder.setArpTargetTransportAddress(new Ipv4Prefix("10.0.0.4/32"));
    ArpSourceHardwareAddressBuilder srcHwBuilder = new ArpSourceHardwareAddressBuilder();
    srcHwBuilder.setAddress(new MacAddress("00:00:00:00:00:05"));
    arpBuilder.setArpSourceHardwareAddress(srcHwBuilder.build());
    ArpTargetHardwareAddressBuilder dstHwBuilder = new ArpTargetHardwareAddressBuilder();
    dstHwBuilder.setAddress(new MacAddress("00:00:00:00:00:06"));
    arpBuilder.setArpTargetHardwareAddress(dstHwBuilder.build());
    MatchBuilder builder = new MatchBuilder();
    builder.setLayer3Match(arpBuilder.build());
    Match match = builder.build();
    Optional<List<MatchEntry>> entriesOptional = converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
    List<MatchEntry> entries = entriesOptional.get();
    Assert.assertEquals("Wrong entries size", 5, entries.size());
    MatchEntry entry = entries.get(0);
    checkEntryHeader(entry, ArpOp.class, false);
    Assert.assertEquals("Wrong arp op", 5, ((ArpOpCase) entry.getMatchEntryValue()).getArpOp().getOpCode().intValue());
    entry = entries.get(1);
    checkEntryHeader(entry, ArpSpa.class, false);
    Assert.assertEquals("Wrong arp spa", "10.0.0.3", ((ArpSpaCase) entry.getMatchEntryValue()).getArpSpa().getIpv4Address().getValue());
    entry = entries.get(2);
    checkEntryHeader(entry, ArpTpa.class, false);
    Assert.assertEquals("Wrong arp tpa", "10.0.0.4", ((ArpTpaCase) entry.getMatchEntryValue()).getArpTpa().getIpv4Address().getValue());
    entry = entries.get(3);
    checkEntryHeader(entry, ArpSha.class, false);
    Assert.assertEquals("Wrong arp sha", "00:00:00:00:00:05", ((ArpShaCase) entry.getMatchEntryValue()).getArpSha().getMacAddress().getValue());
    entry = entries.get(4);
    checkEntryHeader(entry, ArpTha.class, false);
    Assert.assertEquals("Wrong arp tha", "00:00:00:00:00:06", ((ArpThaCase) entry.getMatchEntryValue()).getArpTha().getMacAddress().getValue());
}
Also used : VersionConvertorData(org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData) ArpSourceHardwareAddressBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.arp.match.fields.ArpSourceHardwareAddressBuilder) MatchEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry) ArpTargetHardwareAddressBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.arp.match.fields.ArpTargetHardwareAddressBuilder) List(java.util.List) MacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress) ArpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.ArpMatchBuilder) Ipv4Prefix(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix) ArpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.ArpMatchBuilder) Icmpv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv4MatchBuilder) TunnelIpv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.TunnelIpv4MatchBuilder) VlanMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.VlanMatchBuilder) EthernetMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder) Ipv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4MatchBuilder) Ipv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv6MatchBuilder) IpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.IpMatchBuilder) Icmpv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder) SctpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.SctpMatchBuilder) UdpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.UdpMatchBuilder) TcpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.TcpMatchBuilder) MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder) Match(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.Match) Test(org.junit.Test)

Example 30 with VersionConvertorData

use of org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData in project openflowplugin by opendaylight.

the class MatchConvertorTest method testConversion.

@Test
public void testConversion() {
    MatchBuilder builder = new MatchBuilder();
    builder.setInPort(new NodeConnectorId("openflow:42:1"));
    builder.setInPhyPort(new NodeConnectorId("openflow:42:2"));
    MetadataBuilder metadataBuilder = new MetadataBuilder();
    metadataBuilder.setMetadata(new BigInteger("3"));
    builder.setMetadata(metadataBuilder.build());
    EthernetMatchBuilder ethernetBuilder = new EthernetMatchBuilder();
    EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
    ethTypeBuilder.setType(new EtherType(4L));
    ethernetBuilder.setEthernetType(ethTypeBuilder.build());
    EthernetSourceBuilder ethSrcBuilder = new EthernetSourceBuilder();
    ethSrcBuilder.setAddress(new MacAddress("00:00:00:00:00:05"));
    ethernetBuilder.setEthernetSource(ethSrcBuilder.build());
    EthernetDestinationBuilder ethDstBuilder = new EthernetDestinationBuilder();
    ethDstBuilder.setAddress(new MacAddress("00:00:00:00:00:06"));
    ethernetBuilder.setEthernetDestination(ethDstBuilder.build());
    builder.setEthernetMatch(ethernetBuilder.build());
    VlanMatchBuilder vlanBuilder = new VlanMatchBuilder();
    VlanIdBuilder vlanIdBuilder = new VlanIdBuilder();
    vlanIdBuilder.setVlanId(new VlanId(7));
    vlanIdBuilder.setVlanIdPresent(true);
    vlanBuilder.setVlanId(vlanIdBuilder.build());
    vlanBuilder.setVlanPcp(new VlanPcp((short) 7));
    builder.setVlanMatch(vlanBuilder.build());
    IpMatchBuilder ipMatchBuilder = new IpMatchBuilder();
    ipMatchBuilder.setIpDscp(new Dscp((short) 8));
    ipMatchBuilder.setIpEcn((short) 9);
    ipMatchBuilder.setIpProtocol((short) 10);
    builder.setIpMatch(ipMatchBuilder.build());
    TcpMatchBuilder tcpMatchBuilder = new TcpMatchBuilder();
    tcpMatchBuilder.setTcpSourcePort(new PortNumber(11));
    tcpMatchBuilder.setTcpDestinationPort(new PortNumber(12));
    builder.setLayer4Match(tcpMatchBuilder.build());
    Icmpv4MatchBuilder icmpv4Builder = new Icmpv4MatchBuilder();
    icmpv4Builder.setIcmpv4Type((short) 13);
    icmpv4Builder.setIcmpv4Code((short) 14);
    builder.setIcmpv4Match(icmpv4Builder.build());
    Icmpv6MatchBuilder icmpv6Builder = new Icmpv6MatchBuilder();
    icmpv6Builder.setIcmpv6Type((short) 15);
    icmpv6Builder.setIcmpv6Code((short) 16);
    builder.setIcmpv6Match(icmpv6Builder.build());
    ProtocolMatchFieldsBuilder protoBuilder = new ProtocolMatchFieldsBuilder();
    protoBuilder.setMplsLabel(17L);
    protoBuilder.setMplsTc((short) 18);
    protoBuilder.setMplsBos((short) 19);
    PbbBuilder pbbBuilder = new PbbBuilder();
    pbbBuilder.setPbbIsid(20L);
    protoBuilder.setPbb(pbbBuilder.build());
    builder.setProtocolMatchFields(protoBuilder.build());
    TunnelBuilder tunnelBuilder = new TunnelBuilder();
    tunnelBuilder.setTunnelId(new BigInteger("21"));
    builder.setTunnel(tunnelBuilder.build());
    Ipv4MatchBuilder ipv4MatchBuilder = new Ipv4MatchBuilder();
    ipv4MatchBuilder.setIpv4Source(new Ipv4Prefix("10.0.0.1/32"));
    ipv4MatchBuilder.setIpv4Destination(new Ipv4Prefix("10.0.0.2/32"));
    builder.setLayer3Match(ipv4MatchBuilder.build());
    Match match = builder.build();
    Optional<List<MatchEntry>> entriesOptional = converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
    List<MatchEntry> entries = entriesOptional.get();
    Assert.assertEquals("Wrong entries size", 24, entries.size());
    MatchEntry entry = entries.get(0);
    checkEntryHeader(entry, InPort.class, false);
    Assert.assertEquals("Wrong in port", 1, ((InPortCase) entry.getMatchEntryValue()).getInPort().getPortNumber().getValue().intValue());
    entry = entries.get(1);
    checkEntryHeader(entry, InPhyPort.class, false);
    Assert.assertEquals("Wrong in phy port", 2, ((InPhyPortCase) entry.getMatchEntryValue()).getInPhyPort().getPortNumber().getValue().intValue());
    entry = entries.get(2);
    checkEntryHeader(entry, Metadata.class, false);
    Assert.assertArrayEquals("Wrong metadata", new byte[] { 0, 0, 0, 0, 0, 0, 0, 3 }, ((MetadataCase) entry.getMatchEntryValue()).getMetadata().getMetadata());
    entry = entries.get(3);
    checkEntryHeader(entry, EthDst.class, false);
    Assert.assertEquals("Wrong eth dst", new MacAddress("00:00:00:00:00:06"), ((EthDstCase) entry.getMatchEntryValue()).getEthDst().getMacAddress());
    entry = entries.get(4);
    checkEntryHeader(entry, EthSrc.class, false);
    Assert.assertEquals("Wrong eth src", new MacAddress("00:00:00:00:00:05"), ((EthSrcCase) entry.getMatchEntryValue()).getEthSrc().getMacAddress());
    entry = entries.get(5);
    checkEntryHeader(entry, EthType.class, false);
    Assert.assertEquals("Wrong eth type", 4, ((EthTypeCase) entry.getMatchEntryValue()).getEthType().getEthType().getValue().intValue());
    entry = entries.get(6);
    checkEntryHeader(entry, VlanVid.class, false);
    Assert.assertEquals("Wrong vlan id", 7, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().getVlanVid().intValue());
    Assert.assertEquals("Wrong cfi bit", true, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().isCfiBit());
    entry = entries.get(7);
    checkEntryHeader(entry, org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.VlanPcp.class, false);
    Assert.assertEquals("Wrong vlan pcp", 7, ((VlanPcpCase) entry.getMatchEntryValue()).getVlanPcp().getVlanPcp().intValue());
    entry = entries.get(8);
    checkEntryHeader(entry, IpDscp.class, false);
    Assert.assertEquals("Wrong ip dscp", 8, ((IpDscpCase) entry.getMatchEntryValue()).getIpDscp().getDscp().getValue().intValue());
    entry = entries.get(9);
    checkEntryHeader(entry, IpEcn.class, false);
    Assert.assertEquals("Wrong ip ecn", 9, ((IpEcnCase) entry.getMatchEntryValue()).getIpEcn().getEcn().intValue());
    entry = entries.get(10);
    checkEntryHeader(entry, IpProto.class, false);
    Assert.assertEquals("Wrong ip proto", 10, ((IpProtoCase) entry.getMatchEntryValue()).getIpProto().getProtocolNumber().intValue());
    entry = entries.get(11);
    checkEntryHeader(entry, TcpSrc.class, false);
    Assert.assertEquals("Wrong tcp src", 11, ((TcpSrcCase) entry.getMatchEntryValue()).getTcpSrc().getPort().getValue().intValue());
    entry = entries.get(12);
    checkEntryHeader(entry, TcpDst.class, false);
    Assert.assertEquals("Wrong tcp dst", 12, ((TcpDstCase) entry.getMatchEntryValue()).getTcpDst().getPort().getValue().intValue());
    entry = entries.get(13);
    checkEntryHeader(entry, Icmpv4Type.class, false);
    Assert.assertEquals("Wrong icmpv4 type", 13, ((Icmpv4TypeCase) entry.getMatchEntryValue()).getIcmpv4Type().getIcmpv4Type().intValue());
    entry = entries.get(14);
    checkEntryHeader(entry, Icmpv4Code.class, false);
    Assert.assertEquals("Wrong icmpv4 code", 14, ((Icmpv4CodeCase) entry.getMatchEntryValue()).getIcmpv4Code().getIcmpv4Code().intValue());
    entry = entries.get(15);
    checkEntryHeader(entry, Icmpv6Type.class, false);
    Assert.assertEquals("Wrong icmpv6 type", 15, ((Icmpv6TypeCase) entry.getMatchEntryValue()).getIcmpv6Type().getIcmpv6Type().intValue());
    entry = entries.get(16);
    checkEntryHeader(entry, Icmpv6Code.class, false);
    Assert.assertEquals("Wrong icmpv6 code", 16, ((Icmpv6CodeCase) entry.getMatchEntryValue()).getIcmpv6Code().getIcmpv6Code().intValue());
    entry = entries.get(17);
    checkEntryHeader(entry, Ipv4Src.class, false);
    Assert.assertEquals("Wrong ipv4 src", "10.0.0.1", ((Ipv4SrcCase) entry.getMatchEntryValue()).getIpv4Src().getIpv4Address().getValue());
    entry = entries.get(18);
    checkEntryHeader(entry, Ipv4Dst.class, false);
    Assert.assertEquals("Wrong ipv4 dst", "10.0.0.2", ((Ipv4DstCase) entry.getMatchEntryValue()).getIpv4Dst().getIpv4Address().getValue());
    entry = entries.get(19);
    checkEntryHeader(entry, MplsLabel.class, false);
    Assert.assertEquals("Wrong mpls label", 17, ((MplsLabelCase) entry.getMatchEntryValue()).getMplsLabel().getMplsLabel().intValue());
    entry = entries.get(20);
    checkEntryHeader(entry, MplsBos.class, false);
    Assert.assertEquals("Wrong mpls bos", true, ((MplsBosCase) entry.getMatchEntryValue()).getMplsBos().isBos());
    entry = entries.get(21);
    checkEntryHeader(entry, MplsTc.class, false);
    Assert.assertEquals("Wrong mpls tc", 18, ((MplsTcCase) entry.getMatchEntryValue()).getMplsTc().getTc().intValue());
    entry = entries.get(22);
    checkEntryHeader(entry, PbbIsid.class, false);
    Assert.assertEquals("Wrong pbb isid", 20, ((PbbIsidCase) entry.getMatchEntryValue()).getPbbIsid().getIsid().intValue());
    entry = entries.get(23);
    checkEntryHeader(entry, TunnelId.class, false);
    Assert.assertArrayEquals("Wrong tunnel id", new byte[] { 0, 0, 0, 0, 0, 0, 0, 21 }, ((TunnelIdCase) entry.getMatchEntryValue()).getTunnelId().getTunnelId());
}
Also used : TunnelIpv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.TunnelIpv4MatchBuilder) Ipv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4MatchBuilder) MatchEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry) EthernetTypeBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetTypeBuilder) MplsBosCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MplsBosCase) NodeConnectorId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId) EtherType(org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.EtherType) VlanMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.VlanMatchBuilder) TunnelBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.TunnelBuilder) Match(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.Match) TcpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.TcpMatchBuilder) Icmpv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv4MatchBuilder) EthTypeCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthTypeCase) List(java.util.List) VlanIdBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.vlan.match.fields.VlanIdBuilder) Icmpv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder) Ipv4Prefix(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix) VlanId(org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId) IpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.IpMatchBuilder) InPortCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPortCase) TunnelIdCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TunnelIdCase) MetadataBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.MetadataBuilder) ProtocolMatchFieldsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.ProtocolMatchFieldsBuilder) MetadataCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MetadataCase) TcpSrcCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TcpSrcCase) IpDscpCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.IpDscpCase) MacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress) EthernetMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder) TcpDstCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TcpDstCase) EthernetDestinationBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetDestinationBuilder) VersionConvertorData(org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData) EthDstCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthDstCase) EthSrcCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthSrcCase) EthernetSourceBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetSourceBuilder) VlanPcp(org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanPcp) BigInteger(java.math.BigInteger) InPhyPortCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPhyPortCase) VlanVidCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanVidCase) Dscp(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Dscp) IpDscp(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.IpDscp) PortNumber(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber) ArpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.ArpMatchBuilder) Icmpv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv4MatchBuilder) TunnelIpv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.TunnelIpv4MatchBuilder) VlanMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.VlanMatchBuilder) EthernetMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder) Ipv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4MatchBuilder) Ipv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv6MatchBuilder) IpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.IpMatchBuilder) Icmpv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder) SctpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.SctpMatchBuilder) UdpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.UdpMatchBuilder) TcpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.TcpMatchBuilder) MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder) PbbBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.protocol.match.fields.PbbBuilder) Test(org.junit.Test)

Aggregations

VersionConvertorData (org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData)38 Test (org.junit.Test)33 List (java.util.List)25 ArrayList (java.util.ArrayList)19 Match (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.Match)15 MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder)15 EthernetMatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder)14 Icmpv4MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv4MatchBuilder)14 IpMatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.IpMatchBuilder)14 VlanMatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.VlanMatchBuilder)14 Ipv4MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4MatchBuilder)14 TcpMatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.TcpMatchBuilder)14 UdpMatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.UdpMatchBuilder)14 Icmpv6MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder)13 ArpMatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.ArpMatchBuilder)13 Ipv6MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv6MatchBuilder)13 TunnelIpv4MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.TunnelIpv4MatchBuilder)13 SctpMatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.SctpMatchBuilder)13 MatchEntry (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry)13 MacAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress)6