Search in sources :

Example 6 with PCEPStatefulCapability

use of org.opendaylight.protocol.pcep.ietf.stateful.PCEPStatefulCapability in project bgpcep by opendaylight.

the class PCCIncrementalSyncTest method getCapabilities.

@Override
protected List<PCEPCapability> getCapabilities() {
    final List<PCEPCapability> caps = new ArrayList<>();
    caps.add(new PCEPStatefulCapability(true, true, true, false, false, true, true));
    return caps;
}
Also used : PCEPStatefulCapability(org.opendaylight.protocol.pcep.ietf.stateful.PCEPStatefulCapability) ArrayList(java.util.ArrayList) PCEPCapability(org.opendaylight.protocol.pcep.PCEPCapability)

Example 7 with PCEPStatefulCapability

use of org.opendaylight.protocol.pcep.ietf.stateful.PCEPStatefulCapability in project bgpcep by opendaylight.

the class PCEPStatefulCapabilityTest method testPCEPStatefulCapability.

@Test
public void testPCEPStatefulCapability() {
    final PCEPStatefulCapability sspf = new PCEPStatefulCapability(true, true, true, true, false, true, false);
    assertTrue(sspf.isActive());
    assertTrue(sspf.isInstant());
    assertTrue(sspf.isStateful());
    assertFalse(sspf.isTriggeredResync());
    assertTrue(sspf.isTriggeredSync());
    assertTrue(sspf.isDeltaLspSync());
    assertTrue(sspf.isIncludeDbVersion());
    final TlvsBuilder builder = new TlvsBuilder();
    sspf.setCapabilityProposal(null, builder);
    assertEquals(EXPECTED_TLVS, builder.build());
}
Also used : PCEPStatefulCapability(org.opendaylight.protocol.pcep.ietf.stateful.PCEPStatefulCapability) TlvsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.open.TlvsBuilder) Test(org.junit.Test)

Aggregations

PCEPStatefulCapability (org.opendaylight.protocol.pcep.ietf.stateful.PCEPStatefulCapability)7 ArrayList (java.util.ArrayList)6 PCEPCapability (org.opendaylight.protocol.pcep.PCEPCapability)6 NioEventLoopGroup (io.netty.channel.nio.NioEventLoopGroup)1 InetSocketAddress (java.net.InetSocketAddress)1 Test (org.junit.Test)1 PCEPSessionProposalFactory (org.opendaylight.protocol.pcep.PCEPSessionProposalFactory)1 BasePCEPSessionProposalFactory (org.opendaylight.protocol.pcep.impl.BasePCEPSessionProposalFactory)1 DefaultPCEPSessionNegotiatorFactory (org.opendaylight.protocol.pcep.impl.DefaultPCEPSessionNegotiatorFactory)1 PCEPDispatcherImpl (org.opendaylight.protocol.pcep.impl.PCEPDispatcherImpl)1 MessageRegistry (org.opendaylight.protocol.pcep.spi.MessageRegistry)1 PCEPExtensionConsumerContext (org.opendaylight.protocol.pcep.spi.PCEPExtensionConsumerContext)1 TlvsBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.open.TlvsBuilder)1