Search in sources :

Example 11 with FlowResourcesManager

use of org.openkilda.wfm.share.flow.resources.FlowResourcesManager in project open-kilda by telstra.

the class YFlowDeleteHubBolt method init.

@Override
protected void init() {
    FlowResourcesManager resourcesManager = new FlowResourcesManager(persistenceManager, flowResourcesConfig);
    RuleManager ruleManager = new RuleManagerImpl(ruleManagerConfig);
    flowDeleteService = new FlowDeleteService(new FlowDeleteHubCarrierIsolatingResponsesAndLifecycleEvents(this), persistenceManager, resourcesManager, yFlowDeleteConfig.getSpeakerCommandRetriesLimit());
    yFlowDeleteService = new YFlowDeleteService(this, persistenceManager, resourcesManager, ruleManager, flowDeleteService, yFlowDeleteConfig.getSpeakerCommandRetriesLimit());
}
Also used : RuleManager(org.openkilda.rulemanager.RuleManager) FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager) FlowDeleteService(org.openkilda.wfm.topology.flowhs.service.FlowDeleteService) YFlowDeleteService(org.openkilda.wfm.topology.flowhs.service.yflow.YFlowDeleteService) YFlowDeleteService(org.openkilda.wfm.topology.flowhs.service.yflow.YFlowDeleteService) RuleManagerImpl(org.openkilda.rulemanager.RuleManagerImpl)

Example 12 with FlowResourcesManager

use of org.openkilda.wfm.share.flow.resources.FlowResourcesManager in project open-kilda by telstra.

the class AbstractFlowTest method before.

@Before
public void before() {
    dummyFactory = new PersistenceDummyEntityFactory(persistenceManager);
    FlowResourcesConfig resourceConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
    flowResourcesManager = spy(new FlowResourcesManager(persistenceManager, resourceConfig));
    alterFeatureToggles(true, true, true);
    dummyFactory.makeSwitch(SWITCH_SOURCE);
    dummyFactory.makeSwitch(SWITCH_DEST);
    dummyFactory.makeSwitch(SWITCH_TRANSIT);
    for (IslDirectionalReference reference : new IslDirectionalReference[] { islSourceDest, islSourceDestAlt, islSourceTransit, islTransitDest }) {
        dummyFactory.makeIsl(reference.getSourceEndpoint(), reference.getDestEndpoint());
        dummyFactory.makeIsl(reference.getDestEndpoint(), reference.getSourceEndpoint());
    }
}
Also used : FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) PersistenceDummyEntityFactory(org.openkilda.persistence.dummy.PersistenceDummyEntityFactory) IslDirectionalReference(org.openkilda.persistence.dummy.IslDirectionalReference) FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager) Before(org.junit.Before)

Example 13 with FlowResourcesManager

use of org.openkilda.wfm.share.flow.resources.FlowResourcesManager in project open-kilda by telstra.

the class SpeakerFlowSegmentRequestBuilderTest method setUp.

@Before
public void setUp() {
    FlowResourcesManager resourcesManager = new FlowResourcesManager(persistenceManager, configurationProvider.getConfiguration(FlowResourcesConfig.class));
    target = new SpeakerFlowSegmentRequestBuilder(resourcesManager);
    vlanRepository = persistenceManager.getRepositoryFactory().createTransitVlanRepository();
}
Also used : FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager) Before(org.junit.Before)

Example 14 with FlowResourcesManager

use of org.openkilda.wfm.share.flow.resources.FlowResourcesManager in project open-kilda by telstra.

the class FlowUpdateHubBolt method init.

@Override
protected void init() {
    AvailableNetworkFactory availableNetworkFactory = new AvailableNetworkFactory(pathComputerConfig, persistenceManager.getRepositoryFactory());
    PathComputer pathComputer = new PathComputerFactory(pathComputerConfig, availableNetworkFactory).getPathComputer();
    FlowResourcesManager resourcesManager = new FlowResourcesManager(persistenceManager, flowResourcesConfig);
    service = new FlowUpdateService(this, persistenceManager, pathComputer, resourcesManager, config.getPathAllocationRetriesLimit(), config.getPathAllocationRetryDelay(), config.getResourceAllocationRetriesLimit(), config.getSpeakerCommandRetriesLimit());
}
Also used : PathComputer(org.openkilda.pce.PathComputer) AvailableNetworkFactory(org.openkilda.pce.AvailableNetworkFactory) PathComputerFactory(org.openkilda.pce.PathComputerFactory) FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager) FlowUpdateService(org.openkilda.wfm.topology.flowhs.service.FlowUpdateService)

Example 15 with FlowResourcesManager

use of org.openkilda.wfm.share.flow.resources.FlowResourcesManager in project open-kilda by telstra.

the class FlowMirrorPointDeleteHubBolt method init.

@Override
protected void init() {
    FlowResourcesManager resourcesManager = new FlowResourcesManager(persistenceManager, flowResourcesConfig);
    service = new FlowMirrorPointDeleteService(this, persistenceManager, resourcesManager, config.getSpeakerCommandRetriesLimit());
}
Also used : FlowMirrorPointDeleteService(org.openkilda.wfm.topology.flowhs.service.FlowMirrorPointDeleteService) FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager)

Aggregations

FlowResourcesManager (org.openkilda.wfm.share.flow.resources.FlowResourcesManager)19 AvailableNetworkFactory (org.openkilda.pce.AvailableNetworkFactory)7 PathComputer (org.openkilda.pce.PathComputer)7 PathComputerFactory (org.openkilda.pce.PathComputerFactory)7 RuleManagerImpl (org.openkilda.rulemanager.RuleManagerImpl)6 RuleManager (org.openkilda.rulemanager.RuleManager)5 Before (org.junit.Before)3 FlowResourcesConfig (org.openkilda.wfm.share.flow.resources.FlowResourcesConfig)3 FlowDeleteService (org.openkilda.wfm.topology.flowhs.service.FlowDeleteService)3 BeforeClass (org.junit.BeforeClass)2 IslDirectionalReference (org.openkilda.persistence.dummy.IslDirectionalReference)2 PersistenceDummyEntityFactory (org.openkilda.persistence.dummy.PersistenceDummyEntityFactory)2 FlowCreateService (org.openkilda.wfm.topology.flowhs.service.FlowCreateService)2 FlowRerouteService (org.openkilda.wfm.topology.flowhs.service.FlowRerouteService)2 FlowUpdateService (org.openkilda.wfm.topology.flowhs.service.FlowUpdateService)2 FlowValidationHubService (org.openkilda.wfm.topology.flowhs.service.FlowValidationHubService)2 PersistenceContextRequired (org.openkilda.persistence.context.PersistenceContextRequired)1 RuleManagerConfig (org.openkilda.rulemanager.RuleManagerConfig)1 PipelineException (org.openkilda.wfm.error.PipelineException)1 FlowValidationService (org.openkilda.wfm.topology.flowhs.fsm.validation.FlowValidationService)1