package org.opendaylight.transportpce.pce;
import org.opendaylight.transportpce.common.ResponseCodes;
+import org.opendaylight.transportpce.common.mapping.PortMapping;
import org.opendaylight.transportpce.common.network.NetworkTransactionService;
import org.opendaylight.transportpce.pce.constraints.PceConstraints;
import org.opendaylight.transportpce.pce.constraints.PceConstraintsCalc;
import org.opendaylight.transportpce.pce.graph.PceGraph;
import org.opendaylight.transportpce.pce.networkanalyzer.PceCalculation;
import org.opendaylight.transportpce.pce.networkanalyzer.PceResult;
-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.opendaylight.transportpce.pce.rev210701.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.PathComputationRequestInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.service.path.rpc.result.PathDescriptionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.RoutingConstraintsSp.PceMetric;
private String message;
private String responseCode;
private final GnpyConsumer gnpyConsumer;
+ private PortMapping portMapping;
public PceSendingPceRPCs(GnpyConsumer gnpyConsumer) {
setPathDescription(null);
}
public PceSendingPceRPCs(PathComputationRequestInput input,
- NetworkTransactionService networkTransaction, GnpyConsumer gnpyConsumer) {
+ NetworkTransactionService networkTransaction, GnpyConsumer gnpyConsumer, PortMapping portMapping) {
this.gnpyConsumer = gnpyConsumer;
setPathDescription(null);
// TODO compliance check to check that input is not empty
this.input = input;
this.networkTransaction = networkTransaction;
+ this.portMapping = portMapping;
}
public void cancelResourceReserve() {
public void pathComputationWithConstraints(PceConstraints hardConstraints, PceConstraints softConstraints) {
PceCalculation nwAnalizer =
- new PceCalculation(input, networkTransaction, hardConstraints, softConstraints, rc);
+ new PceCalculation(input, networkTransaction, hardConstraints, softConstraints, rc, portMapping);
nwAnalizer.retrievePceNetwork();
rc = nwAnalizer.getReturnStructure();
String serviceType = nwAnalizer.getServiceType();
return;
}
LOG.info("PceGraph ...");
- PceGraph graph = new PceGraph(nwAnalizer.getaendPceNode(),
- nwAnalizer.getzendPceNode(), nwAnalizer.getAllPceNodes(),
- hardConstraints, softConstraints, rc, serviceType);
+ PceGraph graph = new PceGraph(nwAnalizer.getaendPceNode(), nwAnalizer.getzendPceNode(),
+ nwAnalizer.getAllPceNodes(), hardConstraints, softConstraints, rc, serviceType);
graph.calcPath();
rc = graph.getReturnStructure();
if (!rc.getStatus()) {