Search in sources :

Example 81 with Ipv6Address

use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address in project netvirt by opendaylight.

the class VirtualPort method getIpv6Addresses.

@Override
public List<Ipv6Address> getIpv6Addresses() {
    List<Ipv6Address> ipv6AddrList = snetInfo.values().stream().flatMap(subnetInfo -> Stream.of(subnetInfo.getIpAddr().getIpv6Address())).collect(Collectors.toList());
    if (deviceOwner.equalsIgnoreCase(Ipv6Constants.NETWORK_ROUTER_INTERFACE)) {
        Ipv6Address llAddr = Ipv6ServiceUtils.getIpv6LinkLocalAddressFromMac(new MacAddress(macAddress));
        ipv6AddrList.add(llAddr);
    }
    return ipv6AddrList;
}
Also used : Timeout(io.netty.util.Timeout) Logger(org.slf4j.Logger) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) IVirtualPort(org.opendaylight.netvirt.ipv6service.api.IVirtualPort) LoggerFactory(org.slf4j.LoggerFactory) Ipv6Constants(org.opendaylight.netvirt.ipv6service.utils.Ipv6Constants) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) Collectors(java.util.stream.Collectors) Ipv6PeriodicTimer(org.opendaylight.netvirt.ipv6service.utils.Ipv6PeriodicTimer) ArrayList(java.util.ArrayList) ConcurrentMap(java.util.concurrent.ConcurrentMap) List(java.util.List) Stream(java.util.stream.Stream) Ipv6ServiceUtils(org.opendaylight.netvirt.ipv6service.utils.Ipv6ServiceUtils) IpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress) BigInteger(java.math.BigInteger) Ipv6PeriodicTrQueue(org.opendaylight.netvirt.ipv6service.utils.Ipv6PeriodicTrQueue) MacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress) Ipv6Address(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address) MacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress) Ipv6Address(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address)

Example 82 with Ipv6Address

use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address in project netvirt by opendaylight.

the class NeutronvpnUtils method getIpv6LinkLocalAddressFromMac.

protected static IpAddress getIpv6LinkLocalAddressFromMac(MacAddress mac) {
    byte[] octets = bytesFromHexString(mac.getValue());
    /* As per the RFC2373, steps involved to generate a LLA include
           1. Convert the 48 bit MAC address to 64 bit value by inserting 0xFFFE
              between OUI and NIC Specific part.
           2. Invert the Universal/Local flag in the OUI portion of the address.
           3. Use the prefix "FE80::/10" along with the above 64 bit Interface
              identifier to generate the IPv6 LLA. */
    StringBuffer interfaceID = new StringBuffer();
    short u8byte = (short) (octets[0] & 0xff);
    u8byte ^= 1 << 1;
    interfaceID.append(Integer.toHexString(0xFF & u8byte));
    interfaceID.append(StringUtils.leftPad(Integer.toHexString(0xFF & octets[1]), 2, "0"));
    interfaceID.append(":");
    interfaceID.append(Integer.toHexString(0xFF & octets[2]));
    interfaceID.append("ff:fe");
    interfaceID.append(StringUtils.leftPad(Integer.toHexString(0xFF & octets[3]), 2, "0"));
    interfaceID.append(":");
    interfaceID.append(Integer.toHexString(0xFF & octets[4]));
    interfaceID.append(StringUtils.leftPad(Integer.toHexString(0xFF & octets[5]), 2, "0"));
    Ipv6Address ipv6LLA = new Ipv6Address("fe80:0:0:0:" + interfaceID.toString());
    IpAddress ipAddress = new IpAddress(ipv6LLA.getValue().toCharArray());
    return ipAddress;
}
Also used : IpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress) Ipv6Address(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address)

Example 83 with Ipv6Address

use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address 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 84 with Ipv6Address

use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address in project openflowplugin by opendaylight.

the class OF13MatchSerializerTest method testIpv6Incorrect.

/**
 * Test for correct serialization of incorrect Ipv6Address match entry.
 */
@Test(expected = IllegalArgumentException.class)
public void testIpv6Incorrect() {
    MatchBuilder builder = new MatchBuilder();
    builder.setType(OxmMatchType.class);
    final List<MatchEntry> entries = new ArrayList<>();
    // ipv6 match entry with incorrect Ipv6 address
    MatchEntryBuilder entriesBuilder = new MatchEntryBuilder();
    entriesBuilder.setOxmClass(OpenflowBasicClass.class);
    entriesBuilder.setOxmMatchField(Ipv6Src.class);
    entriesBuilder.setHasMask(false);
    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.setMatchEntry(entries);
    Match match = builder.build();
    ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();
    matchSerializer.serialize(match, out);
}
Also used : MatchEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry) MatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder) Ipv6SrcBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.src._case.Ipv6SrcBuilder) ArrayList(java.util.ArrayList) ByteBuf(io.netty.buffer.ByteBuf) MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.MatchBuilder) Ipv6SrcCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6SrcCaseBuilder) Ipv6Address(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address) Match(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match) Test(org.junit.Test)

Example 85 with Ipv6Address

use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address in project openflowplugin by opendaylight.

the class OF13MatchSerializerTest method testIpv6Various.

/**
 * Test for correct serialization of Ipv6Address match entry.
 */
