- if ((this.omsAttributesSpan == null) && (this.linkType == OpenroadmLinkType.ROADMTOROADM)) {
- isValid = false;
- LOG.error("PceLink: Error reading Span for OMS link. Link is ignored {}", linkId);
+ if (this.linkType == OpenroadmLinkType.ROADMTOROADM) {
+ if (this.omsAttributesSpan == null) {
+ isValid = false;
+ LOG.error("PceLink: Error reading Span for OMS link. Link is ignored {}", linkId);
+ } else if (this.omsAttributesSpan.getSpanlossCurrent() == null) {
+ isValid = false;
+ LOG.error("PceLink: Error reading Spanloss for OMS link. Link is ignored {}", linkId);
+ }