Search in sources :

Example 1 with FlowDeleteService

use of org.openkilda.wfm.topology.flowhs.service.FlowDeleteService 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 2 with FlowDeleteService

use of org.openkilda.wfm.topology.flowhs.service.FlowDeleteService 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 3 with FlowDeleteService

use of org.openkilda.wfm.topology.flowhs.service.FlowDeleteService in project open-kilda by telstra.

the class YFlowDeleteServiceTest method shouldFailIfNoFlowExists.

@Test
public void shouldFailIfNoFlowExists() throws DuplicateKeyException {
    String yFlowId = "unknown_yflow";
    // when
    FlowDeleteService flowDeleteService = makeFlowDeleteService(0);
    YFlowDeleteService service = makeYFlowDeleteService(flowDeleteService, 0);
    YFlowDeleteRequest yFlowRequest = new YFlowDeleteRequest(yFlowId);
    service.handleRequest(yFlowRequest.getYFlowId(), new CommandContext(), yFlowRequest);
    // then
    verifyNorthboundErrorResponse(yFlowDeleteHubCarrier, ErrorType.NOT_FOUND);
}
Also used : YFlowDeleteRequest(org.openkilda.messaging.command.yflow.YFlowDeleteRequest) CommandContext(org.openkilda.wfm.CommandContext) FlowDeleteService(org.openkilda.wfm.topology.flowhs.service.FlowDeleteService) Test(org.junit.Test) AbstractYFlowTest(org.openkilda.wfm.topology.flowhs.service.AbstractYFlowTest)

Example 4 with FlowDeleteService

use of org.openkilda.wfm.topology.flowhs.service.FlowDeleteService 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)

Aggregations

FlowDeleteService (org.openkilda.wfm.topology.flowhs.service.FlowDeleteService)4 FlowResourcesManager (org.openkilda.wfm.share.flow.resources.FlowResourcesManager)3 RuleManager (org.openkilda.rulemanager.RuleManager)2 RuleManagerImpl (org.openkilda.rulemanager.RuleManagerImpl)2 Test (org.junit.Test)1 YFlowDeleteRequest (org.openkilda.messaging.command.yflow.YFlowDeleteRequest)1 AvailableNetworkFactory (org.openkilda.pce.AvailableNetworkFactory)1 PathComputer (org.openkilda.pce.PathComputer)1 PathComputerFactory (org.openkilda.pce.PathComputerFactory)1 CommandContext (org.openkilda.wfm.CommandContext)1 AbstractYFlowTest (org.openkilda.wfm.topology.flowhs.service.AbstractYFlowTest)1 FlowCreateService (org.openkilda.wfm.topology.flowhs.service.FlowCreateService)1 YFlowCreateService (org.openkilda.wfm.topology.flowhs.service.yflow.YFlowCreateService)1 YFlowDeleteService (org.openkilda.wfm.topology.flowhs.service.yflow.YFlowDeleteService)1