Search in sources :

Example 1 with IpSrcCaseValue

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IpSrcCaseValue in project openflowplugin by opendaylight.

the class IpSrcCodecTest method deserializeTest.

@Test
public void deserializeTest() {
    createBuffer(buffer);
    input = ipSrcCodec.deserialize(buffer);
    final IpSrcCaseValue result = (IpSrcCaseValue) input.getMatchEntryValue();
    assertEquals(Nxm0Class.class, input.getOxmClass());
    assertEquals(NxmOfIpSrc.class, input.getOxmMatchField());
    assertEquals(false, input.isHasMask());
    assertEquals(2, result.getIpSrcValues().getValue().intValue());
}
Also used : IpSrcCaseValue(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IpSrcCaseValue) Test(org.junit.Test)

Example 2 with IpSrcCaseValue

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IpSrcCaseValue in project openflowplugin by opendaylight.

the class Ipv6SrcCodecTest method deserializeTest.

@Test
public void deserializeTest() {
    createBuffer(buffer);
    input = ipv6SrcCodec.deserialize(buffer);
    final IpSrcCaseValue result = (IpSrcCaseValue) input.getMatchEntryValue();
    assertEquals(Nxm1Class.class, input.getOxmClass());
    assertEquals(NxmOfIpSrc.class, input.getOxmMatchField());
    assertEquals(false, input.isHasMask());
    assertEquals(2, result.getIpSrcValues().getValue().intValue());
}
Also used : IpSrcCaseValue(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IpSrcCaseValue) Test(org.junit.Test)

Example 3 with IpSrcCaseValue

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IpSrcCaseValue in project openflowplugin by opendaylight.

the class Ipv6SrcCodec method serialize.

@Override
public void serialize(MatchEntry input, ByteBuf outBuffer) {
    serializeHeader(input, outBuffer);
    IpSrcCaseValue ipSrcCase = (IpSrcCaseValue) input.getMatchEntryValue();
    outBuffer.writeInt(ipSrcCase.getIpSrcValues().getValue().intValue());
}
Also used : IpSrcCaseValue(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IpSrcCaseValue)

Example 4 with IpSrcCaseValue

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IpSrcCaseValue in project openflowplugin by opendaylight.

the class IpSrcCodec method serialize.

@Override
public void serialize(MatchEntry input, ByteBuf outBuffer) {
    serializeHeader(input, outBuffer);
    IpSrcCaseValue ipSrcCase = (IpSrcCaseValue) input.getMatchEntryValue();
    outBuffer.writeInt(ipSrcCase.getIpSrcValues().getValue().intValue());
}
Also used : IpSrcCaseValue(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IpSrcCaseValue)

Aggregations

IpSrcCaseValue (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IpSrcCaseValue)4 Test (org.junit.Test)2