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