[ONOS-4720] GoldenEye - Non-pce-init RSVP learnt tunnels addition to core fix.
Change-Id: I52e8a0125e87368d16bd2035f47b9e9ef94dcb6f
Showing
2 changed files
with
24 additions
and
25 deletions
... | @@ -503,8 +503,8 @@ public class PcepClientControllerImpl implements PcepClientController { | ... | @@ -503,8 +503,8 @@ public class PcepClientControllerImpl implements PcepClientController { |
503 | } catch (PcepParseException e) { | 503 | } catch (PcepParseException e) { |
504 | log.error("Exception occured while sending initiate delete message {}", e.getMessage()); | 504 | log.error("Exception occured while sending initiate delete message {}", e.getMessage()); |
505 | } | 505 | } |
506 | + continue; | ||
506 | } | 507 | } |
507 | - continue; | ||
508 | } | 508 | } |
509 | 509 | ||
510 | if (!lspObj.getCFlag()) { | 510 | if (!lspObj.getCFlag()) { | ... | ... |
... | @@ -1476,23 +1476,29 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid | ... | @@ -1476,23 +1476,29 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid |
1476 | } | 1476 | } |
1477 | 1477 | ||
1478 | PcepAttribute attributes = msgPath.getPcepAttribute(); | 1478 | PcepAttribute attributes = msgPath.getPcepAttribute(); |
1479 | + float bandwidth = 0; | ||
1479 | int cost = 0; | 1480 | int cost = 0; |
1480 | - if (attributes != null && attributes.getMetricObjectList() != null) { | 1481 | + if (attributes != null) { |
1481 | - ListIterator<PcepMetricObject> iterator = attributes.getMetricObjectList().listIterator(); | 1482 | + if (attributes.getMetricObjectList() != null) { |
1482 | - PcepMetricObject metricObj = iterator.next(); | 1483 | + ListIterator<PcepMetricObject> iterator = attributes.getMetricObjectList().listIterator(); |
1483 | - | 1484 | + PcepMetricObject metricObj = iterator.next(); |
1484 | - while (metricObj != null) { | 1485 | + |
1485 | - if (metricObj.getBType() == IGP_METRIC) { | 1486 | + while (metricObj != null) { |
1486 | - costType = "COST"; | 1487 | + if (metricObj.getBType() == IGP_METRIC) { |
1487 | - } else if (metricObj.getBType() == TE_METRIC) { | 1488 | + costType = "COST"; |
1488 | - costType = "TE_COST"; | 1489 | + } else if (metricObj.getBType() == TE_METRIC) { |
1489 | - } | 1490 | + costType = "TE_COST"; |
1490 | - if (costType != null) { | 1491 | + } |
1491 | - cost = metricObj.getMetricVal(); | 1492 | + if (costType != null) { |
1492 | - log.debug("Path cost {}", cost); | 1493 | + cost = metricObj.getMetricVal(); |
1493 | - break; | 1494 | + log.debug("Path cost {}", cost); |
1495 | + break; | ||
1496 | + } | ||
1497 | + metricObj = iterator.next(); | ||
1494 | } | 1498 | } |
1495 | - metricObj = iterator.next(); | 1499 | + } |
1500 | + if (attributes.getBandwidthObject() != null) { | ||
1501 | + bandwidth = attributes.getBandwidthObject().getBandwidth(); | ||
1496 | } | 1502 | } |
1497 | } | 1503 | } |
1498 | 1504 | ||
... | @@ -1510,15 +1516,8 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid | ... | @@ -1510,15 +1516,8 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid |
1510 | Path path = new DefaultPath(providerId, links, cost, EMPTY); | 1516 | Path path = new DefaultPath(providerId, links, cost, EMPTY); |
1511 | NetworkResource labelStack = new DefaultLabelStack(labels); | 1517 | NetworkResource labelStack = new DefaultLabelStack(labels); |
1512 | 1518 | ||
1513 | - float bandwidth = 0; | 1519 | + // To carry PST TLV, SRP object can be present with value 0 even when PCRpt is not in response to any action |
1514 | - if (msgPath.getBandwidthObject() != null) { | 1520 | + // from PCE. |
1515 | - bandwidth = msgPath.getBandwidthObject().getBandwidth(); | ||
1516 | - } | ||
1517 | - | ||
1518 | - /* | ||
1519 | - * To carry PST TLV, SRP object can be present with value 0 even when PCRpt is not in response to any action | ||
1520 | - * from PCE. | ||
1521 | - */ | ||
1522 | PcepSrpObject srpObj = stateRpt.getSrpObject(); | 1521 | PcepSrpObject srpObj = stateRpt.getSrpObject(); |
1523 | LspType lspType = getLspType(srpObj); | 1522 | LspType lspType = getLspType(srpObj); |
1524 | 1523 | ... | ... |
-
Please register or login to post a comment