- if (ztoa == null || ztoa.getZToA() == null) {
- LOG.error("In pceSendingPceRPC: empty ztoa path");
- isPcePathFeasible = false;
- } else {
- GnpyServiceImpl gnpySvc = new GnpyServiceImpl(input, ztoa, requestId, gnpyTopo, pceHardConstraints);
- requestId++;
- List<PathRequest> pathRequestList2 = gnpySvc.getPathRequest();
- List<Synchronization> synchronizationList2 = gnpySvc.getSynchronization();
- // Send the computed path Z-to-A to GNPY tool
- String gnpyResponse2 = getGnpyResponse(elementsList, connectionsList, pathRequestList2,
- synchronizationList2);
- // Analyze the response
- if (gnpyResponse2 != null) {
- GnpyResult result = new GnpyResult(gnpyResponse2, gnpyTopo);
- result.analyzeResult();
- this.gnpyZtoA = result;
- isPcePathFeasible &= this.gnpyZtoA.getPathFeasibility();
- } else {
- LOG.error("No response from the GNPy server");
- }
- }
+ GnpyServiceImpl gnpySvc1 = new GnpyServiceImpl(input, atoz, requestId, gnpyTopo, pceHardConstraints);
+ this.gnpyAtoZ = gnpyResponseOneDirection(gnpySvc1);
+ boolean isPcePathFeasible = false;
+ isPcePathFeasible = this.gnpyAtoZ.getPathFeasibility();
+ GnpyServiceImpl gnpySvc2 = new GnpyServiceImpl(input, ztoa, requestId, gnpyTopo, pceHardConstraints);
+ this.gnpyZtoA = gnpyResponseOneDirection(gnpySvc2);
+ isPcePathFeasible &= this.gnpyZtoA.getPathFeasibility();