package org.opendaylight.transportpce.pce.gnpy;
-import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import org.opendaylight.yang.gen.v1.gnpy.path.rev220221.Result;
-import org.opendaylight.yang.gen.v1.gnpy.path.rev220221.explicit.route.hop.type.NumUnnumHop;
-import org.opendaylight.yang.gen.v1.gnpy.path.rev220221.generic.path.properties.path.properties.PathMetric;
-import org.opendaylight.yang.gen.v1.gnpy.path.rev220221.generic.path.properties.path.properties.PathRouteObjects;
-import org.opendaylight.yang.gen.v1.gnpy.path.rev220221.result.Response;
-import org.opendaylight.yang.gen.v1.gnpy.path.rev220221.result.response.response.type.NoPathCase;
-import org.opendaylight.yang.gen.v1.gnpy.path.rev220221.result.response.response.type.PathCase;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.General;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.GeneralBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.Include;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.IncludeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.gnpy.path.rev220615.Result;
+import org.opendaylight.yang.gen.v1.gnpy.path.rev220615.explicit.route.hop.type.NumUnnumHop;
+import org.opendaylight.yang.gen.v1.gnpy.path.rev220615.generic.path.properties.path.properties.PathMetric;
+import org.opendaylight.yang.gen.v1.gnpy.path.rev220615.generic.path.properties.path.properties.PathRouteObjects;
+import org.opendaylight.yang.gen.v1.gnpy.path.rev220615.result.Response;
+import org.opendaylight.yang.gen.v1.gnpy.path.rev220615.result.response.response.type.NoPathCase;
+import org.opendaylight.yang.gen.v1.gnpy.path.rev220615.result.response.response.type.PathCase;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev210528.NodeIdType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209.constraints.Include;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209.constraints.IncludeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209.routing.constraints.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209.routing.constraints.HardConstraintsBuilder;
+import org.opendaylight.yangtools.yang.common.Decimal64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
LOG.info("The response id is {}; ", responses.get(0).getResponseId());
this.response = responses.get(0);
- analyzeResult();
}
public boolean getPathFeasibility() {
.getPathProperties().nonnullPathMetric().values();
LOG.info("GNPy : path is not feasible : {}", noPathType);
for (PathMetric pathMetric : pathMetricList) {
- String metricType = pathMetric.getMetricType().getSimpleName();
- BigDecimal accumulativeValue = pathMetric.getAccumulativeValue();
+ String metricType = pathMetric.getMetricType().toString();
+ Decimal64 accumulativeValue = pathMetric.getAccumulativeValue();
LOG.info("Metric type {} // AccumulatriveValue {}", metricType, accumulativeValue);
}
}
.getPathProperties().nonnullPathMetric().values();
// Path metrics
for (PathMetric pathMetric : pathMetricList) {
- String metricType = pathMetric.getMetricType().getSimpleName();
- BigDecimal accumulativeValue = pathMetric.getAccumulativeValue();
+ String metricType = pathMetric.getMetricType().toString();
+ Decimal64 accumulativeValue = pathMetric.getAccumulativeValue();
LOG.info("Metric type {} // AccumulatriveValue {}", metricType, accumulativeValue);
}
// Path route objects
}
Include include = new IncludeBuilder().setNodeId(nodeIdList).build();
- General general = new GeneralBuilder().setInclude(include).build();
- hardConstraints = new HardConstraintsBuilder().setCoRoutingOrGeneral(general).build();
+ hardConstraints = new HardConstraintsBuilder().setInclude(include).build();
return hardConstraints;
}