Search in sources :

Example 66 with Result

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.pcrep.message.pcrep.message.replies.Result 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 67 with Result

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.pcrep.message.pcrep.message.replies.Result 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 68 with Result

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.pcrep.message.pcrep.message.replies.Result in project openflowplugin by opendaylight.

the class Nshc3CodecTest method deserializeTest.

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

Example 69 with Result

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.pcrep.message.pcrep.message.replies.Result in project openflowplugin by opendaylight.

the class Reg3CodecTest method deserializeTest.

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

Example 70 with Result

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.pcrep.message.pcrep.message.replies.Result in project openflowplugin by opendaylight.

the class UdpSrcCodecTest method deserializeTest.

@Test
public void deserializeTest() {
    createBuffer(buffer);
    input = udpSrcCodec.deserialize(buffer);
    final UdpSrcCaseValue result = (UdpSrcCaseValue) input.getMatchEntryValue();
    assertEquals(Nxm0Class.class, input.getOxmClass());
    assertEquals(NxmOfUdpSrc.class, input.getOxmMatchField());
    assertEquals(true, input.isHasMask());
    assertEquals(1, result.getUdpSrcValues().getPort().getValue().shortValue());
    assertEquals(0xffff, result.getUdpSrcValues().getMask().shortValue() & 0xffff);
}
Also used : UdpSrcCaseValue(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.UdpSrcCaseValue) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)384 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)212 ArrayList (java.util.ArrayList)136 ExecutionException (java.util.concurrent.ExecutionException)134 ByteBuf (io.netty.buffer.ByteBuf)115 AttributesBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder)51 Collections (java.util.Collections)50 ObjectHeaderImpl (org.opendaylight.protocol.pcep.spi.ObjectHeaderImpl)47 List (java.util.List)39 RouteAttributeContainer (org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.RouteAttributeContainer)39 Statement (org.opendaylight.yang.gen.v1.http.openconfig.net.yang.routing.policy.rev151009.routing.policy.top.routing.policy.policy.definitions.policy.definition.statements.Statement)39 Uuid (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid)33 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)31 BigInteger (java.math.BigInteger)28 AllocateIdInput (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.AllocateIdInput)28 AllocateIdInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.AllocateIdInputBuilder)28 AllocateIdOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.AllocateIdOutput)27 InstanceIdentifier (org.opendaylight.yangtools.yang.binding.InstanceIdentifier)26 CommitInfo (org.opendaylight.mdsal.common.api.CommitInfo)25 IPV4UNICAST (org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.IPV4UNICAST)25