Allow 0 dB spanloss in power management
[transportpce.git] / olm / src / main / java / org / opendaylight / transportpce / olm / power / PowerMgmtImpl.java
index cbfc365ad44d1b19df8dcd969c66eee1b6aef862..dda3592b2009a2f8af1404e7c4385e8dd87de256 100644 (file)
@@ -197,8 +197,8 @@ public class PowerMgmtImpl implements PowerMgmt {
 
                     LOG.info("Spanloss TX is {}", spanLossTx);
                     // TODO: The span-loss limits should be obtained from optical specifications
-                    if (spanLossTx == null || spanLossTx.intValue() <= 0 || spanLossTx.intValue() > 27) {
-                        LOG.error("Power Value is null: spanLossTx null or out of openROADM range ]0,27] {}",
+                    if (spanLossTx == null || spanLossTx.intValue() < 0 || spanLossTx.intValue() > 27) {
+                        LOG.error("Power Value is null: spanLossTx null or out of openROADM range [0,27] {}",
                             spanLossTx);
                         return false;
                     }