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());
}
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());
}
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());
}
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());
}
}
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);
}
Aggregations