Search in sources :

Example 1 with RuleManagerImpl

use of org.openkilda.rulemanager.RuleManagerImpl in project open-kilda by telstra.

the class YFlowRerouteHubBolt method init.

@Override
protected void init() {
    FlowResourcesManager resourcesManager = new FlowResourcesManager(persistenceManager, flowResourcesConfig);
    AvailableNetworkFactory availableNetworkFactory = new AvailableNetworkFactory(pathComputerConfig, persistenceManager.getRepositoryFactory());
    PathComputer pathComputer = new PathComputerFactory(pathComputerConfig, availableNetworkFactory).getPathComputer();
    RuleManager ruleManager = new RuleManagerImpl(ruleManagerConfig);
    flowRerouteService = new FlowRerouteService(new FlowRerouteHubCarrierIsolatingResponsesAndLifecycleEvents(this), persistenceManager, pathComputer, resourcesManager, flowRerouteConfig.getPathAllocationRetriesLimit(), flowRerouteConfig.getPathAllocationRetryDelay(), flowRerouteConfig.getResourceAllocationRetriesLimit(), flowRerouteConfig.getSpeakerCommandRetriesLimit());
    yFlowRerouteService = new YFlowRerouteService(this, persistenceManager, pathComputer, resourcesManager, ruleManager, flowRerouteService, yFlowRerouteConfig.getResourceAllocationRetriesLimit(), yFlowRerouteConfig.getSpeakerCommandRetriesLimit());
}
Also used : PathComputer(org.openkilda.pce.PathComputer) AvailableNetworkFactory(org.openkilda.pce.AvailableNetworkFactory) PathComputerFactory(org.openkilda.pce.PathComputerFactory) RuleManager(org.openkilda.rulemanager.RuleManager) YFlowRerouteService(org.openkilda.wfm.topology.flowhs.service.yflow.YFlowRerouteService) FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager) RuleManagerImpl(org.openkilda.rulemanager.RuleManagerImpl) YFlowRerouteService(org.openkilda.wfm.topology.flowhs.service.yflow.YFlowRerouteService) FlowRerouteService(org.openkilda.wfm.topology.flowhs.service.FlowRerouteService)

Example 2 with RuleManagerImpl

use of org.openkilda.rulemanager.RuleManagerImpl in project open-kilda by telstra.

the class YFlowUpdateHubBolt method init.

@Override
protected void init() {
    FlowResourcesManager resourcesManager = new FlowResourcesManager(persistenceManager, flowResourcesConfig);
    AvailableNetworkFactory availableNetworkFactory = new AvailableNetworkFactory(pathComputerConfig, persistenceManager.getRepositoryFactory());
    PathComputer pathComputer = new PathComputerFactory(pathComputerConfig, availableNetworkFactory).getPathComputer();
    RuleManager ruleManager = new RuleManagerImpl(ruleManagerConfig);
    basicFlowUpdateService = new FlowUpdateService(new FlowUpdateHubCarrierIsolatingResponsesAndLifecycleEvents(this), persistenceManager, pathComputer, resourcesManager, flowUpdateConfig.getPathAllocationRetriesLimit(), flowUpdateConfig.getPathAllocationRetryDelay(), flowUpdateConfig.getResourceAllocationRetriesLimit(), flowUpdateConfig.getSpeakerCommandRetriesLimit());
    yflowUpdateService = new YFlowUpdateService(this, persistenceManager, pathComputer, resourcesManager, ruleManager, basicFlowUpdateService, yflowUpdateConfig.getResourceAllocationRetriesLimit(), yflowUpdateConfig.getSpeakerCommandRetriesLimit(), yflowUpdateConfig.getPrefixForGeneratedYFlowId(), yflowUpdateConfig.getPrefixForGeneratedSubFlowId());
}
Also used : PathComputer(org.openkilda.pce.PathComputer) AvailableNetworkFactory(org.openkilda.pce.AvailableNetworkFactory) PathComputerFactory(org.openkilda.pce.PathComputerFactory) RuleManager(org.openkilda.rulemanager.RuleManager) FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager) YFlowUpdateService(org.openkilda.wfm.topology.flowhs.service.yflow.YFlowUpdateService) FlowUpdateService(org.openkilda.wfm.topology.flowhs.service.FlowUpdateService) YFlowUpdateService(org.openkilda.wfm.topology.flowhs.service.yflow.YFlowUpdateService) RuleManagerImpl(org.openkilda.rulemanager.RuleManagerImpl)

Example 3 with RuleManagerImpl

use of org.openkilda.rulemanager.RuleManagerImpl in project open-kilda by telstra.

the class YFlowCreateHubBolt method init.

