X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=pce%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fpce%2Fnetworkanalyzer%2FPceNode.java;h=c869f16757d785ad0995bd092fd89ecaa9209ef8;hb=e5480799d2f666999f2ae5cd7a874aa78d648a60;hp=c06654416d13307dfb7da9dd7c547c28bbb53e3d;hpb=e77d02c00813e934ddc697802e53c5be7118aab4;p=transportpce.git diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceNode.java b/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceNode.java index c06654416..c869f1675 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceNode.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceNode.java @@ -208,14 +208,17 @@ public class PceNode { .augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev181130 .TerminationPoint1.class); if (cntp1.getTpType() == OpenroadmTpType.XPONDERNETWORK) { - if (nttp1.getXpdrNetworkAttributes().getWavelength() != null) { + if (nttp1 != null && nttp1.getXpdrNetworkAttributes().getWavelength() != null) { this.usedXpndrNWTps.add(tp.getTpId().getValue()); - LOG.debug("initXndrTps: XPONDER tp = {} is used", tp.getTpId().getValue()); + LOG.info("initXndrTps: XPONDER tp = {} is used", tp.getTpId().getValue()); } else { this.valid = true; } // find Client of this network TP - String client = nttp1.getXpdrNetworkAttributes().getTailEquipmentId(); + org.opendaylight.yang.gen.v1.http.transportpce.topology.rev200123.TerminationPoint1 tpceTp1 = + tp.augmentation(org.opendaylight.yang.gen.v1.http.transportpce.topology.rev200123 + .TerminationPoint1.class); + String client = tpceTp1.getAssociatedConnectionMapPort(); if ((client.equals("")) || (client == null)) { LOG.error("initXndrTps: XPONDER {} NW TP doesn't have defined Client {}", this.toString(), tp .getTpId().getValue()); @@ -276,14 +279,14 @@ public class PceNode { } private String getSupNodeId(Node inputNode) { - String tempSupId = ""; // TODO: supporting IDs exist as a List. this code takes just the // first element - tempSupId = MapUtils.getSupNode(inputNode); - if (tempSupId.equals("")) { + if (MapUtils.getSupNode(inputNode) != null) { + return MapUtils.getSupNode(inputNode); + } else { LOG.error("getSupNodeId: Empty Supporting node for node: [{}]. Node is ignored", inputNode.getNodeId()); + return ""; } - return tempSupId; } public void validateAZxponder(String anodeId, String znodeId) {