Search in sources :

Example 1 with InstructionScheduler

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);
}
Also used : PcepTopologyTypeConfig(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.config.rev171025.PcepTopologyTypeConfig) SessionConfig(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.config.rev171025.pcep.config.SessionConfig) InstructionScheduler(org.opendaylight.bgpcep.programming.spi.InstructionScheduler) TopologyId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId)

Aggregations

InstructionScheduler (org.opendaylight.bgpcep.programming.spi.InstructionScheduler)1 SessionConfig (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.config.rev171025.pcep.config.SessionConfig)1 PcepTopologyTypeConfig (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.config.rev171025.PcepTopologyTypeConfig)1 TopologyId (org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId)1