Search in sources :

Example 6 with PCEPCapability

use of org.opendaylight.protocol.pcep.PCEPCapability in project bgpcep by opendaylight.

the class PCCTriggeredFullDBResyncTest method getCapabilities.

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

Example 7 with PCEPCapability

use of org.opendaylight.protocol.pcep.PCEPCapability in project bgpcep by opendaylight.

the class PCCMock method main.

public static void main(final String[] args) throws InterruptedException, ExecutionException {
    Preconditions.checkArgument(args.length > 0, "Host and port of server must be provided.");
    final List<PCEPCapability> caps = new ArrayList<>();
    final PCEPSessionProposalFactory proposal = new BasePCEPSessionProposalFactory((short) 120, (short) 30, caps);
    final PCEPSessionNegotiatorFactory snf = new DefaultPCEPSessionNegotiatorFactory(proposal, 0);
    final HostAndPort serverHostAndPort = HostAndPort.fromString(args[0]);
    final InetSocketAddress serverAddr = new InetSocketAddress(serverHostAndPort.getHost(), serverHostAndPort.getPortOrDefault(12345));
    final InetSocketAddress clientAddr = InetSocketAddressUtil.getRandomLoopbackInetSocketAddress(0);
    try (PCCDispatcherImpl pccDispatcher = new PCCDispatcherImpl(ServiceLoaderPCEPExtensionProviderContext.getSingletonInstance().getMessageHandlerRegistry())) {
        pccDispatcher.createClient(serverAddr, -1, SimpleSessionListener::new, snf, KeyMapping.getKeyMapping(), clientAddr).get();
    }
}
Also used : PCCDispatcherImpl(org.opendaylight.protocol.pcep.pcc.mock.protocol.PCCDispatcherImpl) HostAndPort(com.google.common.net.HostAndPort) DefaultPCEPSessionNegotiatorFactory(org.opendaylight.protocol.pcep.impl.DefaultPCEPSessionNegotiatorFactory) InetSocketAddress(java.net.InetSocketAddress) BasePCEPSessionProposalFactory(org.opendaylight.protocol.pcep.impl.BasePCEPSessionProposalFactory) ArrayList(java.util.ArrayList) PCEPCapability(org.opendaylight.protocol.pcep.PCEPCapability) BasePCEPSessionProposalFactory(org.opendaylight.protocol.pcep.impl.BasePCEPSessionProposalFactory) PCEPSessionProposalFactory(org.opendaylight.protocol.pcep.PCEPSessionProposalFactory) DefaultPCEPSessionNegotiatorFactory(org.opendaylight.protocol.pcep.impl.DefaultPCEPSessionNegotiatorFactory) PCEPSessionNegotiatorFactory(org.opendaylight.protocol.pcep.PCEPSessionNegotiatorFactory)

Example 8 with PCEPCapability

use of org.opendaylight.protocol.pcep.PCEPCapability 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.stateful07.PCEPStatefulCapability) ArrayList(java.util.ArrayList) PCEPCapability(org.opendaylight.protocol.pcep.PCEPCapability)

Aggregations

ArrayList (java.util.ArrayList)8 PCEPCapability (org.opendaylight.protocol.pcep.PCEPCapability)8 PCEPStatefulCapability (org.opendaylight.protocol.pcep.ietf.stateful07.PCEPStatefulCapability)6 PCEPSessionProposalFactory (org.opendaylight.protocol.pcep.PCEPSessionProposalFactory)3 NioEventLoopGroup (io.netty.channel.nio.NioEventLoopGroup)2 InetSocketAddress (java.net.InetSocketAddress)2 BasePCEPSessionProposalFactory (org.opendaylight.protocol.pcep.impl.BasePCEPSessionProposalFactory)2 DefaultPCEPSessionNegotiatorFactory (org.opendaylight.protocol.pcep.impl.DefaultPCEPSessionNegotiatorFactory)2 HostAndPort (com.google.common.net.HostAndPort)1 EventLoopGroup (io.netty.channel.EventLoopGroup)1 EpollEventLoopGroup (io.netty.channel.epoll.EpollEventLoopGroup)1 Before (org.junit.Before)1 PCEPSessionNegotiatorFactory (org.opendaylight.protocol.pcep.PCEPSessionNegotiatorFactory)1 StatefulActivator (org.opendaylight.protocol.pcep.ietf.stateful07.StatefulActivator)1 PCEPDispatcherImpl (org.opendaylight.protocol.pcep.impl.PCEPDispatcherImpl)1 PCCDispatcherImpl (org.opendaylight.protocol.pcep.pcc.mock.protocol.PCCDispatcherImpl)1 MessageRegistry (org.opendaylight.protocol.pcep.spi.MessageRegistry)1