@Test
public void testIpv6Various() {
    MatchBuilder builder = new MatchBuilder();
    builder.setType(OxmMatchType.class);
    final List<MatchEntry> entries = new ArrayList<>();
    // ipv6 match entry with correct Ipv6 address
    MatchEntryBuilder entriesBuilder = new MatchEntryBuilder();
    entriesBuilder.setOxmClass(OpenflowBasicClass.class);
    entriesBuilder.setOxmMatchField(Ipv6Src.class);
    entriesBuilder.setHasMask(false);
    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 MatchEntryBuilder();
    entriesBuilder.setOxmClass(OpenflowBasicClass.class);
    entriesBuilder.setOxmMatchField(Ipv6NdTarget.class);
    entriesBuilder.setHasMask(false);
    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 MatchEntryBuilder();
    entriesBuilder.setOxmClass(OpenflowBasicClass.class);
    entriesBuilder.setOxmMatchField(Ipv6Dst.class);
    entriesBuilder.setHasMask(false);
    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 MatchEntryBuilder();
    entriesBuilder.setOxmClass(OpenflowBasicClass.class);
    entriesBuilder.setOxmMatchField(Ipv6Dst.class);
    entriesBuilder.setHasMask(false);
    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 MatchEntryBuilder();
    entriesBuilder.setOxmClass(OpenflowBasicClass.class);
    entriesBuilder.setOxmMatchField(Ipv6Dst.class);
    entriesBuilder.setHasMask(false);
    ipv6DstCaseBuilder = new Ipv6DstCaseBuilder();
    ipv6DstBuilder = new Ipv6DstBuilder();
    ipv6DstBuilder.setIpv6Address(new Ipv6Address("::"));
    ipv6DstCaseBuilder.setIpv6Dst(ipv6DstBuilder.build());
    entriesBuilder.setMatchEntryValue(ipv6DstCaseBuilder.build());
    entries.add(entriesBuilder.build());
    builder.setMatchEntry(entries);
    Match match = builder.build();
    ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();
    matchSerializer.serialize(match, out);
    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", 52, out.readUnsignedByte());
    Assert.assertEquals("Wrong entry length", 16, out.readUnsignedByte());
    Assert.assertEquals("Wrong ipv6 address", 1, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 2, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 3, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 4, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 5, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 6, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 7, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 8, out.readUnsignedShort());
    Assert.assertEquals("Wrong class", 0x8000, out.readUnsignedShort());
    Assert.assertEquals("Wrong field and mask", 62, out.readUnsignedByte());
    Assert.assertEquals("Wrong entry length", 16, out.readUnsignedByte());
    Assert.assertEquals("Wrong ipv6 address", 1, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 2, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 6, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 7, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 8, out.readUnsignedShort());
    Assert.assertEquals("Wrong class", 0x8000, out.readUnsignedShort());
    Assert.assertEquals("Wrong field and mask", 54, out.readUnsignedByte());
    Assert.assertEquals("Wrong entry length", 16, out.readUnsignedByte());
    Assert.assertEquals("Wrong ipv6 address", 1, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 8, out.readUnsignedShort());
    Assert.assertEquals("Wrong class", 0x8000, out.readUnsignedShort());
    Assert.assertEquals("Wrong field and mask", 54, out.readUnsignedByte());
    Assert.assertEquals("Wrong entry length", 16, out.readUnsignedByte());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 1, out.readUnsignedShort());
    Assert.assertEquals("Wrong class", 0x8000, out.readUnsignedShort());
    Assert.assertEquals("Wrong field and mask", 54, out.readUnsignedByte());
    Assert.assertEquals("Wrong entry length", 16, out.readUnsignedByte());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
    Assert.assertEquals("Wrong ipv6 address", 0, out.readUnsignedShort());
}
Also used : Ipv6NdTargetBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.nd.target._case.Ipv6NdTargetBuilder) MatchEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry) ArrayList(java.util.ArrayList) Ipv6NdTargetCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6NdTargetCaseBuilder) Ipv6DstBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.dst._case.Ipv6DstBuilder) ByteBuf(io.netty.buffer.ByteBuf) Ipv6SrcCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6SrcCaseBuilder) Match(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match) MatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder) Ipv6SrcBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.src._case.Ipv6SrcBuilder) MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.MatchBuilder) Ipv6Address(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address) Ipv6DstCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6DstCaseBuilder) Test(org.junit.Test)

Aggregations

Ipv6Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address)83 Test (org.junit.Test)67 IpAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress)23 ByteBuf (io.netty.buffer.ByteBuf)21 ArrayList (java.util.ArrayList)21 IPv6Address (com.googlecode.ipv6.IPv6Address)18 MacAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress)17 BigInteger (java.math.BigInteger)16 Ipv6Prefix (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix)16 MatchEntry (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry)15 Ipv4Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address)14 MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder)13 Ipv6MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv6MatchBuilder)12 MatchEntryBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder)12 Ipv6SrcCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6SrcCaseBuilder)11 Ipv6SrcBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.src._case.Ipv6SrcBuilder)11 Ipv6DstCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6DstCaseBuilder)9 Ipv6DstBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv6.dst._case.Ipv6DstBuilder)9 Match (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match)9 MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.MatchBuilder)9