@Override
protected void init() {
    FlowResourcesManager resourcesManager = new FlowResourcesManager(persistenceManager, flowResourcesConfig);
    AvailableNetworkFactory availableNetworkFactory = new AvailableNetworkFactory(pathComputerConfig, persistenceManager.getRepositoryFactory());
    PathComputer pathComputer = new PathComputerFactory(pathComputerConfig, availableNetworkFactory).getPathComputer();
    RuleManager ruleManager = new RuleManagerImpl(ruleManagerConfig);
    FlowGenericHubCarrierIsolatingResponsesAndLifecycleEvents isolatingCarrier = new FlowGenericHubCarrierIsolatingResponsesAndLifecycleEvents(this);
    flowCreateService = new FlowCreateService(isolatingCarrier, persistenceManager, pathComputer, resourcesManager, flowCreateConfig.getFlowCreationRetriesLimit(), flowCreateConfig.getPathAllocationRetriesLimit(), flowCreateConfig.getPathAllocationRetryDelay(), flowCreateConfig.getSpeakerCommandRetriesLimit());
    flowDeleteService = new FlowDeleteService(isolatingCarrier, persistenceManager, resourcesManager, yFlowCreateConfig.getSpeakerCommandRetriesLimit());
    yFlowCreateService = new YFlowCreateService(this, persistenceManager, pathComputer, resourcesManager, ruleManager, flowCreateService, flowDeleteService, yFlowCreateConfig.getResourceAllocationRetriesLimit(), yFlowCreateConfig.getSpeakerCommandRetriesLimit(), yFlowCreateConfig.getPrefixForGeneratedYFlowId(), yFlowCreateConfig.getPrefixForGeneratedSubFlowId());
}
Also used : PathComputer(org.openkilda.pce.PathComputer) AvailableNetworkFactory(org.openkilda.pce.AvailableNetworkFactory) PathComputerFactory(org.openkilda.pce.PathComputerFactory) RuleManager(org.openkilda.rulemanager.RuleManager) YFlowCreateService(org.openkilda.wfm.topology.flowhs.service.yflow.YFlowCreateService) FlowCreateService(org.openkilda.wfm.topology.flowhs.service.FlowCreateService) FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager) FlowDeleteService(org.openkilda.wfm.topology.flowhs.service.FlowDeleteService) YFlowCreateService(org.openkilda.wfm.topology.flowhs.service.yflow.YFlowCreateService) RuleManagerImpl(org.openkilda.rulemanager.RuleManagerImpl)

Example 4 with RuleManagerImpl

use of org.openkilda.rulemanager.RuleManagerImpl 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 5 with RuleManagerImpl

use of org.openkilda.rulemanager.RuleManagerImpl in project open-kilda by telstra.

the class SwitchManagerHub method init.

@Override
public void init() {
    super.init();
    validateService = new SwitchValidateServiceImpl(this, persistenceManager, new ValidationServiceImpl(persistenceManager), new RuleManagerImpl(ruleManagerConfig));
    syncService = new SwitchSyncServiceImpl(this, persistenceManager, flowResourcesConfig);
    switchRuleService = new SwitchRuleServiceImpl(this, persistenceManager.getRepositoryFactory());
    LagPortOperationConfig config = new LagPortOperationConfig(persistenceManager.getRepositoryFactory(), persistenceManager.getTransactionManager(), topologyConfig.getBfdPortOffset(), topologyConfig.getBfdPortMaxNumber(), topologyConfig.getLagPortOffset(), topologyConfig.getLagPortMaxNumber(), topologyConfig.getLagPortPoolChunksCount(), topologyConfig.getLagPortPoolCacheSize());
    log.info("LAG logical ports service config: {}", config);
    createLagPortService = new CreateLagPortServiceImpl(this, config);
    deleteLagPortService = new DeleteLagPortServiceImpl(this, config);
}
Also used : SwitchRuleServiceImpl(org.openkilda.wfm.topology.switchmanager.service.impl.SwitchRuleServiceImpl) ValidationServiceImpl(org.openkilda.wfm.topology.switchmanager.service.impl.ValidationServiceImpl) LagPortOperationConfig(org.openkilda.wfm.topology.switchmanager.service.LagPortOperationConfig) CreateLagPortServiceImpl(org.openkilda.wfm.topology.switchmanager.service.impl.fsmhandlers.CreateLagPortServiceImpl) SwitchValidateServiceImpl(org.openkilda.wfm.topology.switchmanager.service.impl.fsmhandlers.SwitchValidateServiceImpl) SwitchSyncServiceImpl(org.openkilda.wfm.topology.switchmanager.service.impl.fsmhandlers.SwitchSyncServiceImpl) DeleteLagPortServiceImpl(org.openkilda.wfm.topology.switchmanager.service.impl.fsmhandlers.DeleteLagPortServiceImpl) RuleManagerImpl(org.openkilda.rulemanager.RuleManagerImpl)

Aggregations

RuleManagerImpl (org.openkilda.rulemanager.RuleManagerImpl)8 FlowResourcesManager (org.openkilda.wfm.share.flow.resources.FlowResourcesManager)6 RuleManager (org.openkilda.rulemanager.RuleManager)5 AvailableNetworkFactory (org.openkilda.pce.AvailableNetworkFactory)3 PathComputer (org.openkilda.pce.PathComputer)3 PathComputerFactory (org.openkilda.pce.PathComputerFactory)3 Before (org.junit.Before)2 RuleManagerConfig (org.openkilda.rulemanager.RuleManagerConfig)2 FlowDeleteService (org.openkilda.wfm.topology.flowhs.service.FlowDeleteService)2 SpeakerRequest (org.openkilda.floodlight.api.request.SpeakerRequest)1 IslDirectionalReference (org.openkilda.persistence.dummy.IslDirectionalReference)1 PersistenceDummyEntityFactory (org.openkilda.persistence.dummy.PersistenceDummyEntityFactory)1 FlowResourcesConfig (org.openkilda.wfm.share.flow.resources.FlowResourcesConfig)1 FlowCreateService (org.openkilda.wfm.topology.flowhs.service.FlowCreateService)1 FlowPathSwapService (org.openkilda.wfm.topology.flowhs.service.FlowPathSwapService)1 FlowRerouteService (org.openkilda.wfm.topology.flowhs.service.FlowRerouteService)1 FlowUpdateService (org.openkilda.wfm.topology.flowhs.service.FlowUpdateService)1 YFlowCreateService (org.openkilda.wfm.topology.flowhs.service.yflow.YFlowCreateService)1 YFlowDeleteService (org.openkilda.wfm.topology.flowhs.service.yflow.YFlowDeleteService)1 YFlowRerouteService (org.openkilda.wfm.topology.flowhs.service.yflow.YFlowRerouteService)1