import java.util.stream.IntStream;
import org.eclipse.jdt.annotation.Nullable;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.transportpce.common.NetworkUtils;
import org.opendaylight.transportpce.common.network.NetworkTransactionService;
import org.opendaylight.yang.gen.v1.gnpy.gnpy.network.topology.rev181214.Coordinate;
// read the configuration part of the data broker that concerns
// the openRoadm topology and get all the nodes
java.util.Optional<Network> openRoadmTopo = this.networkTransactionService
- .read(LogicalDatastoreType.CONFIGURATION, insIdOpenRoadmTopo).get().toJavaUtil();
+ .read(LogicalDatastoreType.CONFIGURATION, insIdOpenRoadmTopo).get();
java.util.Optional<Network> openRoadmNet = this.networkTransactionService
- .read(LogicalDatastoreType.CONFIGURATION, insIdrOpenRoadmNet).get().toJavaUtil();
+ .read(LogicalDatastoreType.CONFIGURATION, insIdrOpenRoadmNet).get();
if (openRoadmNet.isPresent()) {
List<Node> openRoadmNetNodeList = openRoadmNet.get().getNode();
if (openRoadmTopo.isPresent()) {
destId = element1.getUid();
destIp = null;
// Create a new link
- if (srcId != destId) {
+ if (!destId.equals(srcId)) {
Connections connection = createNewConnection(srcId, srcIp,
destId, destIp);
topoConnections.add(connection);
// Create a new link
destId = element1.getUid();
destIp = null;
- if (srcId != destId) {
+ if (!destId.equals(srcId)) {
Connections connection = createNewConnection(srcId, srcIp, destId, destIp);
topoConnections.add(connection);
srcId = destId;
// Create a new link
destId = element1.getUid();
destIp = null;
- if (srcId != destId) {
+ if (!destId.equals(srcId)) {
Connections connection = createNewConnection(srcId, srcIp, destId, destIp);
topoConnections.add(connection);
srcId = destId;
IpAddress ipAddress = mapNodeRefIp.get(nodeRef);
for (Elements element : elements) {
if (element.getUid().contains(ipAddress.getIpv4Address().getValue().toString())) {
- if ((ipAddressCurrent == null) || (ipAddressCurrent != ipAddress)) {
+ if ((ipAddressCurrent == null) || (!ipAddress.equals(ipAddressCurrent))) {
ipAddressCurrent = ipAddress;
// Fill in routeObjectIncludeExcludes
RouteObjectIncludeExclude routeObjectIncludeExclude1 = addRouteObjectIncludeExclude(
IpAddress ipAddress = mapNodeRefIp.get(nodeRef);
for (Elements element : elements) {
if (element.getUid().contains(ipAddress.getIpv4Address().getValue().toString())) {
- if ((ipAddressCurrent == null) || (ipAddressCurrent != ipAddress)) {
+ if ((ipAddressCurrent == null) || (!ipAddress.equals(ipAddressCurrent))) {
ipAddressCurrent = ipAddress;
// Fill in routeObjectIncludeExcludes
RouteObjectIncludeExclude routeObjectIncludeExclude1 = addRouteObjectIncludeExclude(