Refactor: Narrow data provided to method
Change-Id: I0425a6c879be76498fc812790713d2db5062117e
Showing
1 changed file
with
4 additions
and
3 deletions
... | @@ -343,7 +343,8 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu | ... | @@ -343,7 +343,8 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu |
343 | } | 343 | } |
344 | 344 | ||
345 | if (multiplexingSupported) { | 345 | if (multiplexingSupported) { |
346 | - if (!isAvailableTributarySlots(connIntent, oduSignalType.tributarySlots())) { | 346 | + if (!isAvailableTributarySlots(connIntent.getSrc(), connIntent.getDst(), |
347 | + oduSignalType.tributarySlots())) { | ||
347 | continue; | 348 | continue; |
348 | } | 349 | } |
349 | } | 350 | } |
... | @@ -354,8 +355,8 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu | ... | @@ -354,8 +355,8 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu |
354 | return null; | 355 | return null; |
355 | } | 356 | } |
356 | 357 | ||
357 | - private boolean isAvailableTributarySlots(OpticalConnectivityIntent connIntent, int requestedTsNum) { | 358 | + private boolean isAvailableTributarySlots(ConnectPoint src, ConnectPoint dst, int requestedTsNum) { |
358 | - Set<TributarySlot> common = findCommonTributarySlotsOnCps(connIntent.getSrc(), connIntent.getDst()); | 359 | + Set<TributarySlot> common = findCommonTributarySlotsOnCps(src, dst); |
359 | if (common.isEmpty()) { | 360 | if (common.isEmpty()) { |
360 | log.debug("No available TributarySlots"); | 361 | log.debug("No available TributarySlots"); |
361 | return false; | 362 | return false; | ... | ... |
-
Please register or login to post a comment