import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev200128.PathComputationRequestInput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev200128.PathComputationRequestInputBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev200128.service.path.rpc.result.PathDescriptionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629.path.description.AToZDirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629.path.description.ZToADirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.RoutingConstraintsSp.PceMetric;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing.constraints.sp.HardConstraints;
import org.slf4j.Logger;
// sleep for 10s
Thread.sleep(10000);
} catch (InterruptedException e) {
- LOG.error(e.toString());
+ LOG.error("in PCESendingPceRPC: ",e);
}
success = true;
LOG.info("cancelResourceReserve ...");
rc = nwAnalizer.getReturnStructure();
String serviceType = nwAnalizer.getServiceType();
if (!rc.getStatus()) {
- LOG.error("In pathComputationWithConstraints, nwAnalizer: result = {}", rc.toString());
+ LOG.error("In pathComputationWithConstraints, nwAnalizer: result = {}", rc);
return;
}
LOG.info("PceGraph ...");
PceGraph graph = new PceGraph(nwAnalizer.getaendPceNode(),
nwAnalizer.getzendPceNode(), nwAnalizer.getAllPceNodes(),
- pceHardConstraints, pceSoftConstraints, rc, serviceType);
+ hardConstraints, softConstraints, rc, serviceType);
graph.calcPath();
rc = graph.getReturnStructure();
if (!rc.getStatus()) {
}
if (!rc.getStatus()) {
- LOG.error("In pathComputationWithConstraints, graph.calcPath: result = {}", rc.toString());
+ LOG.error("In pathComputationWithConstraints, graph.calcPath: result = {}", rc);
return;
}
}
description.buildDescriptions();
rc = description.getReturnStructure();
if (!rc.getStatus()) {
- LOG.error("In pathComputationWithConstraints, description: result = {}", rc.toString());
- return;
+ LOG.error("In pathComputationWithConstraints, description: result = {}", rc);
}
}
callGnpyToComputeNewPath(gnpy);
} else {
setPathDescription(new PathDescriptionBuilder().setAToZDirection(atoz).setZToADirection(ztoa));
- return;
}
}
catch (GnpyException e) {
LOG.error("Exception raised by GNPy {}",e.getMessage());
setPathDescription(new PathDescriptionBuilder().setAToZDirection(atoz).setZToADirection(ztoa));
- return;
}
- return;
}
private boolean gnpyToCheckFeasiblity(AToZDirection atoz, ZToADirection ztoa, GnpyUtilitiesImpl gnpy)
//Call GNPy in the case of non feasibility
LOG.info("In pceSendingPceRPC: the path is not feasible according to Gnpy");
HardConstraints gnpyPathAsHC = null;
- gnpyPathAsHC = gnpy.askNewPathFromGnpy(gnpyPathAsHC, pceHardConstraints);
+ gnpyPathAsHC = gnpy.askNewPathFromGnpy(pceHardConstraints);
if (gnpyPathAsHC == null) {
LOG.info("In pceSendingPceRPC: GNPy failed to find another path");
this.success = false;