[ONOS-4720] GoldenEye - Non-pce-init RSVP learnt tunnels addition to core fix.
Change-Id: I52e8a0125e87368d16bd2035f47b9e9ef94dcb6f
Showing
2 changed files
with
10 additions
and
11 deletions
... | @@ -503,9 +503,9 @@ public class PcepClientControllerImpl implements PcepClientController { | ... | @@ -503,9 +503,9 @@ 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 | - } | ||
507 | continue; | 506 | continue; |
508 | } | 507 | } |
508 | + } | ||
509 | 509 | ||
510 | if (!lspObj.getCFlag()) { | 510 | if (!lspObj.getCFlag()) { |
511 | // For learned LSP process both add/update PCRpt. | 511 | // For learned LSP process both add/update PCRpt. | ... | ... |
... | @@ -1476,8 +1476,10 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid | ... | @@ -1476,8 +1476,10 @@ 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) { |
1482 | + if (attributes.getMetricObjectList() != null) { | ||
1481 | ListIterator<PcepMetricObject> iterator = attributes.getMetricObjectList().listIterator(); | 1483 | ListIterator<PcepMetricObject> iterator = attributes.getMetricObjectList().listIterator(); |
1482 | PcepMetricObject metricObj = iterator.next(); | 1484 | PcepMetricObject metricObj = iterator.next(); |
1483 | 1485 | ||
... | @@ -1495,6 +1497,10 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid | ... | @@ -1495,6 +1497,10 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid |
1495 | metricObj = iterator.next(); | 1497 | metricObj = iterator.next(); |
1496 | } | 1498 | } |
1497 | } | 1499 | } |
1500 | + if (attributes.getBandwidthObject() != null) { | ||
1501 | + bandwidth = attributes.getBandwidthObject().getBandwidth(); | ||
1502 | + } | ||
1503 | + } | ||
1498 | 1504 | ||
1499 | List<Object> eroSubObjList = buildPathFromEroObj(eroObj, providerId); | 1505 | List<Object> eroSubObjList = buildPathFromEroObj(eroObj, providerId); |
1500 | List<Link> links = new ArrayList<>(); | 1506 | List<Link> links = new ArrayList<>(); |
... | @@ -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