Committed by
Gerrit Code Review
[ONOS} CR-Resilency fix
Change-Id: I686092b055efa28e9a9fe922d7e46a9d3c51fee0
Showing
4 changed files
with
5 additions
and
11 deletions
| ... | @@ -269,7 +269,6 @@ public final class BasicPceccHandler { | ... | @@ -269,7 +269,6 @@ public final class BasicPceccHandler { |
| 269 | * @param tunnel tunnel between ingress to egress | 269 | * @param tunnel tunnel between ingress to egress |
| 270 | */ | 270 | */ |
| 271 | public void releaseLabel(Tunnel tunnel) { | 271 | public void releaseLabel(Tunnel tunnel) { |
| 272 | - boolean isLastLabelToPush = false; | ||
| 273 | 272 | ||
| 274 | checkNotNull(labelRsrcService, LABEL_RESOURCE_SERVICE_NULL); | 273 | checkNotNull(labelRsrcService, LABEL_RESOURCE_SERVICE_NULL); |
| 275 | checkNotNull(pceStore, PCE_STORE_NULL); | 274 | checkNotNull(pceStore, PCE_STORE_NULL); |
| ... | @@ -287,19 +286,14 @@ public final class BasicPceccHandler { | ... | @@ -287,19 +286,14 @@ public final class BasicPceccHandler { |
| 287 | PortNumber inPort = lspLocalLabelInfo.inPort(); | 286 | PortNumber inPort = lspLocalLabelInfo.inPort(); |
| 288 | PortNumber outPort = lspLocalLabelInfo.outPort(); | 287 | PortNumber outPort = lspLocalLabelInfo.outPort(); |
| 289 | 288 | ||
| 290 | - // Check whether this is last link label to push | ||
| 291 | - if (!iterator.hasNext()) { | ||
| 292 | - isLastLabelToPush = true; | ||
| 293 | - } | ||
| 294 | - | ||
| 295 | // Push into device | 289 | // Push into device |
| 296 | if ((inLabelId != null) && (inPort != null)) { | 290 | if ((inLabelId != null) && (inPort != null)) { |
| 297 | - installLocalLabelRule(deviceId, inLabelId, inPort, tunnel.tunnelId(), isLastLabelToPush, | 291 | + installLocalLabelRule(deviceId, inLabelId, inPort, tunnel.tunnelId(), false, |
| 298 | Long.valueOf(LabelType.IN_LABEL.value), Objective.Operation.REMOVE); | 292 | Long.valueOf(LabelType.IN_LABEL.value), Objective.Operation.REMOVE); |
| 299 | } | 293 | } |
| 300 | 294 | ||
| 301 | if ((outLabelId != null) && (outPort != null)) { | 295 | if ((outLabelId != null) && (outPort != null)) { |
| 302 | - installLocalLabelRule(deviceId, outLabelId, outPort, tunnel.tunnelId(), isLastLabelToPush, | 296 | + installLocalLabelRule(deviceId, outLabelId, outPort, tunnel.tunnelId(), false, |
| 303 | Long.valueOf(LabelType.OUT_LABEL.value), Objective.Operation.REMOVE); | 297 | Long.valueOf(LabelType.OUT_LABEL.value), Objective.Operation.REMOVE); |
| 304 | } | 298 | } |
| 305 | 299 | ... | ... |
| ... | @@ -778,7 +778,7 @@ public class PceManager implements PceService { | ... | @@ -778,7 +778,7 @@ public class PceManager implements PceService { |
| 778 | bwToAllocate = 0; | 778 | bwToAllocate = 0; |
| 779 | if ((shBwConstraint != null) && (shBwConstraint.links().contains(link))) { | 779 | if ((shBwConstraint != null) && (shBwConstraint.links().contains(link))) { |
| 780 | if (additionalBwValue != null) { | 780 | if (additionalBwValue != null) { |
| 781 | - bwToAllocate = bandwidthConstraint - additionalBwValue; | 781 | + bwToAllocate = additionalBwValue; |
| 782 | } | 782 | } |
| 783 | } else { | 783 | } else { |
| 784 | bwToAllocate = bandwidthConstraint; | 784 | bwToAllocate = bandwidthConstraint; | ... | ... |
| ... | @@ -279,7 +279,7 @@ public class PcepLabelUpdateVer1 implements PcepLabelUpdate { | ... | @@ -279,7 +279,7 @@ public class PcepLabelUpdateVer1 implements PcepLabelUpdate { |
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | llLabelList = labelDownload.getLabelList(); | 281 | llLabelList = labelDownload.getLabelList(); |
| 282 | - if (llLabelList == null) { | 282 | + if (llLabelList == null || llLabelList.isEmpty()) { |
| 283 | throw new PcepParseException("Label list is mandatory object for Label Download."); | 283 | throw new PcepParseException("Label list is mandatory object for Label Download."); |
| 284 | } else { | 284 | } else { |
| 285 | ListIterator<PcepLabelObject> listIterator = llLabelList.listIterator(); | 285 | ListIterator<PcepLabelObject> listIterator = llLabelList.listIterator(); | ... | ... |
| ... | @@ -499,7 +499,7 @@ public class BgpcepFlowRuleProvider extends AbstractProvider | ... | @@ -499,7 +499,7 @@ public class BgpcepFlowRuleProvider extends AbstractProvider |
| 499 | */ | 499 | */ |
| 500 | if (!deviceId.equals(tunnel.path().src().deviceId()) && !deviceId.equals(tunnel.path().dst().deviceId())) { | 500 | if (!deviceId.equals(tunnel.path().src().deviceId()) && !deviceId.equals(tunnel.path().dst().deviceId())) { |
| 501 | //Device is transit node | 501 | //Device is transit node |
| 502 | - if (labelType == IN_LABEL_TYPE) { | 502 | + if (labelType == OUT_LABEL_TYPE) { |
| 503 | //Store label object having IN label value | 503 | //Store label object having IN label value |
| 504 | this.labelObj = labelObj; | 504 | this.labelObj = labelObj; |
| 505 | return; | 505 | return; | ... | ... |
-
Please register or login to post a comment