Search in sources :

Example 6 with FlowResourcesManager

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

the class FlowDeleteHubBolt method init.

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

Example 7 with FlowResourcesManager

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

the class FlowValidationHubBolt method init.

@Override
public void init() {
    FlowResourcesManager flowResourcesManager = new FlowResourcesManager(persistenceManager, flowResourcesConfig);
    service = new FlowValidationHubService(this, persistenceManager, flowResourcesManager, flowMeterMinBurstSizeInKbits, flowMeterBurstCoefficient);
}
Also used : FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager) FlowValidationHubService(org.openkilda.wfm.topology.flowhs.service.FlowValidationHubService)

Example 8 with FlowResourcesManager

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

the class FlowValidationServiceTest method setUpOnce.

@BeforeClass
public static void setUpOnce() {
    FlowValidationTestBase.setUpOnce();
    FlowResourcesManager flowResourcesManager = new FlowResourcesManager(persistenceManager, flowResourcesConfig);
    service = new FlowValidationService(persistenceManager, flowResourcesManager, MIN_BURST_SIZE_IN_KBITS, BURST_COEFFICIENT);
}
Also used : FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager) BeforeClass(org.junit.BeforeClass)

Example 9 with FlowResourcesManager

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

the class AbstractYFlowTest method before.

@Before
public void before() {
    dummyFactory = new PersistenceDummyEntityFactory(persistenceManager);
    FlowResourcesConfig resourceConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
    flowResourcesManager = spy(new FlowResourcesManager(persistenceManager, resourceConfig));
    RuleManagerConfig ruleManagerConfig = configurationProvider.getConfiguration(RuleManagerConfig.class);
    ruleManager = spy(new RuleManagerImpl(ruleManagerConfig));
    alterFeatureToggles(true, true, true, true);
    dummyFactory.makeSwitch(SWITCH_SHARED);
    dummyFactory.makeSwitch(SWITCH_FIRST_EP);
    dummyFactory.makeSwitch(SWITCH_SECOND_EP);
    dummyFactory.makeSwitch(SWITCH_TRANSIT);
    dummyFactory.makeSwitch(SWITCH_NEW_TRANSIT);
    dummyFactory.makeSwitch(SWITCH_ALT_TRANSIT);
    dummyFactory.makeSwitch(SWITCH_NEW_FIRST_EP);
    dummyFactory.makeSwitch(SWITCH_NEW_SECOND_EP);
    for (IslDirectionalReference reference : new IslDirectionalReference[] { islSharedToFirst, islSharedToSecond, islSharedToTransit, islTransitToFirst, islTransitToSecond, islSharedToAltTransit, islAltTransitToFirst, islAltTransitToSecond, islTransitToNewFirst, islTransitToNewSecond, islSharedToNewAltTransit, islNewAltTransitToFirst, islNewAltTransitToSecond, islSharedToNewTransit, islNewTransitToFirst, islNewTransitToSecond }) {
        dummyFactory.makeIsl(reference.getSourceEndpoint(), reference.getDestEndpoint());
        dummyFactory.makeIsl(reference.getDestEndpoint(), reference.getSourceEndpoint());
    }
}
Also used : FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) RuleManagerConfig(org.openkilda.rulemanager.RuleManagerConfig) PersistenceDummyEntityFactory(org.openkilda.persistence.dummy.PersistenceDummyEntityFactory) IslDirectionalReference(org.openkilda.persistence.dummy.IslDirectionalReference) FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager) RuleManagerImpl(org.openkilda.rulemanager.RuleManagerImpl) Before(org.junit.Before)

Example 10 with FlowResourcesManager

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

the class FlowFetcher method init.

@Override
@PersistenceContextRequired(requiresNew = true)
public void init() {
    super.init();
    flowRepository = persistenceManager.getRepositoryFactory().createFlowRepository();
    yFlowRepository = persistenceManager.getRepositoryFactory().createYFlowRepository();
    flowResourcesManager = new FlowResourcesManager(persistenceManager, flowResourcesConfig);
    try {
        refreshHeap(null, false);
    } catch (PipelineException e) {
        log.error("Failed to init periodic ping cache");
    }
}
Also used : PipelineException(org.openkilda.wfm.error.PipelineException) FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager) PersistenceContextRequired(org.openkilda.persistence.context.PersistenceContextRequired)

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