Fix PCE bug to select the path proposed by GNPy
[transportpce.git] / pce / src / main / java / org / opendaylight / transportpce / pce / PcePathDescription.java
index b50ee7aebc2109871923042f8e49cdacacff9330..6e2f3d5b37d84f59ee9102314cee5e2c8e28e6b3 100644 (file)
@@ -108,7 +108,7 @@ public class PcePathDescription {
                         // Used precision 5 to get the exact decimal values of the frequency
                         .setCentralFrequency(new FrequencyTHz(GridUtils.getCentralFrequencyWithPrecision(
                                 rc.getMinFreq(), rc.getMaxFreq(), 5).getValue()))
-                        .setWidth(GridUtils.getWidthFromRateAndModulationFormatToModel131(
+                        .setWidth(GridUtils.getWidthFromRateAndModulationFormat(
                                 Uint32.valueOf(rc.getRate()), modulationFormat));
                 break;
             case StringConstants.SERVICE_TYPE_100GE_M:
@@ -161,7 +161,7 @@ public class PcePathDescription {
                         .setZToAWavelengthNumber(Uint32.valueOf(rc.getResultWavelength()))
                         .setCentralFrequency(new FrequencyTHz(GridUtils.getCentralFrequencyWithPrecision(
                                 rc.getMinFreq(), rc.getMaxFreq(), 4).getValue()))
-                        .setWidth(GridUtils.getWidthFromRateAndModulationFormatToModel131(
+                        .setWidth(GridUtils.getWidthFromRateAndModulationFormat(
                                 Uint32.valueOf(rc.getRate()), modulationFormat));
                 break;
             case StringConstants.SERVICE_TYPE_100GE_M:
@@ -199,7 +199,7 @@ public class PcePathDescription {
         AToZ lastResource = null;
 
         // build A side Client TP
-        String tpName = path.get(0).getClient();
+        String tpName = path.get(0).getClientA();
         String xname = path.get(0).getSourceId().getValue();
         TerminationPoint stp = new TerminationPointBuilder()
                 .setTpId(tpName).setTpNodeId(xname)
@@ -284,7 +284,7 @@ public class PcePathDescription {
         }
 
         // build Z side Client TP
-        tpName = lastLink.getClient();
+        tpName = lastLink.getClientZ();
         xname = lastLink.getDestId().getValue();
         stp = new TerminationPointBuilder()
                 .setTpNodeId(xname).setTpId(tpName)
@@ -305,7 +305,7 @@ public class PcePathDescription {
 
         // build Z size Client TP
         PceLink pcelink = this.allPceLinks.get(path.get(0).getOppositeLink());
-        String tpName = pcelink.getClient();
+        String tpName = pcelink.getClientA();
         String xname = pcelink.getSourceId().getValue();
         TerminationPoint stp = new TerminationPointBuilder()
                 .setTpNodeId(xname).setTpId(tpName)
@@ -393,7 +393,7 @@ public class PcePathDescription {
         }
 
         // build Z side Client TP
-        tpName = lastLink.getClient();
+        tpName = lastLink.getClientZ();
         xname = lastLink.getDestId().getValue();
         stp = new TerminationPointBuilder()
                 .setTpNodeId(xname).setTpId(tpName).build();