Avantika-Huawei

[ONOS-4720] GoldenEye - Non-pce-init RSVP learnt tunnels addition to core fix.

Change-Id: I52e8a0125e87368d16bd2035f47b9e9ef94dcb6f
......@@ -503,9 +503,9 @@ public class PcepClientControllerImpl implements PcepClientController {
} catch (PcepParseException e) {
log.error("Exception occured while sending initiate delete message {}", e.getMessage());
}
}
continue;
}
}
if (!lspObj.getCFlag()) {
// For learned LSP process both add/update PCRpt.
......
......@@ -1476,8 +1476,10 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
}
PcepAttribute attributes = msgPath.getPcepAttribute();
float bandwidth = 0;
int cost = 0;
if (attributes != null && attributes.getMetricObjectList() != null) {
if (attributes != null) {
if (attributes.getMetricObjectList() != null) {
ListIterator<PcepMetricObject> iterator = attributes.getMetricObjectList().listIterator();
PcepMetricObject metricObj = iterator.next();
......@@ -1495,6 +1497,10 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
metricObj = iterator.next();
}
}
if (attributes.getBandwidthObject() != null) {
bandwidth = attributes.getBandwidthObject().getBandwidth();
}
}
List<Object> eroSubObjList = buildPathFromEroObj(eroObj, providerId);
List<Link> links = new ArrayList<>();
......@@ -1510,15 +1516,8 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
Path path = new DefaultPath(providerId, links, cost, EMPTY);
NetworkResource labelStack = new DefaultLabelStack(labels);
float bandwidth = 0;
if (msgPath.getBandwidthObject() != null) {
bandwidth = msgPath.getBandwidthObject().getBandwidth();
}
/*
* To carry PST TLV, SRP object can be present with value 0 even when PCRpt is not in response to any action
* from PCE.
*/
// To carry PST TLV, SRP object can be present with value 0 even when PCRpt is not in response to any action
// from PCE.
PcepSrpObject srpObj = stateRpt.getSrpObject();
LspType lspType = getLspType(srpObj);
......