- LinkedList<PathArgument> path = new LinkedList<>();
- path.addAll((Collection<? extends PathArgument>) change.getRootPath().getRootIdentifier()
- .getPathArguments());
- path.removeLast();
- @SuppressWarnings("unchecked") InstanceIdentifier<Nodes> portmappintNodeID =
- (InstanceIdentifier<Nodes>) InstanceIdentifier.create(path);
- String nodeId = InstanceIdentifier.keyOf(portmappintNodeID).getNodeId();
- networkModelService.updateOpenRoadmTopologies(nodeId, newMapping);
+ networkModelService.updateOpenRoadmTopologies(
+ getNodeIdFromMappingDataTreeIdentifier(change.getRootPath()), newMapping);