Search in sources :

Example 1 with PathFinder

use of org.openkilda.pce.finder.PathFinder in project open-kilda by telstra.

the class InMemoryPathComputerBaseTest method mockPathComputerWithoutMaxWeight.

private PathComputer mockPathComputerWithoutMaxWeight() throws UnroutableFlowException {
    PathFinder pathFinderMock = mock(PathFinder.class);
    when(pathFinderMock.findNPathsBetweenSwitches(any(AvailableNetwork.class), eq(SWITCH_1), eq(SWITCH_2), anyInt(), any(WeightFunction.class))).thenReturn(getPaths());
    return new InMemoryPathComputer(availableNetworkFactory, pathFinderMock, config);
}
Also used : WeightFunction(org.openkilda.pce.model.WeightFunction) BestWeightAndShortestPathFinder(org.openkilda.pce.finder.BestWeightAndShortestPathFinder) PathFinder(org.openkilda.pce.finder.PathFinder)

Example 2 with PathFinder

use of org.openkilda.pce.finder.PathFinder in project open-kilda by telstra.

the class InMemoryPathComputerBaseTest method mockPathComputerWithMaxWeight.

private PathComputer mockPathComputerWithMaxWeight() throws UnroutableFlowException {
    PathFinder pathFinderMock = mock(PathFinder.class);
    when(pathFinderMock.findNPathsBetweenSwitches(any(AvailableNetwork.class), eq(SWITCH_1), eq(SWITCH_2), anyInt(), any(WeightFunction.class), anyLong(), anyLong())).thenReturn(getPaths());
    return new InMemoryPathComputer(availableNetworkFactory, pathFinderMock, config);
}
Also used : WeightFunction(org.openkilda.pce.model.WeightFunction) BestWeightAndShortestPathFinder(org.openkilda.pce.finder.BestWeightAndShortestPathFinder) PathFinder(org.openkilda.pce.finder.PathFinder)

Aggregations

BestWeightAndShortestPathFinder (org.openkilda.pce.finder.BestWeightAndShortestPathFinder)2 PathFinder (org.openkilda.pce.finder.PathFinder)2 WeightFunction (org.openkilda.pce.model.WeightFunction)2