use of org.opendaylight.bgpcep.programming.spi.InstructionScheduler in project bgpcep by opendaylight.
the class PCEPTopologyDeployerImpl method createTopologyProvider.
private synchronized void createTopologyProvider(final Topology topology) {
if (!filterPcepTopologies(topology.getTopologyTypes())) {
return;
}
final TopologyId topologyId = topology.getTopologyId();
if (this.pcepTopologyServices.containsKey(topology.getTopologyId())) {
LOG.warn("Topology Provider {} already exist. New instance won't be created", topologyId);
return;
}
LOG.info("Creating Topology {}", topologyId);
LOG.trace("Topology {}.", topology);
final SessionConfig config = topology.getAugmentation(PcepTopologyTypeConfig.class).getSessionConfig();
final InstructionScheduler instructionScheduler = this.instructionSchedulerFactory.createInstructionScheduler(topologyId.getValue());
final PCEPTopologyConfiguration dependencies = new PCEPTopologyConfiguration(config, topology);
final PCEPTopologyProviderBean pcepTopologyProviderBean = (PCEPTopologyProviderBean) this.container.getComponentInstance(PCEPTopologyProviderBean.class.getSimpleName());
this.pcepTopologyServices.put(topologyId, pcepTopologyProviderBean);
pcepTopologyProviderBean.start(dependencies, instructionScheduler);
}
Aggregations