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;
}
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();
}
}
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;
}
Aggregations