X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=networkmodel%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fnetworkmodel%2Futil%2FTopologyUtils.java;h=ba2b242c4c081c3f5195b5b47afe8eb928bc7720;hb=99e77cc8ba73a8e765eafdf0ba4e41d6a36b730f;hp=dd383858503dd132b6d3ae0513f452516bdaef08;hpb=e999f1d6d03d98e48ac7d47554699ec270bdf33f;p=transportpce.git
diff --git a/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/util/TopologyUtils.java b/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/util/TopologyUtils.java
index dd3838585..ba2b242c4 100644
--- a/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/util/TopologyUtils.java
+++ b/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/util/TopologyUtils.java
@@ -18,7 +18,7 @@ import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.transportpce.common.NetworkUtils;
import org.opendaylight.transportpce.common.network.NetworkTransactionService;
import org.opendaylight.transportpce.networkmodel.dto.TopologyShard;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210315.mapping.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220114.mapping.Mapping;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1Builder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.TerminationPoint1;
@@ -61,13 +61,13 @@ public final class TopologyUtils {
// Create Destination for link
DestinationBuilder dstNodeBldr = new DestinationBuilder()
- .setDestTp(destTp)
+ .setDestTp(new TpId(destTp))
.setDestNode(new NodeId(dstNode));
// Create Source for the link
SourceBuilder srcNodeBldr = new SourceBuilder()
.setSourceNode(new NodeId(srcNode))
- .setSourceTp(srcTp);
+ .setSourceTp(new TpId(srcTp));
LinkId linkId;
LinkId oppositeLinkId;
@@ -190,9 +190,9 @@ public final class TopologyUtils {
// update links terminating on the given termination-point
List filteredTopoLinks = links.values().stream()
.filter(l1 -> (l1.getSource().getSourceNode().getValue().equals(abstractNodeid)
- && l1.getSource().getSourceTp().toString().equals(tpId))
+ && l1.getSource().getSourceTp().getValue().equals(tpId))
|| (l1.getDestination().getDestNode().getValue().equals(abstractNodeid)
- && l1.getDestination().getDestTp().toString().equals(tpId)))
+ && l1.getDestination().getDestTp().getValue().equals(tpId)))
.collect(Collectors.toList());
List topoLinks = new ArrayList<>();
for (Link link : filteredTopoLinks) {
@@ -202,13 +202,13 @@ public final class TopologyUtils {
.get(new NodeKey(new NodeId(link.getDestination().getDestNode().getValue())))
.augmentation(Node1.class)
.getTerminationPoint()
- .get(new TerminationPointKey(new TpId(link.getDestination().getDestTp().toString())));
+ .get(new TerminationPointKey(new TpId(link.getDestination().getDestTp().getValue())));
} else {
otherLinkTp = nodes
.get(new NodeKey(new NodeId(link.getSource().getSourceNode().getValue())))
.augmentation(Node1.class)
.getTerminationPoint()
- .get(new TerminationPointKey(new TpId(link.getSource().getSourceTp().toString())));
+ .get(new TerminationPointKey(new TpId(link.getSource().getSourceTp().getValue())));
}
Link1Builder link1Bldr = new Link1Builder(link.augmentation(Link1.class));
if (tpBldr.augmentation(TerminationPoint1.class).getAdministrativeState().equals(AdminStates.InService)